From: Sandor Yu Date: Tue, 8 Oct 2019 08:30:57 +0000 (+0800) Subject: MLK-21944: HDP: Fix DP 720x480@60 failed work X-Git-Tag: rel_imx_4.19.35_1.1.0~32 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=a22636143b536a132c00edd3e671d27b75b33052;p=linux.git MLK-21944: HDP: Fix DP 720x480@60 failed work hsync in struct of drm_display_mode is modes's hsync rate in kHz. But DP register should been set the value of Horizontal Sync Width that is not define in DRM_MODE(). It could get by (mode->hsync_end - mode->hsync_start). Signed-off-by: Sandor Yu --- diff --git a/drivers/mxc/hdp/API_DPTX.c b/drivers/mxc/hdp/API_DPTX.c index 7f6bb8ce3c42..1f33db490295 100644 --- a/drivers/mxc/hdp/API_DPTX.c +++ b/drivers/mxc/hdp/API_DPTX.c @@ -602,7 +602,7 @@ CDN_API_STATUS CDN_API_DPTX_Set_VIC(state_struct *state, ((mode->flags & DRM_MODE_FLAG_NVSYNC ? 1 : 0) << 15)) + ((mode->flags & DRM_MODE_FLAG_INTERLACE ? mode->vdisplay / 2 : mode->vdisplay) << 16); - DP_HORIZONTAL_ADDR_Param = (mode->hdisplay << 16) + mode->hsync; + DP_HORIZONTAL_ADDR_Param = (mode->hdisplay << 16) + (mode->hsync_end - mode->hsync_start); DP_VERTICAL_0_ADDR_Param = (mode->flags & DRM_MODE_FLAG_INTERLACE ? (mode->vtotal / 2) : mode->vtotal) -