projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a8d3ea
)
drm/modes: Move 3D stereo flag check into drm_mode_validate_basic()
author
Ville Syrjälä
<
[email protected]
>
Tue, 14 Nov 2017 18:32:49 +0000
(20:32 +0200)
committer
Ville Syrjälä
<
[email protected]
>
Mon, 29 Jan 2018 19:23:35 +0000
(21:23 +0200)
Currently we don't sanity check the 3D stereo flags for modes filled out
by the kernel. Move the check from drm_mode_convert_umode() into
drm_mode_validate_basic() so that we get the same check going both ways.
Signed-off-by: Ville Syrjälä <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/drm_modes.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_modes.c
b/drivers/gpu/drm/drm_modes.c
index 4a3f68a33844589ad25a7f02f59c6470c0d2e891..1a72883b836e74841e6c701f25218a4dfd0c444d 100644
(file)
--- a/
drivers/gpu/drm/drm_modes.c
+++ b/
drivers/gpu/drm/drm_modes.c
@@
-1036,6
+1036,9
@@
EXPORT_SYMBOL(drm_mode_equal_no_clocks_no_stereo);
enum drm_mode_status
drm_mode_validate_basic(const struct drm_display_mode *mode)
{
+ if ((mode->flags & DRM_MODE_FLAG_3D_MASK) > DRM_MODE_FLAG_3D_MAX)
+ return MODE_BAD;
+
if (mode->clock == 0)
return MODE_CLOCK_LOW;
@@
-1574,9
+1577,6
@@
int drm_mode_convert_umode(struct drm_display_mode *out,
goto out;
}
- if ((in->flags & DRM_MODE_FLAG_3D_MASK) > DRM_MODE_FLAG_3D_MAX)
- goto out;
-
out->clock = in->clock;
out->hdisplay = in->hdisplay;
out->hsync_start = in->hsync_start;