disp: msm: dp: check panel state before accessing dp audio registers
During DP disable, it is possible for audio and display to race causing the audio to send teardown notification after display driver has disabled all the clocks. This change adds a check for panel state to avoid accessing registers during this callback. Change-Id: I6322726a04745bc6c73338cd33f65cfdbfe42ec7 Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -362,7 +362,9 @@ static void dp_audio_enable(struct dp_audio_private *audio, bool enable)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catalog->data = enable;
|
catalog->data = enable;
|
||||||
catalog->enable(catalog);
|
|
||||||
|
if (audio->panel->get_panel_on(audio->panel))
|
||||||
|
catalog->enable(catalog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3126,6 +3126,15 @@ int dp_panel_sink_crc_enable(struct dp_panel *dp_panel, bool enable)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dp_panel_get_panel_on(struct dp_panel *dp_panel)
|
||||||
|
{
|
||||||
|
struct dp_panel_private *panel;
|
||||||
|
|
||||||
|
panel = container_of(dp_panel, struct dp_panel_private, dp_panel);
|
||||||
|
|
||||||
|
return panel->panel_on;
|
||||||
|
}
|
||||||
|
|
||||||
struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -3204,6 +3213,7 @@ struct dp_panel *dp_panel_get(struct dp_panel_in *in)
|
|||||||
dp_panel->get_src_crc = dp_panel_get_src_crc;
|
dp_panel->get_src_crc = dp_panel_get_src_crc;
|
||||||
dp_panel->get_sink_crc = dp_panel_get_sink_crc;
|
dp_panel->get_sink_crc = dp_panel_get_sink_crc;
|
||||||
dp_panel->sink_crc_enable = dp_panel_sink_crc_enable;
|
dp_panel->sink_crc_enable = dp_panel_sink_crc_enable;
|
||||||
|
dp_panel->get_panel_on = dp_panel_get_panel_on;
|
||||||
|
|
||||||
sde_conn = to_sde_connector(dp_panel->connector);
|
sde_conn = to_sde_connector(dp_panel->connector);
|
||||||
sde_conn->drv_panel = dp_panel;
|
sde_conn->drv_panel = dp_panel;
|
||||||
|
@@ -198,6 +198,7 @@ struct dp_panel {
|
|||||||
int (*sink_crc_enable)(struct dp_panel *dp_panel, bool enable);
|
int (*sink_crc_enable)(struct dp_panel *dp_panel, bool enable);
|
||||||
int (*get_src_crc)(struct dp_panel *dp_panel, u16 *crc);
|
int (*get_src_crc)(struct dp_panel *dp_panel, u16 *crc);
|
||||||
int (*get_sink_crc)(struct dp_panel *dp_panel, u16 *crc);
|
int (*get_sink_crc)(struct dp_panel *dp_panel, u16 *crc);
|
||||||
|
bool (*get_panel_on)(struct dp_panel *dp_panel);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dp_tu_calc_input {
|
struct dp_tu_calc_input {
|
||||||
|
Reference in New Issue
Block a user