diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-11-15 10:45:04 -0500 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-01-29 14:45:29 -0500 |
commit | b7245cc536b95167d67b53e27adff964400045f1 (patch) | |
tree | 5d3fd5ad71928f825c50b6e0b9d905781dd0768e | |
parent | 538af6cbdf9df485dc0ef43817d4195f11b4e9ac (diff) |
drm/uapi: Deprecate nonsense kms mode types
BUILTIN, CRTC_C, CLOCK_C, and DEFULT mode types are unused. Let's
refuse to generate them or accept them from userspace either. A
cursory check didn't reveal any userspace code that would depend
on these.
v2: Recommend DRIVER instead of BUILTIN (ajax)
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171115154504.14338-1-ville.syrjala@linux.intel.com
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
-rw-r--r-- | include/drm/drm_modes.h | 7 | ||||
-rw-r--r-- | include/uapi/drm/drm_mode.h | 14 |
2 files changed, 9 insertions, 12 deletions
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 99dd815269e9..71cbb10e22dc 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h | |||
@@ -242,8 +242,6 @@ struct drm_display_mode { | |||
242 | * A bitmask of flags, mostly about the source of a mode. Possible flags | 242 | * A bitmask of flags, mostly about the source of a mode. Possible flags |
243 | * are: | 243 | * are: |
244 | * | 244 | * |
245 | * - DRM_MODE_TYPE_BUILTIN: Meant for hard-coded modes, effectively | ||
246 | * unused. | ||
247 | * - DRM_MODE_TYPE_PREFERRED: Preferred mode, usually the native | 245 | * - DRM_MODE_TYPE_PREFERRED: Preferred mode, usually the native |
248 | * resolution of an LCD panel. There should only be one preferred | 246 | * resolution of an LCD panel. There should only be one preferred |
249 | * mode per connector at any given time. | 247 | * mode per connector at any given time. |
@@ -253,8 +251,11 @@ struct drm_display_mode { | |||
253 | * - DRM_MODE_TYPE_USERDEF: Mode defined via kernel command line | 251 | * - DRM_MODE_TYPE_USERDEF: Mode defined via kernel command line |
254 | * | 252 | * |
255 | * Plus a big list of flags which shouldn't be used at all, but are | 253 | * Plus a big list of flags which shouldn't be used at all, but are |
256 | * still around since these flags are also used in the userspace ABI: | 254 | * still around since these flags are also used in the userspace ABI. |
255 | * We no longer accept modes with these types though: | ||
257 | * | 256 | * |
257 | * - DRM_MODE_TYPE_BUILTIN: Meant for hard-coded modes, unused. | ||
258 | * Use DRM_MODE_TYPE_DRIVER instead. | ||
258 | * - DRM_MODE_TYPE_DEFAULT: Again a leftover, use | 259 | * - DRM_MODE_TYPE_DEFAULT: Again a leftover, use |
259 | * DRM_MODE_TYPE_PREFERRED instead. | 260 | * DRM_MODE_TYPE_PREFERRED instead. |
260 | * - DRM_MODE_TYPE_CLOCK_C and DRM_MODE_TYPE_CRTC_C: Define leftovers | 261 | * - DRM_MODE_TYPE_CLOCK_C and DRM_MODE_TYPE_CRTC_C: Define leftovers |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index a7cded1c43e8..eb9b68c7c218 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
@@ -38,19 +38,15 @@ extern "C" { | |||
38 | #define DRM_DISPLAY_MODE_LEN 32 | 38 | #define DRM_DISPLAY_MODE_LEN 32 |
39 | #define DRM_PROP_NAME_LEN 32 | 39 | #define DRM_PROP_NAME_LEN 32 |
40 | 40 | ||
41 | #define DRM_MODE_TYPE_BUILTIN (1<<0) | 41 | #define DRM_MODE_TYPE_BUILTIN (1<<0) /* deprecated */ |
42 | #define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) | 42 | #define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ |
43 | #define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) | 43 | #define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ |
44 | #define DRM_MODE_TYPE_PREFERRED (1<<3) | 44 | #define DRM_MODE_TYPE_PREFERRED (1<<3) |
45 | #define DRM_MODE_TYPE_DEFAULT (1<<4) | 45 | #define DRM_MODE_TYPE_DEFAULT (1<<4) /* deprecated */ |
46 | #define DRM_MODE_TYPE_USERDEF (1<<5) | 46 | #define DRM_MODE_TYPE_USERDEF (1<<5) |
47 | #define DRM_MODE_TYPE_DRIVER (1<<6) | 47 | #define DRM_MODE_TYPE_DRIVER (1<<6) |
48 | 48 | ||
49 | #define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_BUILTIN | \ | 49 | #define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | \ |
50 | DRM_MODE_TYPE_CLOCK_C | \ | ||
51 | DRM_MODE_TYPE_CRTC_C | \ | ||
52 | DRM_MODE_TYPE_PREFERRED | \ | ||
53 | DRM_MODE_TYPE_DEFAULT | \ | ||
54 | DRM_MODE_TYPE_USERDEF | \ | 50 | DRM_MODE_TYPE_USERDEF | \ |
55 | DRM_MODE_TYPE_DRIVER) | 51 | DRM_MODE_TYPE_DRIVER) |
56 | 52 | ||