Skip to content

Commit

Permalink
drm/imx: lcdifv3: Fix videomode settings
Browse files Browse the repository at this point in the history
Do not silently assume the opposite bus flag if one condition is invalid.
There are dedicated bus flags and videomode flags for either active high
or active low. Do explicitly check for them.

Signed-off-by: Alexander Stein <[email protected]>
  • Loading branch information
tq-steina committed Jul 11, 2024
1 parent ee366aa commit 7a31ed7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/gpu/drm/imx/lcdifv3/lcdifv3-crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,14 @@ static void lcdifv3_crtc_atomic_enable(struct drm_crtc *crtc,

if (imx_crtc_state->bus_flags & DRM_BUS_FLAG_DE_HIGH)
vm.flags |= DISPLAY_FLAGS_DE_HIGH;
else
if (imx_crtc_state->bus_flags & DRM_BUS_FLAG_DE_LOW)
vm.flags |= DISPLAY_FLAGS_DE_LOW;

if (imx_crtc_state->bus_flags & DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE)
if ((imx_crtc_state->bus_flags & DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE) ||
(imx_crtc_state->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE))
vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
else
if ((imx_crtc_state->bus_flags & DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE) ||
(imx_crtc_state->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE))
vm.flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE;

pm_runtime_get_sync(lcdifv3_crtc->dev->parent);
Expand Down

0 comments on commit 7a31ed7

Please sign in to comment.