summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-05-16 23:50:49 +0200
committerPaul Cercueil <paul@crapouillou.net>2020-05-17 14:14:17 +0200
commita53bcc19876498bdd3b4ef796c787295dcc498b4 (patch)
tree867173080995f80462ac66c081c8a79b5a9a4df9 /drivers/gpu
parentc54a8f1f329197d83d941ad84c4aa38bf282cbbd (diff)
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: a7c909b7c037 ("gpu/drm: ingenic: Check for display size in CRTC atomic check") Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://patchwork.freedesktop.org/patch/msgid/20200516215057.392609-4-paul@crapouillou.net Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/ingenic/ingenic-drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index 1754c0547069..a5ad6a4353e1 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -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,