[igt-dev] [PATCH v6 1/3] Format modifier for Intel Gen-12 render compression

Imre Deak imre.deak at intel.com
Thu Nov 14 18:17:32 UTC 2019


On Thu, Nov 14, 2019 at 11:44:01AM +0200, Mika Kahola wrote:
> From: Mika Kahola <mika.kahola at intel.com>
> 
> Gen-12 has a new compression format for render compression.
> For this, a new modifier is needed to indicate that.
> 
> Signed-off-by: Mika Kahola <mika.kahola at intel.com>
> Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
> ---
>  include/drm-uapi/drm_fourcc.h | 1 +
>  lib/ioctl_wrappers.h          | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h
> index 3feeaa3f..b93eb2d4 100644
> --- a/include/drm-uapi/drm_fourcc.h
> +++ b/include/drm-uapi/drm_fourcc.h
> @@ -409,6 +409,7 @@ extern "C" {
>   */
>  #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 I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6)

Isn't this synced from the kernel once added there and here we should
only add the local version (and use only that one for now)?

I wonder what's the reason for adding a new format for this and not
reuse I915_FORMAT_MOD_Y_TILED_CCS. But for now we can go with that.

>  
>  /*
>   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
> diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> index 03211c97..f2412d78 100644
> --- a/lib/ioctl_wrappers.h
> +++ b/lib/ioctl_wrappers.h
> @@ -200,6 +200,7 @@ struct local_drm_mode_fb_cmd2 {
>  #define LOCAL_I915_FORMAT_MOD_Yf_TILED	local_fourcc_mod_code(INTEL, 3)
>  #define LOCAL_I915_FORMAT_MOD_Y_TILED_CCS	local_fourcc_mod_code(INTEL, 4)
>  #define LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS	local_fourcc_mod_code(INTEL, 5)
> +#define LOCAL_I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6)
>  
>  #define LOCAL_DRM_IOCTL_MODE_ADDFB2	DRM_IOWR(0xB8, \
>  						 struct local_drm_mode_fb_cmd2)
> -- 
> 2.17.1
> 


More information about the igt-dev mailing list