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

On sm6150, the DP driver is driving the lane switch
mux through gpio to toggle super-speed lanes for
usb or DP use based on DP connect event. In
simulation mode, the mux is toggling the super-speed
lanes to DP after connect command is issued through
the debugfs node. This is causing a loss of usb
connection leading to communication cutoff between
the simulation runtime environemnt and the device.
These changes will skip gpio toglging during the
simulation mode to avoid the usb connection loss.

Change-Id: I8dd2a4f0af8451e3037d8c03c75ac711818cd217
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
tirimbino
Sankeerth Billakanti 6 years ago committed by Gerrit - the friendly Code Review server
parent 5515f1453c
commit 956cf6e55b
  1. 4
      drivers/gpu/drm/msm/dp/dp_debug.c
  2. 3
      drivers/gpu/drm/msm/dp/dp_debug.h
  3. 1
      drivers/gpu/drm/msm/dp/dp_display.c
  4. 4
      drivers/gpu/drm/msm/dp/dp_power.c
  5. 5
      drivers/gpu/drm/msm/dp/dp_power.h

@ -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;

@ -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;
};
/**

@ -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)) {

@ -1,5 +1,5 @@
/*
* 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) {

@ -1,5 +1,5 @@
/*
* 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,

Loading…
Cancel
Save