Skip to content

Commit 8c11586

Browse files
Qiqi Zhangdianders
authored andcommitted
drm/bridge: ti-sn65dsi86: Fix output polarity setting bug
According to the description in ti-sn65dsi86's datasheet: CHA_HSYNC_POLARITY: 0 = Active High Pulse. Synchronization signal is high for the sync pulse width. (default) 1 = Active Low Pulse. Synchronization signal is low for the sync pulse width. CHA_VSYNC_POLARITY: 0 = Active High Pulse. Synchronization signal is high for the sync pulse width. (Default) 1 = Active Low Pulse. Synchronization signal is low for the sync pulse width. We should only set these bits when the polarity is negative. Fixes: a095f15 ("drm/bridge: add support for sn65dsi86 bridge driver") Signed-off-by: Qiqi Zhang <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ed14d22 commit 8c11586

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,9 @@ static void ti_sn_bridge_set_video_timings(struct ti_sn65dsi86 *pdata)
931931
&pdata->bridge.encoder->crtc->state->adjusted_mode;
932932
u8 hsync_polarity = 0, vsync_polarity = 0;
933933

934-
if (mode->flags & DRM_MODE_FLAG_PHSYNC)
934+
if (mode->flags & DRM_MODE_FLAG_NHSYNC)
935935
hsync_polarity = CHA_HSYNC_POLARITY;
936-
if (mode->flags & DRM_MODE_FLAG_PVSYNC)
936+
if (mode->flags & DRM_MODE_FLAG_NVSYNC)
937937
vsync_polarity = CHA_VSYNC_POLARITY;
938938

939939
ti_sn65dsi86_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG,

0 commit comments

Comments
 (0)