Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 337ec7a2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dp: skip gpio driving in simulation mode"

parents 0bd31c0c 956cf6e5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ struct dp_debug_private {
	struct dp_debug dp_debug;
	struct dp_parser *parser;
	struct dp_ctrl *ctrl;
	struct dp_power *power;
	struct mutex lock;
};

@@ -1461,6 +1462,7 @@ static void dp_debug_set_sim_mode(struct dp_debug_private *debug, bool sim)
		}

		debug->dp_debug.sim_mode = true;
		debug->power->sim_mode = true;
		debug->aux->set_sim_mode(debug->aux, true,
			debug->edid, debug->dpcd);
	} else {
@@ -1468,6 +1470,7 @@ static void dp_debug_set_sim_mode(struct dp_debug_private *debug, bool sim)
		debug->ctrl->abort(debug->ctrl);

		debug->aux->set_sim_mode(debug->aux, false, NULL, NULL);
		debug->power->sim_mode = false;
		debug->dp_debug.sim_mode = false;

		debug->panel->set_edid(debug->panel, 0);
@@ -2040,6 +2043,7 @@ struct dp_debug *dp_debug_get(struct dp_debug_in *in)
	debug->catalog = in->catalog;
	debug->parser = in->parser;
	debug->ctrl = in->ctrl;
	debug->power = in->power;

	dp_debug = &debug->dp_debug;
	dp_debug->vdisplay = 0;
+3 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ struct dp_debug {
 * @connector: double pointer to display connector
 * @catalog: instance of catalog module
 * @parser: instance of parser module
 * @ctrl: instance od ctrl module
 * @power: instance of  power module
 */
struct dp_debug_in {
	struct device *dev;
@@ -74,6 +76,7 @@ struct dp_debug_in {
	struct dp_catalog *catalog;
	struct dp_parser *parser;
	struct dp_ctrl *ctrl;
	struct dp_power *power;
};

/**
+1 −0
Original line number Diff line number Diff line
@@ -1365,6 +1365,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
	debug_in.catalog = dp->catalog;
	debug_in.parser = dp->parser;
	debug_in.ctrl = dp->ctrl;
	debug_in.power = dp->power;

	dp->debug = dp_debug_get(&debug_in);
	if (IS_ERR(dp->debug)) {
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -123,7 +123,7 @@ static int dp_power_pinctrl_set(struct dp_power_private *power, bool active)

	parser = power->parser;

	if (IS_ERR_OR_NULL(parser->pinctrl.pin))
	if (IS_ERR_OR_NULL(parser->pinctrl.pin) || power->dp_power.sim_mode)
		return 0;

	if (parser->no_aux_switch && parser->lphw_hpd) {
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -21,12 +21,15 @@
/**
 * sruct dp_power - DisplayPort's power related data
 *
 * @sim_mode: simulation mode enable flag
 * @init: initializes the regulators/core clocks/GPIOs/pinctrl
 * @deinit: turns off the regulators/core clocks/GPIOs/pinctrl
 * @clk_enable: enable/disable the DP clocks
 * @set_pixel_clk_parent: set the parent of DP pixel clock
 */
struct dp_power {
	bool sim_mode;

	int (*init)(struct dp_power *power, bool flip);
	int (*deinit)(struct dp_power *power);
	int (*clk_enable)(struct dp_power *power, enum dp_pm_type pm_type,