[PATCH 10/14] drm/mgag200: Don't use crtc_* parameters for validation

Takashi Iwai tiwai at suse.de
Tue Jul 18 14:43:16 UTC 2017


From: Egbert Eich <eich at suse.de>

The crtc_* are wrong references as the mode parameters to validate,
use the ones without crtc_ prefix instead.

Signed-off-by: Egbert Eich <eich at suse.de>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 7c8e3c6ace0b..a07f67ed6e4a 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1758,12 +1758,12 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
 		return MODE_H_ILLEGAL;
 	}
 
-	if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
-	    mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
-	    mode->crtc_vdisplay > 2048 * lace ||
-	    mode->crtc_vsync_start > 4096 * lace ||
-	    mode->crtc_vsync_end > 4096 * lace ||
-	    mode->crtc_vtotal > 4096 * lace) {
+	if (mode->hdisplay > 2048 || mode->hsync_start > 4096 ||
+	    mode->hsync_end > 4096 || mode->htotal > 4096 ||
+	    mode->vdisplay > 2048 * lace ||
+	    mode->vsync_start > 4096 * lace ||
+	    mode->vsync_end > 4096 * lace ||
+	    mode->vtotal > 4096 * lace) {
 		return MODE_BAD;
 	}
 
-- 
2.13.2



More information about the dri-devel mailing list