mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
disp: msm: sde: remove clearing cur_master in encoder enable function
SDE IRQ callback can run in parallel thread to modeset after removing pp_done wait before pre_modeset. If cur_master is cleared in encoder enable function and irq callback is triggered at the same time, the irq callback could not be handled properly as cur_master is NULL.So remove clearing cur_master in encoder enable function to avoid the race condition between modeset and irq callback. Change-Id: I2059c699a68838b3c9f6a7dd658a35f178b18c42 Signed-off-by: Lei Chen <quic_chenlei@quicinc.com> Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
This commit is contained in:
parent
8d57f083f2
commit
f77b7c533c
1 changed files with 4 additions and 2 deletions
|
|
@ -2733,6 +2733,7 @@ static void sde_encoder_off_work(struct kthread_work *work)
|
|||
static void sde_encoder_virt_enable(struct drm_encoder *drm_enc)
|
||||
{
|
||||
struct sde_encoder_virt *sde_enc = NULL;
|
||||
bool has_master_enc = false;
|
||||
int i, ret = 0;
|
||||
struct msm_compression_info *comp_info = NULL;
|
||||
struct drm_display_mode *cur_mode = NULL;
|
||||
|
|
@ -2759,18 +2760,19 @@ static void sde_encoder_virt_enable(struct drm_encoder *drm_enc)
|
|||
SDE_DEBUG_ENC(sde_enc, "\n");
|
||||
SDE_EVT32(DRMID(drm_enc), cur_mode->hdisplay, cur_mode->vdisplay);
|
||||
|
||||
sde_enc->cur_master = NULL;
|
||||
for (i = 0; i < sde_enc->num_phys_encs; i++) {
|
||||
struct sde_encoder_phys *phys = sde_enc->phys_encs[i];
|
||||
|
||||
if (phys && phys->ops.is_master && phys->ops.is_master(phys)) {
|
||||
SDE_DEBUG_ENC(sde_enc, "master is now idx %d\n", i);
|
||||
sde_enc->cur_master = phys;
|
||||
has_master_enc = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sde_enc->cur_master) {
|
||||
if (!has_master_enc) {
|
||||
sde_enc->cur_master = NULL;
|
||||
SDE_ERROR("virt encoder has no master! num_phys %d\n", i);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue