drm/msm/dp: abort aux and ctrl when simulation is switched off
While running the DisplayPort simulation, if the simulation is abruptly switched off, AUX and CTRL may continue processing like in a normal DisplayPort connected mode. This may result in an unstable DP driver state and may affect subsequent hot plugs. Abort the AUX and CTRL processing when DP simulation is switched off. This brings the DP driver into stable state when simulation is switched off. Change-Id: Ib243b0628e1c642ec2f50adfaa17ca3aebdc2687 Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org> Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
parent
32a2488454
commit
a2dce5393f
3 changed files with 10 additions and 2 deletions
|
@ -11,7 +11,6 @@
|
|||
#include "dp_power.h"
|
||||
#include "dp_catalog.h"
|
||||
#include "dp_aux.h"
|
||||
#include "dp_ctrl.h"
|
||||
#include "dp_debug.h"
|
||||
#include "drm_connector.h"
|
||||
#include "sde_connector.h"
|
||||
|
@ -41,6 +40,7 @@ struct dp_debug_private {
|
|||
struct device *dev;
|
||||
struct dp_debug dp_debug;
|
||||
struct dp_parser *parser;
|
||||
struct dp_ctrl *ctrl;
|
||||
};
|
||||
|
||||
static int dp_debug_get_edid_buf(struct dp_debug_private *debug)
|
||||
|
@ -1444,6 +1444,9 @@ static void dp_debug_set_sim_mode(struct dp_debug_private *debug, bool sim)
|
|||
debug->aux->set_sim_mode(debug->aux, true,
|
||||
debug->edid, debug->dpcd);
|
||||
} else {
|
||||
debug->aux->abort(debug->aux);
|
||||
debug->ctrl->abort(debug->ctrl);
|
||||
|
||||
debug->aux->set_sim_mode(debug->aux, false, NULL, NULL);
|
||||
debug->dp_debug.sim_mode = false;
|
||||
|
||||
|
@ -1989,7 +1992,8 @@ struct dp_debug *dp_debug_get(struct dp_debug_in *in)
|
|||
struct dp_debug_private *debug;
|
||||
struct dp_debug *dp_debug;
|
||||
|
||||
if (!in->dev || !in->panel || !in->hpd || !in->link || !in->catalog) {
|
||||
if (!in->dev || !in->panel || !in->hpd || !in->link ||
|
||||
!in->catalog || !in->ctrl) {
|
||||
pr_err("invalid input\n");
|
||||
rc = -EINVAL;
|
||||
goto error;
|
||||
|
@ -2010,6 +2014,7 @@ struct dp_debug *dp_debug_get(struct dp_debug_in *in)
|
|||
debug->connector = in->connector;
|
||||
debug->catalog = in->catalog;
|
||||
debug->parser = in->parser;
|
||||
debug->ctrl = in->ctrl;
|
||||
|
||||
dp_debug = &debug->dp_debug;
|
||||
dp_debug->vdisplay = 0;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define _DP_DEBUG_H_
|
||||
|
||||
#include "dp_panel.h"
|
||||
#include "dp_ctrl.h"
|
||||
#include "dp_link.h"
|
||||
#include "dp_usbpd.h"
|
||||
#include "dp_aux.h"
|
||||
|
@ -63,6 +64,7 @@ struct dp_debug_in {
|
|||
struct drm_connector **connector;
|
||||
struct dp_catalog *catalog;
|
||||
struct dp_parser *parser;
|
||||
struct dp_ctrl *ctrl;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -1226,6 +1226,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
|
|||
debug_in.connector = &dp->dp_display.base_connector;
|
||||
debug_in.catalog = dp->catalog;
|
||||
debug_in.parser = dp->parser;
|
||||
debug_in.ctrl = dp->ctrl;
|
||||
|
||||
dp->debug = dp_debug_get(&debug_in);
|
||||
if (IS_ERR(dp->debug)) {
|
||||
|
|
Loading…
Reference in a new issue