Skip to content
Snippets Groups Projects
Unverified Commit a53bcc19 authored by Paul Cercueil's avatar Paul Cercueil
Browse files

gpu/drm: ingenic: Fix bogus crtc_atomic_check callback


The code was comparing the SoC's maximum height with the mode's width,
and vice-versa. D'oh.

Cc: stable@vger.kernel.org # v5.6
Fixes: a7c909b7 ("gpu/drm: ingenic: Check for display size in CRTC atomic check")
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200516215057.392609-4-paul@crapouillou.net


Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent c54a8f1f
No related branches found
No related tags found
No related merge requests found
......@@ -328,8 +328,8 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc,
if (!drm_atomic_crtc_needs_modeset(state))
return 0;
if (state->mode.hdisplay > priv->soc_info->max_height ||
state->mode.vdisplay > priv->soc_info->max_width)
if (state->mode.hdisplay > priv->soc_info->max_width ||
state->mode.vdisplay > priv->soc_info->max_height)
return -EINVAL;
rate = clk_round_rate(priv->pix_clk,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment