drm/fourcc: rename Intel modifiers to follow the naming convention
Subsystems (3)
PATCH 1/2 drm/fourcc: rename Intel modifiers to follow the naming convention
All the other vendors use the format DRM_FORMAT_MOD_{SAMSUNG,QCOM,VIVANTE,NVIDIA,BROADCOM,ARM}_* for their modifiers, except Intel.
Suggested-by Gerd Hoffmann <[email protected]>
Signed-off-by Eric Engestrom <[email protected]>
--- include/uapi/drm/drm_fourcc.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
include/uapi/drm/drm_fourcc.h +10 -5
@@ -271,7 +271,8 @@ extern "C" {* sharing. It exists since on a given platform it does uniquely identify the * layout in a simple way for i915-specific userspace. */ -#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1) +#define DRM_FORMAT_MOD_INTEL_X_TILED fourcc_mod_code(INTEL, 1) +#define I915_FORMAT_MOD_X_TILED DRM_FORMAT_MOD_INTEL_X_TILED/* * Intel Y-tiling layout
@@ -286,7 +287,8 @@ extern "C" {* sharing. It exists since on a given platform it does uniquely identify the * layout in a simple way for i915-specific userspace. */ -#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2) +#define DRM_FORMAT_MOD_INTEL_Y_TILED fourcc_mod_code(INTEL, 2) +#define I915_FORMAT_MOD_Y_TILED DRM_FORMAT_MOD_INTEL_Y_TILED/* * Intel Yf-tiling layout
@@ -301,7 +303,8 @@ extern "C" {* 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width * in pixel depends on the pixel depth. */ -#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3) +#define DRM_FORMAT_MOD_INTEL_Yf_TILED fourcc_mod_code(INTEL, 3) +#define I915_FORMAT_MOD_Yf_TILED DRM_FORMAT_MOD_INTEL_Yf_TILED/* * Intel color control surface (CCS) for render compression
@@ -320,8 +323,10 @@ extern "C" {* But that fact is not relevant unless the memory is accessed * directly. */ -#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) -#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) +#define DRM_FORMAT_MOD_INTEL_Y_TILED_CCS fourcc_mod_code(INTEL, 4) +#define I915_FORMAT_MOD_Y_TILED_CCS DRM_FORMAT_MOD_INTEL_Y_TILED_CCS +#define DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) +#define I915_FORMAT_MOD_Yf_TILED_CCS DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
Signature · 2 lines
Cheers, Eric
PATCH 2/2 i915: rename modifiers to follow the naming convention
$ sed -i s/I915_FORMAT_MOD_/DRM_FORMAT_MOD_INTEL_/g $(git grep -l I915_FORMAT_MOD_) $ git checkout include/uapi/drm/drm_fourcc.h
Signed-off-by Eric Engestrom <[email protected]>
--- drivers/gpu/drm/i915/intel_atomic_plane.c | 12 +- drivers/gpu/drm/i915/intel_display.c | 128 +++++++++++----------- drivers/gpu/drm/i915/intel_pm.c | 26 ++--- drivers/gpu/drm/i915/intel_sprite.c | 58 +++++----- 4 files changed, 112 insertions(+), 112 deletions(-)
drivers/gpu/drm/i915/intel_atomic_plane.c +6 -6
@@ -126,8 +126,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_if (state->fb &&drm_rotation_90_or_270 (state->rotation)) {struct drm_format_name_buf format_name; -if (state->fb->modifier !=I915_FORMAT_MOD_Y_TILED && - state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) { +if (state->fb->modifier !=DRM_FORMAT_MOD_INTEL_Y_TILED && + state->fb->modifier != DRM_FORMAT_MOD_INTEL_Yf_TILED) {DRM_DEBUG_KMS ("Y/Yf tiling required for 90/270!\n" );return -EINVAL ; }
@@ -169,10 +169,10 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_*/ if (state->fb &&INTEL_GEN (dev_priv) >=9 && crtc_state->base.enable && adjusted_mode->flags &DRM_MODE_FLAG_INTERLACE ) { -if (state->fb->modifier ==I915_FORMAT_MOD_Y_TILED || - state->fb->modifier == I915_FORMAT_MOD_Yf_TILED || - state->fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || - state->fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS) { +if (state->fb->modifier ==DRM_FORMAT_MOD_INTEL_Y_TILED || + state->fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED || + state->fb->modifier ==DRM_FORMAT_MOD_INTEL_Y_TILED_CCS || + state->fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }
drivers/gpu/drm/i915/intel_display.c +64 -64
323 lines not on this page · raw message
drivers/gpu/drm/i915/intel_pm.c +13 -13
@@ -3757,7 +3757,7 @@ bool intel_can_enable_sagv(struct drm_atomic_state *state)if (skl_needs_memory_bw_wa (intel_state) && plane->base.state->fb->modifier == -I915_FORMAT_MOD_X_TILED ) +DRM_FORMAT_MOD_INTEL_X_TILED ) latency +=15 ;/*
@@ -4233,10 +4233,10 @@ skl_ddb_min_alloc(const struct drm_plane_state *pstate, const int plane)return 0 ;/* For Non Y-tile return 8-blocks */ -if (fb->modifier !=I915_FORMAT_MOD_Y_TILED && - fb->modifier != I915_FORMAT_MOD_Yf_TILED && - fb->modifier !=I915_FORMAT_MOD_Y_TILED_CCS && - fb->modifier != I915_FORMAT_MOD_Yf_TILED_CCS) +if (fb->modifier !=DRM_FORMAT_MOD_INTEL_Y_TILED && + fb->modifier != DRM_FORMAT_MOD_INTEL_Yf_TILED && + fb->modifier !=DRM_FORMAT_MOD_INTEL_Y_TILED_CCS && + fb->modifier != DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS)return 8 ;/*
@@ -4531,13 +4531,13 @@ skl_compute_plane_wm_params(const struct drm_i915_private *dev_priv,return -EINVAL ; } - wp->y_tiled = fb->modifier ==I915_FORMAT_MOD_Y_TILED || - fb->modifier == I915_FORMAT_MOD_Yf_TILED || - fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS; - wp->x_tiled = fb->modifier ==I915_FORMAT_MOD_X_TILED ; - wp->rc_surface = fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS; + wp->y_tiled = fb->modifier ==DRM_FORMAT_MOD_INTEL_Y_TILED || + fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED || + fb->modifier ==DRM_FORMAT_MOD_INTEL_Y_TILED_CCS || + fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS; + wp->x_tiled = fb->modifier ==DRM_FORMAT_MOD_INTEL_X_TILED ; + wp->rc_surface = fb->modifier ==DRM_FORMAT_MOD_INTEL_Y_TILED_CCS || + fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS; wp->is_planar = fb->format->format ==DRM_FORMAT_NV12 ;if (plane->id ==PLANE_CURSOR ) {
@@ -4559,7 +4559,7 @@ skl_compute_plane_wm_params(const struct drm_i915_private *dev_priv, intel_pstate);if (INTEL_GEN (dev_priv) >=11 && - fb->modifier == I915_FORMAT_MOD_Yf_TILED && wp->cpp ==8 ) + fb->modifier == DRM_FORMAT_MOD_INTEL_Yf_TILED && wp->cpp ==8 ) wp->dbuf_block_size =256 ;else wp->dbuf_block_size =512 ;
drivers/gpu/drm/i915/intel_sprite.c +29 -29
164 lines not on this page · raw message
Signature · 7 lines
Cheers, Eric _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Eric Engestrom
All the other vendors use the format DRM_FORMAT_MOD_{SAMSUNG,QCOM,VIVANTE,NVIDIA,BROADCOM,ARM}_* for their modifiers, except Intel.
Suggested-by Gerd Hoffmann <[email protected]>Signed-off-by Eric Engestrom <[email protected]>
I think it'd be good to add why you want this (easier to parse in tooling, or something like that was what you said on irc). With that addressed,
Probably best if you get i915 maintainers to merge both through drm-intel. -Daniel
Quoted 55 lines
--- include/uapi/drm/drm_fourcc.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)include/uapi/drm/drm_fourcc.h +10
-5@@ -271,7 +271,8 @@ extern "C" {* sharing. It exists since on a given platform it does uniquely identify the * layout in a simple way for i915-specific userspace. */ -#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1) +#define DRM_FORMAT_MOD_INTEL_X_TILED fourcc_mod_code(INTEL, 1) +#define I915_FORMAT_MOD_X_TILED DRM_FORMAT_MOD_INTEL_X_TILED/* * Intel Y-tiling layout @@ -286,7 +287,8 @@ extern "C" {* sharing. It exists since on a given platform it does uniquely identify the * layout in a simple way for i915-specific userspace. */ -#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2) +#define DRM_FORMAT_MOD_INTEL_Y_TILED fourcc_mod_code(INTEL, 2) +#define I915_FORMAT_MOD_Y_TILED DRM_FORMAT_MOD_INTEL_Y_TILED/* * Intel Yf-tiling layout @@ -301,7 +303,8 @@ extern "C" {* 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width * in pixel depends on the pixel depth. */ -#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3) +#define DRM_FORMAT_MOD_INTEL_Yf_TILED fourcc_mod_code(INTEL, 3) +#define I915_FORMAT_MOD_Yf_TILED DRM_FORMAT_MOD_INTEL_Yf_TILED/* * Intel color control surface (CCS) for render compression @@ -320,8 +323,10 @@ extern "C" {* But that fact is not relevant unless the memory is accessed * directly. */ -#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) -#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) +#define DRM_FORMAT_MOD_INTEL_Y_TILED_CCS fourcc_mod_code(INTEL, 4) +#define I915_FORMAT_MOD_Y_TILED_CCS DRM_FORMAT_MOD_INTEL_Y_TILED_CCS +#define DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) +#define I915_FORMAT_MOD_Yf_TILED_CCS DRM_FORMAT_MOD_INTEL_Yf_TILED_CCS/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks Signature · 2 lines
Cheers, Eric
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch