drm/msm/sde: cache crtc during encoder enable state
Commit 1a9ba3e79a3e ("drm/msm/sde: move crtc caching
to encoder_modeset") started caching the crtc in modeset
state instead of encoder enable. An encoder enable
call might happen without modeset. Allow caching
crtc information for those cases.
Change-Id: I2589180a7a6583541f545194d3146a9dcffdbce7
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_encoder.c b/drivers/gpu/drm/msm/sde/sde_encoder.c
index e0023d0..f30c61e 100644
--- a/drivers/gpu/drm/msm/sde/sde_encoder.c
+++ b/drivers/gpu/drm/msm/sde/sde_encoder.c
@@ -2546,6 +2546,9 @@
return;
}
+ if (drm_enc->crtc && !sde_enc->crtc)
+ sde_enc->crtc = drm_enc->crtc;
+
comp_info = &mode_info.comp_info;
cur_mode = &sde_enc->base.crtc->state->adjusted_mode;