Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: deprecate DRM_FORMAT_MOD_NONE

DRM_FORMAT_MOD_NONE is in the list of vendors, which is pretty
confusing. We already have DRM_FORMAT_MOD_VENDOR_NONE. Move it down in
the list of format modifiers.

DRM_FORMAT_MOD_NONE is an alias for DRM_FORMAT_MOD_LINEAR, however the
name is confusing: NONE doesn't mean that the modifier is implicit,
instead it means that the layout is linear. Deprecate it.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/a2j8KTgc26k5QniSAhDSTgCw4XWZhmsNHwG8UVa6U@cp4-web-014.plabs.ch

+10 -1
+10 -1
include/uapi/drm/drm_fourcc.h
··· 350 350 */ 351 351 352 352 /* Vendor Ids: */ 353 - #define DRM_FORMAT_MOD_NONE 0 354 353 #define DRM_FORMAT_MOD_VENDOR_NONE 0 355 354 #define DRM_FORMAT_MOD_VENDOR_INTEL 0x01 356 355 #define DRM_FORMAT_MOD_VENDOR_AMD 0x02 ··· 420 421 * and so might actually result in a tiled framebuffer. 421 422 */ 422 423 #define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0) 424 + 425 + /* 426 + * Deprecated: use DRM_FORMAT_MOD_LINEAR instead 427 + * 428 + * The "none" format modifier doesn't actually mean that the modifier is 429 + * implicit, instead it means that the layout is linear. Whether modifiers are 430 + * used is out-of-band information carried in an API-specific way (e.g. in a 431 + * flag for drm_mode_fb_cmd2). 432 + */ 433 + #define DRM_FORMAT_MOD_NONE 0 423 434 424 435 /* Intel framebuffer modifiers */ 425 436