From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> I recently realized that we're not validating the mode flags/type passed in from userspace. Let's try to fix that. I'd also like to entirely eliminate some of the more crazy mode flags. PIXMUX and BCAST look pretty easy, so I've targetted them first. Ideally I'd like to kill DBLCLK, CLKDIV2, HSKEW, DBLSCAN, and vscan as well. IMO there's no good reason to expose any of that to userspace, and instead it should all be handled internally by the drivers. Unfortunately all of those seem to be used to some degree by a handful of drivers. I also tried to nuke some of the crazy mode types. Cc: Jose Abreu <Jose.Abreu@xxxxxxxxxxxx> Cc: Adam Jackson <ajax@xxxxxxxxxx> Cc: Keith Packard <keithp@xxxxxxxxxx> Ville Syrjälä (10): drm/modes: Move 3D stereo flag check into drm_mode_validate_basic() drm/uapi: Validate the mode flags/type drm/uapi: Deprecate DRM_MODE_FLAG_PIXMUX drm/uapi: Deprecate DRM_MODE_FLAG_BCAST drm/modes: Fix description of DRM_MODE_TYPE_USERDEF drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C vs. DRM_MODE_TYPE_BUILTIN handling drm/modes: Kill DRM_MODE_TYPE_CLOCK_CRTC_C define drm/uapi: Deprecate nonsense kms mode types drm/modes: Provide global mode_valid hook drm/i915: Provide a device level .mode_valid() hook drivers/gpu/drm/drm_atomic.c | 2 +- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_modes.c | 60 +++++++++++++++++++++++++----------- drivers/gpu/drm/drm_probe_helper.c | 2 +- drivers/gpu/drm/i915/intel_crt.c | 3 -- drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++ drivers/gpu/drm/i915/intel_dsi.c | 5 --- drivers/gpu/drm/i915/intel_dvo.c | 3 -- drivers/gpu/drm/i915/intel_fbc.c | 3 +- drivers/gpu/drm/i915/intel_hdmi.c | 3 -- drivers/gpu/drm/i915/intel_sdvo.c | 3 -- include/drm/drm_mode_config.h | 12 ++++++++ include/drm/drm_modes.h | 24 +++++++-------- include/uapi/drm/drm_mode.h | 30 ++++++++++++++---- 14 files changed, 120 insertions(+), 59 deletions(-) -- 2.13.6 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx