disp: msm: sde: add null pointer check for encoder current master
During virt enable call, sde_enc master will be removed and re-assigned. If an underrun is observed during this scenario, it results in crash due to uninitialized access. This change handles the above scenario. Change-Id: Iec9e4a0bc4b763e44933334dacf82f1439eacc17 Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
This commit is contained in:
@@ -3021,7 +3021,8 @@ static void sde_encoder_underrun_callback(struct drm_encoder *drm_enc,
|
||||
SDE_ATRACE_BEGIN("encoder_underrun_callback");
|
||||
atomic_inc(&phy_enc->underrun_cnt);
|
||||
SDE_EVT32(DRMID(drm_enc), atomic_read(&phy_enc->underrun_cnt));
|
||||
if (sde_enc->cur_master->ops.get_underrun_line_count)
|
||||
if (sde_enc->cur_master &&
|
||||
sde_enc->cur_master->ops.get_underrun_line_count)
|
||||
sde_enc->cur_master->ops.get_underrun_line_count(
|
||||
sde_enc->cur_master);
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user