Clear Color Support for TGL Render Decompression
v7 cover Clear Color Support for TGL Render Decompression
Support for Clear Color is contained in the last two patches submitted by Radhakrishna Sripada. The first 5 patches are currently undergoing review/revision changes. The first 5 patches are cherry-picked from the series
https://patchwork.freedesktop.org/series/67078/
Expecting feedback for the last patch. The series is tested with kms_cube and custom Mesa branch by Nanley. This series is rebased on latest drm-tip and omitted Media compression patches from previous rev.
Dhinakaran Pandiyan (5):
drm/framebuffer: Format modifier for Intel Gen-12 render compression drm/i915: Use intel_tile_height() instead of re-implementing drm/i915: Move CCS stride alignment W/A inside
intel_fb_stride_alignment
drm/i915/tgl: Gen-12 render decompression
drm/i915: Extract framebufer CCS offset checks into a function
Radhakrishna Sripada (2):
drm/framebuffer/tgl: Format modifier for Intel Gen 12 render
compression with Clear Color
drm/i915/tgl: Add Clear Color support for TGL Render Decompression
drivers/gpu/drm/i915/display/intel_display.c | 231 +++++++++++++----- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 31 ++- drivers/gpu/drm/i915/i915_reg.h | 13 + include/uapi/drm/drm_fourcc.h | 30 +++ 5 files changed, 244 insertions(+), 64 deletions(-)
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 1/7 drm/framebuffer: Format modifier for Intel Gen-12 render compression
From: Dhinakaran Pandiyan <[email protected]>
Gen-12 has a new compression format, add a new modifier to indicate that.
--- include/uapi/drm/drm_fourcc.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
include/uapi/drm/drm_fourcc.h +11 -0
@@ -410,6 +410,17 @@ 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) +/* +* Intel color control surfaces (CCS) for Gen-12 render compression. +* +* The main surface is Y-tiled and at plane index 0, the CCS is linear and +* at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in +* main surface. In other words, 4 bits in CCS map to a main surface cache +* line pair. The main surface pitch is required to be a multiple of four +* Y-tile widths. +*/ +#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks *
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 1/7] drm/framebuffer: Format modifier for Intel Gen-12 render compression
Quoted 10 lines · Radhakrishna Sripada
From: Dhinakaran Pandiyan <[email protected]>
Gen-12 has a new compression format, add a new modifier to indicate that.
Cc Ville Syrjälä <[email protected]>Cc Matt Roper <[email protected]>Cc Nanley G Chery <[email protected]>Cc Jason Ekstrand <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 33 lines
--- include/uapi/drm/drm_fourcc.h | 11 +++++++++++ 1 file changed, 11 insertions(+)include/uapi/drm/drm_fourcc.h +11
-0@@ -410,6 +410,17 @@ 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) +/* +* Intel color control surfaces (CCS) for Gen-12 render compression. +* +* The main surface is Y-tiled and at plane index 0, the CCS is linear and +* at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in +* main surface. In other words, 4 bits in CCS map to a main surface cache +* line pair. The main surface pitch is required to be a multiple of four +* Y-tile widths. +*/ +#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks * Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 2/7 drm/i915: Use intel_tile_height() instead of re-implementing
In reply to Radhakrishna SripadaFrom: Dhinakaran Pandiyan <[email protected]>
intel_tile_dims() computes tile height using size and width, when there is already a function to do just that - intel_tile_height()
--- drivers/gpu/drm/i915/display/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
@@ -2017,7 +2017,7 @@ static void intel_tile_dims(const struct drm_framebuffer *fb, int color_plane,unsigned int cpp = fb->format->cpp[color_plane]; *tile_width = tile_width_bytes / cpp; - *tile_height =intel_tile_size (to_i915 (fb->dev)) / tile_width_bytes; + *tile_height =intel_tile_height (fb, color_plane); }unsigned int
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 2/7] drm/i915: Use intel_tile_height() instead of re-implementing
Quoted 7 lines · Radhakrishna Sripada
From: Dhinakaran Pandiyan <[email protected]>
intel_tile_dims()computes tile height using size and width, when there is already a function to do just that -intel_tile_height()Cc Ville Syrjälä <[email protected]>Cc Matt Roper <[email protected]>
Quoted 25 lines
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_display.c +1
-1@@ -2017,7 +2017,7 @@ static void intel_tile_dims(const struct drm_framebuffer *fb, int color_plane,unsigned int cpp = fb->format->cpp[color_plane]; *tile_width = tile_width_bytes / cpp; - *tile_height =intel_tile_size (to_i915 (fb->dev)) / tile_width_bytes; + *tile_height =intel_tile_height (fb, color_plane); }unsigned int Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 3/7 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment
In reply to Radhakrishna SripadaFrom: Dhinakaran Pandiyan <[email protected]>
Easier to read if all the alignment changes are in one place and contained within a function.
--- drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +16 -15
@@ -2611,7 +2611,22 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)else return 64 ; }else { -return intel_tile_width_bytes (fb, color_plane); +u32 tile_width =intel_tile_width_bytes (fb, color_plane); + +/* +* Display WA #0531: skl,bxt,kbl,glk +* +* Render decompression and plane width > 3840 +* combined with horizontal panning requires the +* plane stride to be a multiple of 4. We'll just +* require the entire fb to accommodate that to avoid +* potential runtime errors at plane configuration time. +*/ +if (IS_GEN (dev_priv,9 ) &&is_ccs_modifier (fb->modifier) && + color_plane ==0 && fb->width >3840 ) + tile_width *=4 ; + +return tile_width; } }
@@ -16463,20 +16478,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, } stride_alignment =intel_fb_stride_alignment (fb, i); - -/* -* Display WA #0531: skl,bxt,kbl,glk -* -* Render decompression and plane width > 3840 -* combined with horizontal panning requires the -* plane stride to be a multiple of 4. We'll just -* require the entire fb to accommodate that to avoid -* potential runtime errors at plane configuration time. -*/ -if (IS_GEN (dev_priv,9 ) && i ==0 && fb->width >3840 && -is_ccs_modifier (fb->modifier)) - stride_alignment *=4 ; -if (fb->pitches[i] & (stride_alignment -1 )) {DRM_DEBUG_KMS ("plane %d pitch (%d) must be at least %u byte aligned\n" , i, fb->pitches[i], stride_alignment);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 3/7] drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment
Quoted 7 lines · Radhakrishna Sripada
From: Dhinakaran Pandiyan <[email protected]>
Easier to read if all the alignment changes are in one place and contained within a function.
Cc Ville Syrjälä <[email protected]>Cc Matt Roper <[email protected]>
Quoted 61 lines
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +16
-15@@ -2611,7 +2611,22 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)else return 64 ; }else { -return intel_tile_width_bytes (fb, color_plane); +u32 tile_width =intel_tile_width_bytes (fb, color_plane); + +/* +* Display WA #0531: skl,bxt,kbl,glk +* +* Render decompression and plane width > 3840 +* combined with horizontal panning requires the +* plane stride to be a multiple of 4. We'll just +* require the entire fb to accommodate that to avoid +* potential runtime errors at plane configuration time. +*/ +if (IS_GEN (dev_priv,9 ) &&is_ccs_modifier (fb->modifier) && + color_plane ==0 && fb->width >3840 ) + tile_width *=4 ; + +return tile_width; } }@@ -16463,20 +16478,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, } stride_alignment =intel_fb_stride_alignment (fb, i); - -/* -* Display WA #0531: skl,bxt,kbl,glk -* -* Render decompression and plane width > 3840 -* combined with horizontal panning requires the -* plane stride to be a multiple of 4. We'll just -* require the entire fb to accommodate that to avoid -* potential runtime errors at plane configuration time. -*/ -if (IS_GEN (dev_priv,9 ) && i ==0 && fb->width >3840 && -is_ccs_modifier (fb->modifier)) - stride_alignment *=4 ; -if (fb->pitches[i] & (stride_alignment -1 )) {DRM_DEBUG_KMS ("plane %d pitch (%d) must be at least %u byte aligned\n" , i, fb->pitches[i], stride_alignment);Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 4/7 drm/i915/tgl: Gen-12 render decompression
In reply to Radhakrishna SripadaFrom: Dhinakaran Pandiyan <[email protected]>
Gen-12 display decompression operates on Y-tiled compressed main surface. The CCS is linear and has 4 bits of metadata for each main surface cache line pair, a size ratio of 1:256. Gen-12 display decompression is incompatible with buffers compressed by earlier GPUs, so make use of a new modifier to identify gen-12 compression. Another notable change is that render decompression is supported on all planes except cursor and on all pipes. Start by adding render decompression support for [A,X]BGR888 pixel formats.
v2: Fix checkpatch warnings (Lucas)
v3:
Rebase, disable color clear, styling changes and modify intel_tile_width_bytes and intel_tile_height to handle linear CCS
--- drivers/gpu/drm/i915/display/intel_display.c | 85 ++++++++++++++++---- drivers/gpu/drm/i915/display/intel_sprite.c | 23 ++++-- drivers/gpu/drm/i915/i915_reg.h | 1 + 3 files changed, 84 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +68 -17
@@ -1971,6 +1971,10 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 128 ;/* fall through */ +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +if (color_plane ==1 ) +return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;
@@ -2004,8 +2008,15 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)static unsigned int intel_tile_height (const struct drm_framebuffer *fb,int color_plane) { -return intel_tile_size (to_i915 (fb->dev)) / -intel_tile_width_bytes (fb, color_plane); +switch (fb->modifier) { +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +if (color_plane ==1 ) +return 1 ; +/* fall through */ +default : +return intel_tile_size (to_i915 (fb->dev)) / +intel_tile_width_bytes (fb, color_plane); + } }/* Return the tile dimensions in pixel units */
@@ -2104,6 +2115,8 @@ static unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,if (INTEL_GEN (dev_priv) >=9 )return 256 *1024 ;return 0 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:case I915_FORMAT_MOD_Y_TILED :
@@ -2300,7 +2313,8 @@ static u32 intel_adjust_tile_offset(int *x, int *y,static bool is_surface_linear (u64 modifier,int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR ; +return modifier ==DRM_FORMAT_MOD_LINEAR || + (modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS && color_plane ==1 ); } static u32 intel_adjust_aligned_offset(int *x, int *y,
@@ -2487,6 +2501,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)return I915_TILING_X ;case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS :return I915_TILING_Y ;default :return I915_TILING_NONE ;
@@ -2507,7 +2522,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)* us a ratio of one byte in the CCS for each 8x16 pixels in the * main surface. */ -static const struct drm_format_info ccs_formats[] = { +static const struct drm_format_info skl_ccs_formats[] = { { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , .cpp = {4 ,1 , }, .hsub =8 , .vsub =16 , }, { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 ,
@@ -2518,6 +2533,24 @@ static const struct drm_format_info ccs_formats[] = { .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, .has_alpha = true, }, }; +/* +* Gen-12 compression uses 4 bits of CCS data for each cache line pair in the +* main surface. And each 64B CCS cache line represents an area of 4x1 Y-tiles +* in the main surface. With 4 byte pixels and each Y-tile having dimensions of +* 32x32 pixels, the ratio turns out to 1B in the CCS for every 2x32 pixels in +* the main surface. +*/ +static const struct drm_format_info gen12_ccs_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)
@@ -2538,8 +2571,12 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)switch (cmd->modifier[0 ]) {case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS: -return lookup_format_info (ccs_formats, -ARRAY_SIZE (ccs_formats), +return lookup_format_info (skl_ccs_formats, +ARRAY_SIZE (skl_ccs_formats), + cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return lookup_format_info (gen12_ccs_formats, +ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format);default :return NULL ;
@@ -2548,7 +2585,8 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)bool is_ccs_modifier (u64 modifier) { -return modifier ==I915_FORMAT_MOD_Y_TILED_CCS || +return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; }
@@ -2596,8 +2634,9 @@ static u32 intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane) {struct drm_i915_private *dev_priv =to_i915 (fb->dev); +u32 tile_width; -if (fb->modifier ==DRM_FORMAT_MOD_LINEAR ) { +if (is_surface_linear (fb->modifier, color_plane)) {u32 max_stride =intel_plane_fb_max_stride (dev_priv, fb->format->format, fb->modifier);
@@ -2606,13 +2645,14 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)* To make remapping with linear generally feasible * we need the stride to be page aligned. */ -if (fb->pitches[color_plane] > max_stride) +if (fb->pitches[color_plane] > max_stride && !is_ccs_modifier (fb->modifier))return intel_tile_size (dev_priv);else return 64 ; - }else { -u32 tile_width =intel_tile_width_bytes (fb, color_plane); + } + tile_width =intel_tile_width_bytes (fb, color_plane); +if (is_ccs_modifier (fb->modifier) && color_plane ==0 ) {/* * Display WA #0531: skl,bxt,kbl,glk *
@@ -2622,12 +2662,16 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)* require the entire fb to accommodate that to avoid * potential runtime errors at plane configuration time. */ -if (IS_GEN (dev_priv,9 ) &&is_ccs_modifier (fb->modifier) && - color_plane ==0 && fb->width >3840 ) +if (IS_GEN (dev_priv,9 ) && fb->width >3840 ) + tile_width *=4 ; +/* +* The main surface pitch must be padded to a multiple of four +* tile widths. +*/ +else if (INTEL_GEN (dev_priv) >=12 ) tile_width *=4 ; - -return tile_width; } +return tile_width; }bool intel_plane_can_remap (const struct intel_plane_state *plane_state)
@@ -2736,6 +2780,7 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,int ccs_x, ccs_y;intel_tile_dims (fb, i, &tile_width, &tile_height); + tile_width *= hsub; tile_height *= vsub;
@@ -4112,7 +4157,7 @@ static unsigned int skl_plane_stride_mult(const struct drm_framebuffer *fb,* The stride is either expressed as a multiple of 64 bytes chunks for * linear buffers or in number of tiles for tiled buffers. */ -if (fb->modifier ==DRM_FORMAT_MOD_LINEAR ) +if (is_surface_linear (fb->modifier, color_plane))return 64 ;else if (drm_rotation_90_or_270 (rotation))return intel_tile_height (fb, color_plane);
@@ -4240,6 +4285,10 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS :return PLANE_CTL_TILED_Y |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return PLANE_CTL_TILED_Y | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ;case I915_FORMAT_MOD_Yf_TILED:return PLANE_CTL_TILED_YF ;case I915_FORMAT_MOD_Yf_TILED_CCS:
@@ -10074,7 +10123,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,case PLANE_CTL_TILED_Y : plane_config->tiling =I915_TILING_Y ;if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) - fb->modifier =I915_FORMAT_MOD_Y_TILED_CCS ; + fb->modifier =INTEL_GEN (dev_priv) >=12 ? +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +I915_FORMAT_MOD_Y_TILED_CCS ;else fb->modifier =I915_FORMAT_MOD_Y_TILED ;break ;
drivers/gpu/drm/i915/display/intel_sprite.c +15 -8
@@ -583,6 +583,7 @@ skl_program_plane(struct intel_plane *plane,const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;u32 surf_addr = plane_state->color_plane[color_plane].offset;u32 stride =skl_plane_stride (plane_state, color_plane); +u32 aux_dist = plane_state->color_plane[1 ].offset - surf_addr;u32 aux_stride =skl_plane_stride (plane_state,1 );int crtc_x = plane_state->uapi.dst.x1;int crtc_y = plane_state->uapi.dst.y1;
@@ -624,8 +625,10 @@ skl_program_plane(struct intel_plane *plane,I915_WRITE_FW (PLANE_STRIDE (pipe, plane_id), stride);I915_WRITE_FW (PLANE_POS (pipe, plane_id), (crtc_y <<16 ) | crtc_x);I915_WRITE_FW (PLANE_SIZE (pipe, plane_id), (src_h <<16 ) | src_w); -I915_WRITE_FW (PLANE_AUX_DIST (pipe, plane_id), - (plane_state->color_plane[1 ].offset - surf_addr) | aux_stride); + +if (INTEL_GEN (dev_priv) <12 ) + aux_dist |= aux_stride; +I915_WRITE_FW (PLANE_AUX_DIST (pipe, plane_id), aux_dist);if (icl_is_hdr_plane (dev_priv, plane_id))I915_WRITE_FW (PLANE_CUS_CTL (pipe, plane_id), plane_state->cus_ctl);
@@ -2102,7 +2105,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, (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)) { + fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }
@@ -2573,7 +2577,8 @@ static const u64 skl_plane_format_modifiers_ccs[] = {DRM_FORMAT_MOD_INVALID }; -static const u64 gen12_plane_format_modifiers_noccs[] = { +static const u64 gen12_plane_format_modifiers_ccs[] = { +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,DRM_FORMAT_MOD_LINEAR ,
@@ -2744,6 +2749,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS :break ;default :return false;
@@ -2754,6 +2760,9 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_XBGR8888 :case DRM_FORMAT_ARGB8888 :case DRM_FORMAT_ABGR8888 : +if (is_ccs_modifier (modifier)) +return true; +/* fall through */ case DRM_FORMAT_RGB565 :case DRM_FORMAT_XRGB2101010 :case DRM_FORMAT_XBGR2101010 :
@@ -2963,13 +2972,11 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv, formats =skl_get_plane_formats (dev_priv, pipe, plane_id, &num_formats); + plane->has_ccs =skl_plane_has_ccs (dev_priv, pipe, plane_id);if (INTEL_GEN (dev_priv) >=12 ) { -/* TODO: Implement support for gen-12 CCS modifiers */ - plane->has_ccs = false; - modifiers = gen12_plane_format_modifiers_noccs; + modifiers = gen12_plane_format_modifiers_ccs; plane_funcs = &gen12_plane_funcs; }else { - plane->has_ccs =skl_plane_has_ccs (dev_priv, pipe, plane_id);if (plane->has_ccs) modifiers = skl_plane_format_modifiers_ccs;else
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6800,6 +6800,7 @@ enum {#define PLANE_CTL_YUV422_VYUY (3 << 16)#define PLANE_CTL_RENDER_DECOMPRESSION_ENABLE (1 << 15)#define PLANE_CTL_TRICKLE_FEED_DISABLE (1 << 14) +#define PLANE_CTL_CLEAR_COLOR_DISABLE (1 << 13)/* TGL+ */ #define PLANE_CTL_PLANE_GAMMA_DISABLE (1 << 13)/* Pre-GLK */ #define PLANE_CTL_TILED_MASK (0x7 << 10)#define PLANE_CTL_TILED_LINEAR (0 << 10)
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 4/7] drm/i915/tgl: Gen-12 render decompression
Quoted 16 lines · Radhakrishna Sripada
From: Dhinakaran Pandiyan <[email protected]>
Gen-12 display decompression operates on Y-tiled compressed main surface. The CCS is linear and has 4 bits of metadata for each main surface cache line pair, a size ratio of 1:256. Gen-12 display decompression is incompatible with buffers compressed by earlier GPUs, so make use of a new modifier to identify gen-12 compression. Another notable change is that render decompression is supported on all planes except cursor and on all pipes. Start by adding render decompression support for [A,X]BGR888 pixel formats.
v2: Fix checkpatch warnings (Lucas)
v3:
Rebase, disable color clear, styling changes and modifyintel_tile_width_bytesandintel_tile_heightto handle linear CCS
Quoted 4 lines
Cc Ville Syrjälä <[email protected]>Cc Matt Roper <[email protected]>Cc Nanley G Chery <[email protected]>Cc Jason Ekstrand <[email protected]>
Quoted 314 lines
Signed-off-by Dhinakaran Pandiyan <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 85 ++++++++++++++++---- drivers/gpu/drm/i915/display/intel_sprite.c | 23 ++++-- drivers/gpu/drm/i915/i915_reg.h | 1 + 3 files changed, 84 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +68
-17@@ -1971,6 +1971,10 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 128 ;/* fall through */ +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +if (color_plane ==1 ) +return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;@@ -2004,8 +2008,15 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)static unsigned int intel_tile_height (const struct drm_framebuffer *fb,int color_plane) { -return intel_tile_size (to_i915 (fb->dev)) / -intel_tile_width_bytes (fb, color_plane); +switch (fb->modifier) { +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +if (color_plane ==1 ) +return 1 ; +/* fall through */ +default : +return intel_tile_size (to_i915 (fb->dev)) / +intel_tile_width_bytes (fb, color_plane); + } }/* Return the tile dimensions in pixel units */ @@ -2104,6 +2115,8 @@ static unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,if (INTEL_GEN (dev_priv) >=9 )return 256 *1024 ;return 0 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:case I915_FORMAT_MOD_Y_TILED :@@ -2300,7 +2313,8 @@ static u32 intel_adjust_tile_offset(int *x, int *y,static bool is_surface_linear (u64 modifier,int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR ; +return modifier ==DRM_FORMAT_MOD_LINEAR || + (modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS && color_plane ==1 ); } static u32 intel_adjust_aligned_offset(int *x, int *y,@@ -2487,6 +2501,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)return I915_TILING_X ;case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS :return I915_TILING_Y ;default :return I915_TILING_NONE ;@@ -2507,7 +2522,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)* us a ratio of one byte in the CCS for each 8x16 pixels in the * main surface. */ -static const struct drm_format_info ccs_formats[] = { +static const struct drm_format_info skl_ccs_formats[] = { { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , .cpp = {4 ,1 , }, .hsub =8 , .vsub =16 , }, { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 ,@@ -2518,6 +2533,24 @@ static const struct drm_format_info ccs_formats[] = { .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, .has_alpha = true, }, }; +/* +* Gen-12 compression uses 4 bits of CCS data for each cache line pair in the +* main surface. And each 64B CCS cache line represents an area of 4x1 Y-tiles +* in the main surface. With 4 byte pixels and each Y-tile having dimensions of +* 32x32 pixels, the ratio turns out to 1B in the CCS for every 2x32 pixels in +* the main surface. +*/ +static const struct drm_format_info gen12_ccs_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .cpp = {4 ,1 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)@@ -2538,8 +2571,12 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)switch (cmd->modifier[0 ]) {case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS: -return lookup_format_info (ccs_formats, -ARRAY_SIZE (ccs_formats), +return lookup_format_info (skl_ccs_formats, +ARRAY_SIZE (skl_ccs_formats), + cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return lookup_format_info (gen12_ccs_formats, +ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format);default :return NULL ;@@ -2548,7 +2585,8 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)bool is_ccs_modifier (u64 modifier) { -return modifier ==I915_FORMAT_MOD_Y_TILED_CCS || +return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; }@@ -2596,8 +2634,9 @@ static u32 intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane) {struct drm_i915_private *dev_priv =to_i915 (fb->dev); +u32 tile_width; -if (fb->modifier ==DRM_FORMAT_MOD_LINEAR ) { +if (is_surface_linear (fb->modifier, color_plane)) {u32 max_stride =intel_plane_fb_max_stride (dev_priv, fb->format->format, fb->modifier);@@ -2606,13 +2645,14 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)* To make remapping with linear generally feasible * we need the stride to be page aligned. */ -if (fb->pitches[color_plane] > max_stride) +if (fb->pitches[color_plane] > max_stride && !is_ccs_modifier (fb->modifier))return intel_tile_size (dev_priv);else return 64 ; - }else { -u32 tile_width =intel_tile_width_bytes (fb, color_plane); + } + tile_width =intel_tile_width_bytes (fb, color_plane); +if (is_ccs_modifier (fb->modifier) && color_plane ==0 ) {/* * Display WA #0531: skl,bxt,kbl,glk * @@ -2622,12 +2662,16 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)* require the entire fb to accommodate that to avoid * potential runtime errors at plane configuration time. */ -if (IS_GEN (dev_priv,9 ) &&is_ccs_modifier (fb->modifier) && - color_plane ==0 && fb->width >3840 ) +if (IS_GEN (dev_priv,9 ) && fb->width >3840 ) + tile_width *=4 ; +/* +* The main surface pitch must be padded to a multiple of four +* tile widths. +*/ +else if (INTEL_GEN (dev_priv) >=12 ) tile_width *=4 ; - -return tile_width; } +return tile_width; }bool intel_plane_can_remap (const struct intel_plane_state *plane_state)@@ -2736,6 +2780,7 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,int ccs_x, ccs_y;intel_tile_dims (fb, i, &tile_width, &tile_height); + tile_width *= hsub; tile_height *= vsub;@@ -4112,7 +4157,7 @@ static unsigned int skl_plane_stride_mult(const struct drm_framebuffer *fb,* The stride is either expressed as a multiple of 64 bytes chunks for * linear buffers or in number of tiles for tiled buffers. */ -if (fb->modifier ==DRM_FORMAT_MOD_LINEAR ) +if (is_surface_linear (fb->modifier, color_plane))return 64 ;else if (drm_rotation_90_or_270 (rotation))return intel_tile_height (fb, color_plane);@@ -4240,6 +4285,10 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS :return PLANE_CTL_TILED_Y |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return PLANE_CTL_TILED_Y | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ;case I915_FORMAT_MOD_Yf_TILED:return PLANE_CTL_TILED_YF ;case I915_FORMAT_MOD_Yf_TILED_CCS:@@ -10074,7 +10123,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,case PLANE_CTL_TILED_Y : plane_config->tiling =I915_TILING_Y ;if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) - fb->modifier =I915_FORMAT_MOD_Y_TILED_CCS ; + fb->modifier =INTEL_GEN (dev_priv) >=12 ? +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +I915_FORMAT_MOD_Y_TILED_CCS ;else fb->modifier =I915_FORMAT_MOD_Y_TILED ;break ;drivers/gpu/drm/i915/display/intel_sprite.c +15
-8@@ -583,6 +583,7 @@ skl_program_plane(struct intel_plane *plane,const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;u32 surf_addr = plane_state->color_plane[color_plane].offset;u32 stride =skl_plane_stride (plane_state, color_plane); +u32 aux_dist = plane_state->color_plane[1 ].offset - surf_addr;u32 aux_stride =skl_plane_stride (plane_state,1 );int crtc_x = plane_state->uapi.dst.x1;int crtc_y = plane_state->uapi.dst.y1;@@ -624,8 +625,10 @@ skl_program_plane(struct intel_plane *plane,I915_WRITE_FW (PLANE_STRIDE (pipe, plane_id), stride);I915_WRITE_FW (PLANE_POS (pipe, plane_id), (crtc_y <<16 ) | crtc_x);I915_WRITE_FW (PLANE_SIZE (pipe, plane_id), (src_h <<16 ) | src_w); -I915_WRITE_FW (PLANE_AUX_DIST (pipe, plane_id), - (plane_state->color_plane[1 ].offset - surf_addr) | aux_stride); + +if (INTEL_GEN (dev_priv) <12 ) + aux_dist |= aux_stride; +I915_WRITE_FW (PLANE_AUX_DIST (pipe, plane_id), aux_dist);if (icl_is_hdr_plane (dev_priv, plane_id))I915_WRITE_FW (PLANE_CUS_CTL (pipe, plane_id), plane_state->cus_ctl);@@ -2102,7 +2105,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, (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)) { + fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }@@ -2573,7 +2577,8 @@ static const u64 skl_plane_format_modifiers_ccs[] = {DRM_FORMAT_MOD_INVALID }; -static const u64 gen12_plane_format_modifiers_noccs[] = { +static const u64 gen12_plane_format_modifiers_ccs[] = { +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,DRM_FORMAT_MOD_LINEAR ,@@ -2744,6 +2749,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS :break ;default :return false;@@ -2754,6 +2760,9 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_XBGR8888 :case DRM_FORMAT_ARGB8888 :case DRM_FORMAT_ABGR8888 : +if (is_ccs_modifier (modifier)) +return true; +/* fall through */ case DRM_FORMAT_RGB565 :case DRM_FORMAT_XRGB2101010 :case DRM_FORMAT_XBGR2101010 :@@ -2963,13 +2972,11 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv, formats =skl_get_plane_formats (dev_priv, pipe, plane_id, &num_formats); + plane->has_ccs =skl_plane_has_ccs (dev_priv, pipe, plane_id);if (INTEL_GEN (dev_priv) >=12 ) { -/* TODO: Implement support for gen-12 CCS modifiers */ - plane->has_ccs = false; - modifiers = gen12_plane_format_modifiers_noccs; + modifiers = gen12_plane_format_modifiers_ccs; plane_funcs = &gen12_plane_funcs; }else { - plane->has_ccs =skl_plane_has_ccs (dev_priv, pipe, plane_id);if (plane->has_ccs) modifiers = skl_plane_format_modifiers_ccs;else drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -6800,6 +6800,7 @@ enum {#define PLANE_CTL_YUV422_VYUY (3 << 16)#define PLANE_CTL_RENDER_DECOMPRESSION_ENABLE (1 << 15)#define PLANE_CTL_TRICKLE_FEED_DISABLE (1 << 14) +#define PLANE_CTL_CLEAR_COLOR_DISABLE (1 << 13)/* TGL+ */ #define PLANE_CTL_PLANE_GAMMA_DISABLE (1 << 13)/* Pre-GLK */ #define PLANE_CTL_TILED_MASK (0x7 << 10)#define PLANE_CTL_TILED_LINEAR (0 << 10)Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 5/7 drm/i915: Extract framebufer CCS offset checks into a function
In reply to Radhakrishna SripadaFrom: Dhinakaran Pandiyan <[email protected]>
intel_fill_fb_info() has grown quite large and wrapping the offset checks into a separate function makes the loop a bit easier to follow.
--- drivers/gpu/drm/i915/display/intel_display.c | 69 ++++++++++++-------- 1 file changed, 40 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +40 -29
@@ -2742,6 +2742,43 @@ static bool intel_plane_needs_remap(const struct intel_plane_state *plane_state)return stride > max_stride; } +static int +intel_fb_check_ccs_xy (struct drm_framebuffer *fb,int x,int y) +{ +struct intel_framebuffer *intel_fb =to_intel_framebuffer (fb); +int hsub = fb->format->hsub; +int vsub = fb->format->vsub; +int tile_width, tile_height; +int ccs_x, ccs_y; +int main_x, main_y; + +intel_tile_dims (fb,1 , &tile_width, &tile_height); + + tile_width *= hsub; + tile_height *= vsub; + + ccs_x = (x * hsub) % tile_width; + ccs_y = (y * vsub) % tile_height; + main_x = intel_fb->normal[0 ].x % tile_width; + main_y = intel_fb->normal[0 ].y % tile_height; + +/* +* CCS doesn't have its own x/y offset register, so the intra CCS tile +* x/y offsets must match between CCS and the main surface. +*/ +if (main_x != ccs_x || main_y != ccs_y) { +DRM_DEBUG_KMS ("Bad CCS x/y (main %d,%d ccs %d,%d) full (main %d,%d ccs %d,%d)\n" , + main_x, main_y, + ccs_x, ccs_y, + intel_fb->normal[0 ].x, + intel_fb->normal[0 ].y, + x, y); +return -EINVAL ; + } + +return 0 ; +} +static int intel_fill_fb_info (struct drm_i915_private *dev_priv,struct drm_framebuffer *fb)
@@ -2773,35 +2810,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, }if (is_ccs_modifier (fb->modifier) && i ==1 ) { -int hsub = fb->format->hsub; -int vsub = fb->format->vsub; -int tile_width, tile_height; -int main_x, main_y; -int ccs_x, ccs_y; - -intel_tile_dims (fb, i, &tile_width, &tile_height); - - tile_width *= hsub; - tile_height *= vsub; - - ccs_x = (x * hsub) % tile_width; - ccs_y = (y * vsub) % tile_height; - main_x = intel_fb->normal[0 ].x % tile_width; - main_y = intel_fb->normal[0 ].y % tile_height; - -/* -* CCS doesn't have its own x/y offset register, so the intra CCS tile -* x/y offsets must match between CCS and the main surface. -*/ -if (main_x != ccs_x || main_y != ccs_y) { -DRM_DEBUG_KMS ("Bad CCS x/y (main %d,%d ccs %d,%d) full (main %d,%d ccs %d,%d)\n" , - main_x, main_y, - ccs_x, ccs_y, - intel_fb->normal[0 ].x, - intel_fb->normal[0 ].y, - x, y); -return -EINVAL ; - } + ret =intel_fb_check_ccs_xy (fb, x, y); +if (ret) +return ret; }/*
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 5/7] drm/i915: Extract framebufer CCS offset checks into a function
Quoted 7 lines · Radhakrishna Sripada
From: Dhinakaran Pandiyan <[email protected]>
intel_fill_fb_info()has grown quite large and wrapping the offset checks into a separate function makes the loop a bit easier to follow.Cc Ville Syrjälä <[email protected]>Cc Matt Roper <[email protected]>
Quoted 99 lines
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 69 ++++++++++++-------- 1 file changed, 40 insertions(+), 29 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +40
-29@@ -2742,6 +2742,43 @@ static bool intel_plane_needs_remap(const struct intel_plane_state *plane_state)return stride > max_stride; } +static int +intel_fb_check_ccs_xy (struct drm_framebuffer *fb,int x,int y) +{ +struct intel_framebuffer *intel_fb =to_intel_framebuffer (fb); +int hsub = fb->format->hsub; +int vsub = fb->format->vsub; +int tile_width, tile_height; +int ccs_x, ccs_y; +int main_x, main_y; + +intel_tile_dims (fb,1 , &tile_width, &tile_height); + + tile_width *= hsub; + tile_height *= vsub; + + ccs_x = (x * hsub) % tile_width; + ccs_y = (y * vsub) % tile_height; + main_x = intel_fb->normal[0 ].x % tile_width; + main_y = intel_fb->normal[0 ].y % tile_height; + +/* +* CCS doesn't have its own x/y offset register, so the intra CCS tile +* x/y offsets must match between CCS and the main surface. +*/ +if (main_x != ccs_x || main_y != ccs_y) { +DRM_DEBUG_KMS ("Bad CCS x/y (main %d,%d ccs %d,%d) full (main %d,%d ccs %d,%d)\n" , + main_x, main_y, + ccs_x, ccs_y, + intel_fb->normal[0 ].x, + intel_fb->normal[0 ].y, + x, y); +return -EINVAL ; + } + +return 0 ; +} +static int intel_fill_fb_info (struct drm_i915_private *dev_priv,struct drm_framebuffer *fb)@@ -2773,35 +2810,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, }if (is_ccs_modifier (fb->modifier) && i ==1 ) { -int hsub = fb->format->hsub; -int vsub = fb->format->vsub; -int tile_width, tile_height; -int main_x, main_y; -int ccs_x, ccs_y; - -intel_tile_dims (fb, i, &tile_width, &tile_height); - - tile_width *= hsub; - tile_height *= vsub; - - ccs_x = (x * hsub) % tile_width; - ccs_y = (y * vsub) % tile_height; - main_x = intel_fb->normal[0 ].x % tile_width; - main_y = intel_fb->normal[0 ].y % tile_height; - -/* -* CCS doesn't have its own x/y offset register, so the intra CCS tile -* x/y offsets must match between CCS and the main surface. -*/ -if (main_x != ccs_x || main_y != ccs_y) { -DRM_DEBUG_KMS ("Bad CCS x/y (main %d,%d ccs %d,%d) full (main %d,%d ccs %d,%d)\n" , - main_x, main_y, - ccs_x, ccs_y, - intel_fb->normal[0 ].x, - intel_fb->normal[0 ].y, - x, y); -return -EINVAL ; - } + ret =intel_fb_check_ccs_xy (fb, x, y); +if (ret) +return ret; }/* Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 6/7 drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color
In reply to Radhakrishna SripadaGen12 display can decompress surfaces compressed by render engine with Clear Color, add a new modifier as the driver needs to know the surface was compressed by render engine.
V2: Description changes as suggested by Rafael.
V3: Mention the Clear Color size of 64 bits in the comments(DK)
v4: Fix trailing whitespaces
v5: Explain Clear Color in the documentation.
v6: Documentation Nitpicks(Nanley)
v7: Remove ambiguity in Clear Color structue explanation(Nanley)
--- include/uapi/drm/drm_fourcc.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
include/uapi/drm/drm_fourcc.h +19 -0
@@ -421,6 +421,25 @@ extern "C" {*/ #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) +/* +* Intel Color Control Surface with Clear Color (CCS) for Gen-12 render +* compression. +* +* The main surface is Y-tiled and is at plane index 0 whereas CCS is linear +* and at index 1. The clear color is stored at index 2, and the pitch should +* be ignored. The clear color structure is 256 bits. The first 128 bits +* represents Raw Clear Color Red, Green, Blue and Alpha color each represented +* by 32 bits. The 3D engine can use the raw clear color and the surface format +* to generate a converted clear color of size 64 bits. The first 32 bits store +* the Lower Converted Clear Color value and the next 32 bits store the Higher +* Converted Clear Color value when applicable. The Converted Clear Color values +* are consumed by the DE. The last 64 bits are used to store Color Discard +* Enable and Depth Clear Value Valid which are ignored by the DE. A CCS cache +* line corresponds to an area of 4x1 tiles in the main surface. The main +* surface pitch is required to be a multiple of 4 tile widths. +*/ +#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks *
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 7/7 drm/i915/tgl: Add Clear Color support for TGL Render Decompression
In reply to Radhakrishna SripadaRender Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix has_alpha flag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while running kms_cube
v4: Add alignment check and reuse the comments for ge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case in intel_tile_height(RK)
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +62 -2
@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 64 ;/* fall through */ +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;
@@ -2013,6 +2017,10 @@ intel_tile_height(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 1 ;/* fall through */ +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) /intel_tile_width_bytes (fb, color_plane);
@@ -2116,6 +2124,7 @@ static unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:
@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y,static bool is_surface_linear (u64 modifier,int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR || - (modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS && color_plane ==1 ); +switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y,
@@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return I915_TILING_Y ;default :return I915_TILING_NONE ;
@@ -2551,6 +2569,21 @@ static const struct drm_format_info gen12_ccs_formats[] = { .cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)
@@ -2578,6 +2611,10 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }
@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)bool is_ccs_modifier (u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; }
@@ -2798,6 +2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,int x, y;int ret; +/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { +if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + } + cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height =drm_framebuffer_plane_height (fb->height, fb, i);
@@ -4295,6 +4345,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return PLANE_CTL_TILED_Y |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |
@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { +u32 *ccaddr =kmap_atomic (i915_gem_object_get_page (intel_fb_obj (fb), + fb->offsets[2 ] >>PAGE_SHIFT )); + + plane_state->ccval = ((u64)*(ccaddr +CC_VAL_HIGHER_OFFSET ) <<32 ) + | *(ccaddr +CC_VAL_LOWER_OFFSET ); +kunmap_atomic (ccaddr); + } +return 0 ; }
drivers/gpu/drm/i915/display/intel_display_types.h +3 -0
@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {
drivers/gpu/drm/i915/display/intel_sprite.c +9 -1
@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);
@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state);I915_WRITE_FW (PLANE_KEYVAL (pipe, plane_id), key->min_value);
@@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }
@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,DRM_FORMAT_MOD_LINEAR ,
@@ -2750,6 +2757,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;
drivers/gpu/drm/i915/i915_reg.h +12 -0
@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4
@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A, _PLANE_CC_VAL_1_B) +#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A, _PLANE_CC_VAL_2_B) +#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe)) + +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
Quoted 15 lines · Radhakrishna Sripada
Render Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix
has_alphaflag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while runningkms_cube
v4: Add alignment check and reuse the comments forge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case inintel_tile_height(RK)
Quoted 7 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Ville Syrjala <[email protected]>Cc Shashank Sharma <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Nanley G Chery <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>
A few minor comments below, but none of them are critical.
What's the current status of the underlying compression series this work is based on?
Quoted 12 lines
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane) · line 1977
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 64 ;/* fall through */
Since this one (GEN12_RC_CCS) now falls through to the new GEN12_RC_CCS_CC, you can probably drop these lines since they'll be handled the same way in the next case down.
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane) · line 1979
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )
I've reviewed a lot of versions of these compression series so I might be getting confused, but didn't DK have a version at one time that added some kind of is_ccs_plane(mod, plane) helper function? I'm not sure what happened to that, but it did seem like a nice way to consolidate the "these planes contain CCS stuff" logic rather than having to hardcode the plane ID's all over the place like this.
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane) · line 2019
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;@@ -2013,6 +2017,10 @@ intel_tile_height(const struct drm_framebuffer *fb, int color_plane)if (color_plane ==1 )return 1 ;/* fall through */
As above, you can now consolidate this with the new block below if you want.
Quoted 84 lines
drivers/gpu/drm/i915/display/intel_display.c +36
-2+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) /intel_tile_width_bytes (fb, color_plane);@@ -2116,6 +2124,7 @@ static unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y,static bool is_surface_linear (u64 modifier,int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR || - (modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS && color_plane ==1 ); +switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y,@@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return I915_TILING_Y ;default :return I915_TILING_NONE ;@@ -2551,6 +2569,21 @@ static const struct drm_format_info gen12_ccs_formats[] = { .cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)@@ -2578,6 +2611,10 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)bool is_ccs_modifier (u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; }
drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv, · line 2844
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0@@ -2798,6 +2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,int x, y;int ret; +/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) {
This line should be wrapped.
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-0+if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + } + cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height =drm_framebuffer_plane_height (fb->height, fb, i);@@ -4295,6 +4345,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return PLANE_CTL_TILED_Y |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct intel_plane_state *plane_state) · line 15304
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { +u32 *ccaddr =kmap_atomic (i915_gem_object_get_page (intel_fb_obj (fb), + fb->offsets[2 ] >>PAGE_SHIFT )); + + plane_state->ccval = ((u64)*(ccaddr +CC_VAL_HIGHER_OFFSET ) <<32 ) + | *(ccaddr +CC_VAL_LOWER_OFFSET );
Isn't this just the same thing as
u64 *ccaddr = kmap_atomic(...);
plane_state->ccval = ccaddr[2];?
Quoted 102 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+kunmap_atomic (ccaddr); + } +return 0 ; }drivers/gpu/drm/i915/display/intel_display_types.h +3
-0@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_sprite.c +9
-1@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state);I915_WRITE_FW (PLANE_KEYVAL (pipe, plane_id), key->min_value);@@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,DRM_FORMAT_MOD_LINEAR ,@@ -2750,6 +2757,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;drivers/gpu/drm/i915/i915_reg.h +12
-0@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A, _PLANE_CC_VAL_1_B) +#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A, _PLANE_CC_VAL_2_B) +#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe)) + +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0Signature · 1 line
2.20.1
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
Hi Matt,
Quoted 36 lines
-----Original Message-----
From: Roper, Matthew D
Sent: Tuesday, November 26, 2019 12:49 PM
To: Sripada, Radhakrishna <[email protected]>
Cc: [email protected]; Pandiyan, Dhinakaran <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; Antognolli, Rafael <[email protected]>; Chery, Nanley G <[email protected]>
Subject: Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render DecompressionQuoted 16 lines · Radhakrishna Sripada
Render Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix
has_alphaflag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while runningkms_cube
v4: Add alignment check and reuse the comments forge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case inintel_tile_height(RK)Quoted 7 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Ville Syrjala <[email protected]>Cc Shashank Sharma <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Nanley G Chery <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>
Quoted 6 lines
A few minor comments below, but none of them are critical.
Reviewed-by Matt Roper <[email protected]>What's the current status of the underlying compression series this work is based on?
I did not see any patches from DK further on compression patches. From my understanding The render compression patches got r-b's and the media compression patches need further rework.
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct
Quoted 14 lines
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct
drm_framebuffer*fb, intcolor_plane)
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane) · line 1977
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 64 ;/* fall through */ Since this one (
GEN12_RC_CCS) now falls through to the newGEN12_RC_CCS_CC, you can probably drop these lines since they'll be handled the same way in the next case down.
Color_plane == 2 does not apply for GE12_RC_CCS. Do you think it is still ok to club The two cases?
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct · line 1979
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )I've reviewed a lot of versions of these compression series so I might be getting confused, but didn't DK have a version at one time that added some kind of
is_ccs_plane(mod, plane)helper function? I'm not sure what happened to that, but it did seem like a nice way to consolidate the "these planes contain CCS stuff" logic rather than having to hardcode the plane ID's all over the place like this.
The is_ccs_plane helper function was introduced in media compression patches Where further complexities were required while calculating plane dims.
Quoted 104 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;@@ -2013,6 +2017,10 @@ intel_tile_height(const struct drm_framebuffer*fb, int
color_plane)drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane) · line 2019
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 1 ;/* fall through */ As above, you can now consolidate this with the new block below if you want.
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane)
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) / intel_tile_width_bytes(fb, color_plane); @@ -2116,6+2124,7 @@
Quoted 9 lines
static unsigned int intel_surf_alignment(const struct
drm_framebuffer*fb,drivers/gpu/drm/i915/display/intel_display.c +1
-0return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:drivers/gpu/drm/i915/display/intel_display.c static u32 intel_adjust_tile_offset(int *x, int · line 2317
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-2@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y, static bool is_surface_linear(u64 modifier, int color_plane) { - return modifier == DRM_FORMAT_MOD_LINEAR || - (modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS &&
color_plane== 1);drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +12
-0+switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y, @@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier) case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: + case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC: return I915_TILING_Y;default :return I915_TILING_NONE ;@@ -2551,6 +2569,21 @@ static const struct drm_format_infogen12_ccs_formats[] = {
drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +16
-0.cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface +used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)@@ -2578,6 +2611,10 @@ intel_get_format_info(const struct
drm_mode_fb_cmd2*cmd)Quoted 20 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd) bool is_ccs_modifier(u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; } @@ -2798,6 +2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, int x, y;int ret;
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-0+/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && fb->modifier == +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) {This line should be wrapped.
Sure will include in final rev.
Quoted 32 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-0+if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + }drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-1+ cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height = drm_framebuffer_plane_height(fb->height, fb, i); @@ -4295,6 +4345,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : return PLANE_CTL_TILED_Y |
PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15301
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { + u32 *ccaddr =kmap_atomic(i915_gem_object_get_page(intel_fb_obj(fb),
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15305
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+ fb- offsets[2] >> PAGE_SHIFT)); + + plane_state->ccval = ((u64)*(ccaddr + CC_VAL_HIGHER_OFFSET)<< 32)
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct intel_plane_state *plane_state) · line 15304
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ | *(ccaddr + CC_VAL_LOWER_OFFSET);Isn't this just the same thing as
u64 *ccaddr = kmap_atomic(...); plane_state->ccval = ccaddr[2];?
I think it is ccval = ccaddr[5] << 32 | ccaddr[4]? Is this preferred?
Thanks,
Radhakrishna(RK) Sripada
Quoted 112 lines
Quoted 37 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+kunmap_atomic (ccaddr); + } +return 0 ;}
drivers/gpu/drm/i915/display/intel_display_types.h +3
-0@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_sprite.c +1
-0@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_sprite.c +4
-1icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state); I915_WRITE_FW(PLANE_KEYVAL(pipe, plane_id), key->min_value); @@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-1fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)){
drivers/gpu/drm/i915/display/intel_sprite.c static bool
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_FORMAT_MOD_LINEAR,@@ -2750,6 +2757,7 @@ static boolgen12_plane_format_mod_supported(struct
drm_plane*_plane,Quoted 22 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex2e444a18ed0b..4a683db267c1100644drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4drivers/gpu/drm/i915/i915_reg.h enum { · line 6886
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A,
_PLANE_CC_VAL_1_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6887
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A,
_PLANE_CC_VAL_2_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6889
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe),
_PLANE_CC_VAL_2(pipe))Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +4
-1+ +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0 --2.20.1
Quoted 8 lines
Quoted 1 line
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
Quoted 65 lines · Radhakrishna
Hi Matt,
Quoted 36 lines
-----Original Message-----
From: Roper, Matthew D
Sent: Tuesday, November 26, 2019 12:49 PM
To: Sripada, Radhakrishna <[email protected]>
Cc: [email protected]; Pandiyan, Dhinakaran <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; Antognolli, Rafael <[email protected]>; Chery, Nanley G <[email protected]>
Subject: Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render DecompressionQuoted 16 lines · Radhakrishna Sripada
Render Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix
has_alphaflag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while runningkms_cube
v4: Add alignment check and reuse the comments forge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case inintel_tile_height(RK)Quoted 7 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Ville Syrjala <[email protected]>Cc Shashank Sharma <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Nanley G Chery <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>Quoted 6 lines
A few minor comments below, but none of them are critical.
Reviewed-by Matt Roper <[email protected]>What's the current status of the underlying compression series this work is based on?
I did not see any patches from DK further on compression patches. From my understanding The render compression patches got r-b's and the media compression patches need further rework.
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct
Quoted 14 lines
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct
drm_framebuffer*fb, intcolor_plane)Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 64 ;/* fall through */
Quoted 5 lines
Quoted 3 lines
Since this one (
GEN12_RC_CCS) now falls through to the newGEN12_RC_CCS_CC, you can probably drop these lines since they'll be handled the same way in the next case down.
Color_plane== 2 does not apply forGE12_RC_CCS. Do you think it is still ok to club The two cases?
Right. But since it doesn't apply, you should never get called here with color_plane == 2. If we have a bug somewhere higher up and you did get called with a '2' here, you'd still be following the exact same logic (falling through to the CCS_CC handler), so keeping them separate doesn't seem to provide any extra benefit.
That's also part of why I was asking about the is_ccs_plane helper --- it could take care of testing the appropriate planes for a modifier and also add a warning message if we encounter a plane that isn't supposed to exist for the modifier.
Quoted 163 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct · line 1979
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )I've reviewed a lot of versions of these compression series so I might be getting confused, but didn't DK have a version at one time that added some kind of
is_ccs_plane(mod, plane)helper function? I'm not sure what happened to that, but it did seem like a nice way to consolidate the "these planes contain CCS stuff" logic rather than having to hardcode the plane ID's all over the place like this.The
is_ccs_planehelper function was introduced in media compression patches Where further complexities were required while calculating plane dims.Quoted 104 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;@@ -2013,6 +2017,10 @@ intel_tile_height(const struct drm_framebuffer*fb, int
color_plane)drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane) · line 2019
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 1 ;/* fall through */ As above, you can now consolidate this with the new block below if you want.
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane)
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) / intel_tile_width_bytes(fb, color_plane); @@ -2116,6+2124,7 @@
Quoted 9 lines
static unsigned int intel_surf_alignment(const struct
drm_framebuffer*fb,drivers/gpu/drm/i915/display/intel_display.c +1
-0return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:drivers/gpu/drm/i915/display/intel_display.c static u32 intel_adjust_tile_offset(int *x, int · line 2317
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-2@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y, static bool is_surface_linear(u64 modifier, int color_plane) { - return modifier == DRM_FORMAT_MOD_LINEAR || - (modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS &&
color_plane== 1);drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +12
-0+switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y, @@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier) case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: + case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC: return I915_TILING_Y;default :return I915_TILING_NONE ;@@ -2551,6 +2569,21 @@ static const struct drm_format_infogen12_ccs_formats[] = {
drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +16
-0.cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface +used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)@@ -2578,6 +2611,10 @@ intel_get_format_info(const struct
drm_mode_fb_cmd2*cmd)Quoted 20 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd) bool is_ccs_modifier(u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; } @@ -2798,6 +2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, int x, y;int ret;Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-0+/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && fb->modifier == +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) {This line should be wrapped.
Sure will include in final rev.
Quoted 36 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-0+if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + }drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-1+ cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height = drm_framebuffer_plane_height(fb->height, fb, i); @@ -4295,6 +4345,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : return PLANE_CTL_TILED_Y |
PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15301
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { + u32 *ccaddr =kmap_atomic(i915_gem_object_get_page(intel_fb_obj(fb),
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15305
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+ fb- offsets[2] >> PAGE_SHIFT)); + + plane_state->ccval = ((u64)*(ccaddr + CC_VAL_HIGHER_OFFSET)<< 32)
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct intel_plane_state *plane_state) · line 15304
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ | *(ccaddr + CC_VAL_LOWER_OFFSET);Isn't this just the same thing as
Quoted 6 lines
Quoted 4 lines
u64 *ccaddr = kmap_atomic(...); plane_state->ccval = ccaddr[2];?
I think it is ccval = ccaddr[5] << 32 | ccaddr[4]? Is this preferred?
Given that we're little-endian, both should be equivalent, right? I.e., if you treat the pointer as u64*, then ccaddr[2] gives you the whole value at once with no bit manipulation. If you treat it as u32*, then you need to grab both words and shift them into position and OR them as you do here.
I don't think it really matters too much. I was just suggesting something that might be slightly shorter and easier to read.
Matt
Quoted 123 lines
Thanks,
Radhakrishna(RK) SripadaQuoted 120 lines
Quoted 37 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+kunmap_atomic (ccaddr); + } +return 0 ;}
drivers/gpu/drm/i915/display/intel_display_types.h +3
-0@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_sprite.c +1
-0@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_sprite.c +4
-1icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state); I915_WRITE_FW(PLANE_KEYVAL(pipe, plane_id), key->min_value); @@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-1fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)){
drivers/gpu/drm/i915/display/intel_sprite.c static bool
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_FORMAT_MOD_LINEAR,@@ -2750,6 +2757,7 @@ static boolgen12_plane_format_mod_supported(struct
drm_plane*_plane,Quoted 22 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex2e444a18ed0b..4a683db267c1100644drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4drivers/gpu/drm/i915/i915_reg.h enum { · line 6886
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A,
_PLANE_CC_VAL_1_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6887
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A,
_PLANE_CC_VAL_2_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6889
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe),
_PLANE_CC_VAL_2(pipe))Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4
-1+ +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0 --2.20.1
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
Quoted 96 lines
-----Original Message-----
From: Roper, Matthew D
Sent: Tuesday, November 26, 2019 2:00 PM
To: Sripada, Radhakrishna <[email protected]>
Cc: [email protected]; Pandiyan, Dhinakaran <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; Antognolli, Rafael <[email protected]>; Chery, Nanley G <[email protected]>
Subject: Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render DecompressionQuoted 42 lines · Radhakrishna
Hi Matt,
Quoted 40 lines
-----Original Message-----
From: Roper, Matthew D
Sent: Tuesday, November 26, 2019 12:49 PM
To: Sripada, Radhakrishna <[email protected]>
Cc: [email protected]; Pandiyan, Dhinakaran <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; Antognolli, Rafael <[email protected]>; Chery, Nanley G <[email protected]>
Subject: Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render DecompressionQuoted 25 lines · Radhakrishna Sripada
Render Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend
Gen12 render decompression functionality to the newly added modifier.v2: Fix
has_alphaflag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while runningkms_cube
v4: Add alignment check and reuse the comments forge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case inintel_tile_height(RK)Cc: Dhinakaran Pandiyan <[email protected]>
Cc: Ville Syrjala <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Rafael Antognolli <[email protected]>
Cc: Nanley G Chery <[email protected]>
Cc: Matt Roper <[email protected]>
Signed-off-by: Radhakrishna Sripada <[email protected]>Quoted 8 lines
Quoted 6 lines
A few minor comments below, but none of them are critical.
Reviewed-by Matt Roper <[email protected]>What's the current status of the underlying compression series this work is based on?
I did not see any patches from DK further on compression patches. From my understanding The render compression patches got r-b's and the media
compression patches need further rework.
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct
Quoted 14 lines
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct
drm_framebuffer*fb, intcolor_plane)Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 64 ;/* fall through */ Quoted 5 lines
Quoted 3 lines
Since this one (
GEN12_RC_CCS) now falls through to the newGEN12_RC_CCS_CC, you can probably drop these lines since they'll be handled the same way in the next case down.
Color_plane== 2 does not apply forGE12_RC_CCS. Do you think it is still ok to club The two cases?Right. But since it doesn't apply, you should never get called here with
color_plane== 2. If we have a bug somewhere higher up and you did get called with a '2' here, you'd still be following the exact same logic (falling through to theCCS_CChandler), so keeping them separate doesn't seem to provide any extra benefit.
Quoted 4 lines
That's also part of why I was asking about the
is_ccs_planehelper --- it could take care of testing the appropriate planes for a modifier and also add a warning message if we encounter a plane that isn't supposed to exist for the modifier.
Sure will simplify in next rev.
Quoted 175 lines
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct · line 1979
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )I've reviewed a lot of versions of these compression series so I might be getting confused, but didn't DK have a version at one time that added some kind of
is_ccs_plane(mod, plane)helper function? I'm not sure what happened to that, but it did seem like a nice way to consolidate the "these planes contain CCS stuff" logic rather than having to hardcode the plane ID's all over the place like this.Quoted 2 lines
The
is_ccs_planehelper function was introduced in media compression patches Where further complexities were required while calculating planedims.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED :if (IS_GEN (dev_priv,2 ) ||HAS_128_BYTE_Y_TILING (dev_priv))return 128 ;@@ -2013,6 +2017,10 @@ intel_tile_height(const struct
drm_framebuffer*fb, int
color_plane)Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane) · line 2019
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 1 ;/* fall through */ As above, you can now consolidate this with the new block below if you
want.
Quoted 138 lines
Quoted 92 lines
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane)
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) / intel_tile_width_bytes(fb, color_plane); @@ -2116,6+2124,7 @@
Quoted 9 lines
static unsigned int intel_surf_alignment(const struct
drm_framebuffer*fb,drivers/gpu/drm/i915/display/intel_display.c +1
-0return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:drivers/gpu/drm/i915/display/intel_display.c static u32 intel_adjust_tile_offset(int *x, · line 2317
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-2@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y, static bool is_surface_linear(u64 modifier, int color_plane) { - return modifier == DRM_FORMAT_MOD_LINEAR || - (modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS &&
color_plane== 1);drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info
Quoted 23 lines
drivers/gpu/drm/i915/display/intel_display.c +13
-0+switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y, @@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 +fb_modifier) case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: + case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC: return I915_TILING_Y;default :return I915_TILING_NONE ;@@ -2551,6 +2569,21 @@ static const struct drm_format_infogen12_ccs_formats[] = {
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +16
-0.cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface +used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true +}, }; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[], int num_formats, u32 format) @@ -2578,6 +2611,10 @@Quoted 1 line
intel_get_format_info(const struct
drm_mode_fb_cmd2*cmd)Quoted 20 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd) bool is_ccs_modifier(u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; } @@ -2798,6 +2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, int x, y;int ret;Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-0+/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && fb->modifier == +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) {This line should be wrapped.
Sure will include in final rev.
Quoted 36 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-0+if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + }drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-1+ cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height = drm_framebuffer_plane_height(fb->height, fb, i); @@ -4295,6 +4345,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : return PLANE_CTL_TILED_Y |
PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15301
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { + u32 *ccaddr =kmap_atomic(i915_gem_object_get_page(intel_fb_obj(fb),
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15305
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+ fb- offsets[2] >> PAGE_SHIFT)); + + plane_state->ccval = ((u64)*(ccaddr + CC_VAL_HIGHER_OFFSET)<< 32)
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct intel_plane_state *plane_state) · line 15304
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ | *(ccaddr + CC_VAL_LOWER_OFFSET);Isn't this just the same thing as
Quoted 6 lines
Quoted 4 lines
u64 *ccaddr = kmap_atomic(...); plane_state->ccval = ccaddr[2];?
I think it is ccval = ccaddr[5] << 32 | ccaddr[4]? Is this preferred?
Quoted 7 lines
Given that we're little-endian, both should be equivalent, right? I.e., if you treat the pointer as u64*, then ccaddr[2] gives you the whole value at once with no bit manipulation. If you treat it as u32*, then you need to grab both words and shift them into position and OR them as you do here.
I don't think it really matters too much. I was just suggesting something that might be slightly shorter and easier to read.
Ah u64* yes. But I prefer keeping it explicit so as to clearly identify the higher and lower offsets in case someone wants to use this further also explains the different fields described in the documentation section of the previous patch.
RK
Quoted 128 lines
Matt
Quoted 123 lines
Thanks,
Radhakrishna(RK) SripadaQuoted 120 lines
Quoted 37 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+kunmap_atomic (ccaddr); + } +return 0 ;}
drivers/gpu/drm/i915/display/intel_display_types.h +3
-0@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; }; struct intel_initial_plane_config { diff --git
a/drivers/gpu/drm/i915/display/intel_sprite.cb/drivers/gpu/drm/i915/display/intel_sprite.c
index67a90059900f..89f7fbc87ad9100644drivers/gpu/drm/i915/display/intel_sprite.c +1
-0@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_sprite.c +4
-1icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state); I915_WRITE_FW(PLANE_KEYVAL(pipe, plane_id), key->min_value); @@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-1fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)){
drivers/gpu/drm/i915/display/intel_sprite.c static bool
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_FORMAT_MOD_LINEAR,@@ -2750,6 +2757,7 @@ static boolgen12_plane_format_mod_supported(struct
drm_plane*_plane,Quoted 22 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex2e444a18ed0b..4a683db267c1100644drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4drivers/gpu/drm/i915/i915_reg.h enum { · line 6886
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A,
_PLANE_CC_VAL_1_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6887
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A,
_PLANE_CC_VAL_2_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6889
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe),
_PLANE_CC_VAL_2(pipe))Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4
-1+ +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0 --2.20.1
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
Quoted 6 lines
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
In reply to Matt Roper+ Imre
Quoted 369 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Matt Roper
Sent: tiistai 26. marraskuuta 2019 22.49
To: Sripada, Radhakrishna <[email protected]>
Cc: Chery, Nanley G <[email protected]>; intel- [email protected]; Pandiyan, Dhinakaran <[email protected]>; Syrjala, Ville <[email protected]>
Subject: Re: [Intel-gfx] [PATCH v7 7/7] drm/i915/tgl: Add Clear Color support for TGL Render DecompressionQuoted 16 lines · Radhakrishna Sripada
Render Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix
has_alphaflag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while runningkms_cube
v4: Add alignment check and reuse the comments forge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case inintel_tile_height(RK)Quoted 7 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Ville Syrjala <[email protected]>Cc Shashank Sharma <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Nanley G Chery <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Radhakrishna Sripada <[email protected]>A few minor comments below, but none of them are critical.
Reviewed-by Matt Roper <[email protected]>What's the current status of the underlying compression series this work is based on?
drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct
Quoted 13 lines
--- drivers/gpu/drm/i915/display/intel_display.c | 64 ++++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 86 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -1975,6 +1975,10 @@ intel_tile_width_bytes(const struct
drm_framebuffer*fb, intcolor_plane)drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane) · line 1977
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 64 ;/* fall through */ Since this one (
GEN12_RC_CCS) now falls through to the newGEN12_RC_CCS_CC, you can probably drop these lines since they'll be handled the same way in the next case down.drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct · line 1979
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )I've reviewed a lot of versions of these compression series so I might be getting confused, but didn't DK have a version at one time that added some kind of
is_ccs_plane(mod, plane)helper function? I'm not sure what happened to that, but it did seem like a nice way to consolidate the "these planes contain CCS stuff" logic rather than having to hardcode the plane ID's all over the place like this.drivers/gpu/drm/i915/display/intel_display.c intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+return 64 ; +/* fall through */ case I915_FORMAT_MOD_Y_TILED : if (IS_GEN(dev_priv, 2) ||
HAS_128_BYTE_Y_TILING(dev_priv))drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb,
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0return 128 ;@@ -2013,6 +2017,10 @@ intel_tile_height(const struct drm_framebuffer *fb,int
color_plane)drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane) · line 2019
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0if (color_plane ==1 )return 1 ;/* fall through */ As above, you can now consolidate this with the new block below if you want.
drivers/gpu/drm/i915/display/intel_display.c intel_tile_height(const struct drm_framebuffer *fb, int color_plane)
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 ) +return 1 ; +/* fall through */ default :return intel_tile_size (to_i915 (fb->dev)) / intel_tile_width_bytes(fb,
color_plane); @@ -2116,6 +2124,7 @@Quoted 9 lines
static unsigned int intel_surf_alignment(const struct
drm_framebuffer*fb,drivers/gpu/drm/i915/display/intel_display.c +1
-0return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:drivers/gpu/drm/i915/display/intel_display.c static u32 intel_adjust_tile_offset(int *x, int · line 2317
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-2@@ -2313,8 +2322,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y, static bool is_surface_linear(u64 modifier, int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR || - (modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS&&
color_plane== 1);drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +12
-0+switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y, @@ -2502,6 +2519,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier) case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: + case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC: return I915_TILING_Y;default :return I915_TILING_NONE ;@@ -2551,6 +2569,21 @@ static const struct drm_format_infogen12_ccs_formats[] = {
drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info gen12_ccs_formats[] = {
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-0.cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* + * Same as gen12_ccs_formats[] above, but with additional surface +used + * to pass Clear Color information in plane 2 with 64 bits of data. + */ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes =3,
drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info · line 2579
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+ .cpp = { 4, 1, 0, }, .hsub = 2, .vsub = 32, }, + { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes =3,
drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info · line 2581
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+ .cpp = { 4, 1, 0, }, .hsub = 2, .vsub = 32, }, + { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes =3,
drivers/gpu/drm/i915/display/intel_display.c static const struct drm_format_info · line 2583
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+ .cpp = { 4, 1, 0, }, .hsub = 2, .vsub = 32, .has_alpha = true }, + { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes =3,
drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+ .cpp = { 4, 1, 0, }, .hsub = 2, .vsub = 32, .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)@@ -2578,6 +2611,10 @@ intel_get_format_info(const struct
drm_mode_fb_cmd2*cmd)drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct · line 2612
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0return lookup_format_info(gen12_ccs_formats,
ARRAY_SIZE(gen12_ccs_formats),drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct · line 2617
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0cmd- pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : + return lookup_format_info(gen12_ccs_cc_formats, +
ARRAY_SIZE(gen12_ccs_cc_formats),drivers/gpu/drm/i915/display/intel_display.c intel_get_format_info(const struct · line 2624
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ cmd- pixel_format);default :drivers/gpu/drm/i915/display/intel_display.c +0
-0return NULL ; }@@ -2586,6 +2623,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd) bool is_ccs_modifier(u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || > + modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || > modifier == I915_FORMAT_MOD_Y_TILED_CCS || > modifier == I915_FORMAT_MOD_Yf_TILED_CCS; } @@ -2798,6
drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+2836,18 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, int x, y;int ret; +/* +* Plane 2 of Render Compression with Clear Color fb modifier
drivers/gpu/drm/i915/display/intel_display.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+* is consumed by the driver and not passed to DE. Skip the
drivers/gpu/drm/i915/display/intel_display.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+* arithmetic related to alignment and offset calculation.
drivers/gpu/drm/i915/display/intel_display.c
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+*/ +if (i ==2 && fb->modifier == +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) {This line should be wrapped.
drivers/gpu/drm/i915/display/intel_display.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ if (IS_ALIGNED(fb->offsets[2],
PAGE_SIZE))drivers/gpu/drm/i915/display/intel_display.c intel_fill_fb_info(struct drm_i915_private *dev_priv,
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-0+continue ; + else + return -EINVAL; + } + cpp = fb->format->cpp[i]; width = drm_framebuffer_plane_width(fb->width,fb, i);
Quoted 1 line
height = drm_framebuffer_plane_height(fb->height,
fb, i); @@
drivers/gpu/drm/i915/display/intel_display.c static u32 skl_plane_ctl_tiling(u64 fb_modifier) · line 4351
Quoted 6 lines
-4295,6 +4345,7 @@ static u32
skl_plane_ctl_tiling(u64 fb_modifier)drivers/gpu/drm/i915/display/intel_display.c +1
-0case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : return PLANE_CTL_TILED_Y |
PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15300
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-0case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |@@ -15245,6 +15296,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; + if (fb->modifier ==
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC) {drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15301
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ u32 *ccaddr =kmap_atomic(i915_gem_object_get_page(intel_fb_obj(fb),
drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15302
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+fb->offsets[2] >> PAGE_SHIFT));drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15304
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-0+ + plane_state->ccval = ((u64)*(ccaddr +
CC_VAL_HIGHER_OFFSET) << 32)drivers/gpu/drm/i915/display/intel_display.c static int intel_plane_pin_fb(struct · line 15305
Quoted 1 line
drivers/gpu/drm/i915/display/intel_display.c +1
-0+ | *(ccaddr +
CC_VAL_LOWER_OFFSET);Isn't this just the same thing as
u64 *ccaddr = kmap_atomic(...); plane_state->ccval = ccaddr[2];?
Quoted 35 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0+kunmap_atomic (ccaddr); + } +return 0 ; }drivers/gpu/drm/i915/display/intel_display_types.h +3
-0@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_sprite.c +1
-0@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane, · line 641
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id)) icl_program_input_csc(plane, crtc_state,
plane_state);drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane, · line 642
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+ if (fb->modifier ==
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane, · line 646
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-0+ intel_uncore_write64_fw(&dev_priv->uncore, +PLANE_CC_VAL(pipe, plane_id), ccval);drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane, · line 649
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+skl_write_plane_wm (plane, crtc_state);I915_WRITE_FW (PLANE_KEYVAL (pipe, plane_id), key->min_value);@@
drivers/gpu/drm/i915/display/intel_sprite.c skl_program_plane(struct intel_plane *plane, · line 644
Quoted 1 line
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1-2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +0
-1fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier ==I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier ==
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) {drivers/gpu/drm/i915/display/intel_sprite.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+ fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || > + fb->modifier ==
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)) {Quoted 1 line
DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-ID
mode\n");
drivers/gpu/drm/i915/display/intel_sprite.c static bool
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0return -EINVAL ; }@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,drivers/gpu/drm/i915/display/intel_sprite.c +0
-0DRM_FORMAT_MOD_LINEAR,@@ -2750,6 +2757,7 @@ static boolgen12_plane_format_mod_supported(struct
drm_plane*_plane,Quoted 22 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex2e444a18ed0b..4a683db267c1100644drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4drivers/gpu/drm/i915/i915_reg.h enum { · line 6886
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A,
_PLANE_CC_VAL_1_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6887
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A,
_PLANE_CC_VAL_2_B)drivers/gpu/drm/i915/i915_reg.h enum { · line 6889
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe),
_PLANE_CC_VAL_2(pipe))Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4
-1+ +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0 --2.20.1
--
Matt Roper
Quoted 8 lines
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 7/7 drm/i915/tgl: Add Clear Color support for TGL Render Decompression
In reply to Radhakrishna SripadaRender Decompression is supported with Y-Tiled main surface. The CCS is linear and has 4 bits of data for each main surface cache line pair, a ratio of 1:256. Additional Clear Color information is passed from the user-space through an offset in the GEM BO. Add a new modifier to identify and parse new Clear Color information and extend Gen12 render decompression functionality to the newly added modifier.
v2: Fix has_alpha flag for modifiers, omit CC modifier during initial
plane config(Matt). Fix Lookup error.
v3: Fix the panic while running kms_cube
v4: Add alignment check and reuse the comments for ge12_ccs_formats(Matt)
v5: Fix typos and wrap comments(Matt)
v6: Rebase
v7: Rebase, Add missing case in intel_tile_height(RK)
v8: Nit cleanups(Matt)
--- drivers/gpu/drm/i915/display/intel_display.c | 63 +++++++++++++++++-- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/display/intel_sprite.c | 10 ++- drivers/gpu/drm/i915/i915_reg.h | 12 ++++ 4 files changed, 83 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +59 -4
@@ -1972,7 +1972,8 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ;/* fall through */ case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : -if (color_plane ==1 ) +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )return 64 ;/* fall through */ case I915_FORMAT_MOD_Y_TILED :
@@ -2010,7 +2011,8 @@ intel_tile_height(const struct drm_framebuffer *fb, int color_plane) {switch (fb->modifier) {case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : -if (color_plane ==1 ) +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +if (color_plane ==1 || color_plane ==2 )return 1 ;/* fall through */ default :
@@ -2116,6 +2118,7 @@ static unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,return 256 *1024 ;return 0 ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return 16 *1024 ;case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:
@@ -2313,8 +2316,16 @@ static u32 intel_adjust_tile_offset(int *x, int *y,static bool is_surface_linear (u64 modifier,int color_plane) { -return modifier ==DRM_FORMAT_MOD_LINEAR || - (modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS && color_plane ==1 ); +switch (modifier) { +case DRM_FORMAT_MOD_LINEAR : +return true; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +return color_plane ==1 ; +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return color_plane ==1 || color_plane ==2 ; +default : +return false; + } } static u32 intel_adjust_aligned_offset(int *x, int *y,
@@ -2502,6 +2513,7 @@ static unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return I915_TILING_Y ;default :return I915_TILING_NONE ;
@@ -2551,6 +2563,21 @@ static const struct drm_format_info gen12_ccs_formats[] = { .cpp = { 4, 1, }, .hsub = 2, .vsub = 32, .has_alpha = true }, }; +/* +* Same as gen12_ccs_formats[] above, but with additional surface used +* to pass Clear Color information in plane 2 with 64 bits of data. +*/ +static const struct drm_format_info gen12_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =3 , + .cpp = {4 ,1 ,0 , }, .hsub =2 , .vsub =32 , .has_alpha = true }, +}; +static const struct drm_format_info *lookup_format_info (const struct drm_format_info formats[],int num_formats,u32 format)
@@ -2578,6 +2605,10 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)return lookup_format_info (gen12_ccs_formats,ARRAY_SIZE (gen12_ccs_formats), cmd->pixel_format); +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC : +return lookup_format_info (gen12_ccs_cc_formats, +ARRAY_SIZE (gen12_ccs_cc_formats), + cmd->pixel_format);default :return NULL ; }
@@ -2586,6 +2617,7 @@ intel_get_format_info(const struct drm_mode_fb_cmd2 *cmd)bool is_ccs_modifier (u64 modifier) {return modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; }
@@ -2798,6 +2830,19 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,int x, y;int ret; +/* +* Plane 2 of Render Compression with Clear Color fb modifier +* is consumed by the driver and not passed to DE. Skip the +* arithmetic related to alignment and offset calculation. +*/ +if (i ==2 && + fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { +if (IS_ALIGNED (fb->offsets[2 ],PAGE_SIZE )) +continue ; +else +return -EINVAL ; + } + cpp = fb->format->cpp[i]; width =drm_framebuffer_plane_width (fb->width, fb, i); height =drm_framebuffer_plane_height (fb->height, fb, i);
@@ -4295,6 +4340,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_Y_TILED_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :return PLANE_CTL_TILED_Y |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : return PLANE_CTL_TILED_Y |
@@ -15245,6 +15291,15 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state) plane_state->vma = vma; +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) { +u32 *ccaddr =kmap_atomic (i915_gem_object_get_page (intel_fb_obj (fb), + fb->offsets[2 ] >>PAGE_SHIFT )); + + plane_state->ccval = ((u64)*(ccaddr +CC_VAL_HIGHER_OFFSET ) <<32 ) + | *(ccaddr +CC_VAL_LOWER_OFFSET ); +kunmap_atomic (ccaddr); + } +return 0 ; }
drivers/gpu/drm/i915/display/intel_display_types.h +3 -0
@@ -607,6 +607,9 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +/* Clear Color Value */ +u64 ccval; };struct intel_initial_plane_config {
drivers/gpu/drm/i915/display/intel_sprite.c +9 -1
@@ -597,6 +597,7 @@ skl_program_plane(struct intel_plane *plane,unsigned long irqflags;u32 keymsk, keymax;u32 plane_ctl = plane_state->ctl; +u64 ccval = plane_state->ccval; plane_ctl |=skl_plane_ctl_crtc (crtc_state);
@@ -639,6 +640,10 @@ skl_program_plane(struct intel_plane *plane,if (fb->format->is_yuv &&icl_is_hdr_plane (dev_priv, plane_id))icl_program_input_csc (plane, crtc_state, plane_state); +if (fb->modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ) +intel_uncore_write64_fw (&dev_priv->uncore, +PLANE_CC_VAL (pipe, plane_id), ccval); +skl_write_plane_wm (plane, crtc_state);I915_WRITE_FW (PLANE_KEYVAL (pipe, plane_id), key->min_value);
@@ -2106,7 +2111,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, fb->modifier == I915_FORMAT_MOD_Yf_TILED || fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS || fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS || - fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS)) { + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS || + fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)) {DRM_DEBUG_KMS ("Y/Yf tiling not supported in IF-ID mode\n" );return -EINVAL ; }
@@ -2579,6 +2585,7 @@ static const u64 skl_plane_format_modifiers_ccs[] = {static const u64 gen12_plane_format_modifiers_ccs[] = {I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS , +I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ,I915_FORMAT_MOD_Y_TILED ,I915_FORMAT_MOD_X_TILED ,DRM_FORMAT_MOD_LINEAR ,
@@ -2750,6 +2757,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS : +case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC :break ;default :return false;
drivers/gpu/drm/i915/i915_reg.h +12 -0
@@ -6840,6 +6840,8 @@ enum {#define _PLANE_KEYMAX_1_A 0x701a0#define _PLANE_KEYMAX_2_A 0x702a0#define PLANE_KEYMAX_ALPHA (a) ((a) << 24) +#define _PLANE_CC_VAL_1_A 0x701b4 +#define _PLANE_CC_VAL_2_A 0x702b4#define _PLANE_AUX_DIST_1_A 0x701c0#define _PLANE_AUX_DIST_2_A 0x702c0#define _PLANE_AUX_OFFSET_1_A 0x701c4
@@ -6879,6 +6881,16 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define _PLANE_CC_VAL_1_B 0x711b4 +#define _PLANE_CC_VAL_2_B 0x712b4 +#define _PLANE_CC_VAL_1 (pipe) _PIPE(pipe, _PLANE_CC_VAL_1_A, _PLANE_CC_VAL_1_B) +#define _PLANE_CC_VAL_2 (pipe) _PIPE(pipe, _PLANE_CC_VAL_2_A, _PLANE_CC_VAL_2_B) +#define PLANE_CC_VAL (pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe)) + +#define CC_VAL_LOWER_OFFSET 4 +#define CC_VAL_HIGHER_OFFSET 5 +/* Input CSC Register Definitions */ #define _PLANE_INPUT_CSC_RY_GY_1_A 0x701E0#define _PLANE_INPUT_CSC_RY_GY_2_A 0x702E0
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Clear Color Support for TGL Render Decompression (rev10)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev10)
URL : https://patchwork.freedesktop.org/series/66814/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip d2bc012f7c24 drm/framebuffer: Format modifier for Intel Gen-12 render compression ab7291ec70a1 drm/i915: Use intel_tile_height() instead of re-implementing 60ea125445e6 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment 8c8a5ad3da3c drm/i915/tgl: Gen-12 render decompression 57e9f38c1822 drm/i915: Extract framebufer CCS offset checks into a function 6bcd43ce105c drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 454c413288cb drm/i915/tgl: Add Clear Color support for TGL Render Decompression -:259: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pipe' - possible side-effects? #259: FILE: drivers/gpu/drm/i915/i915_reg.h:6888: +#define PLANE_CC_VAL(pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe))
total: 0 errors, 0 warnings, 1 checks, 203 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Clear Color Support for TGL Render Decompression (rev10)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev10)
URL : https://patchwork.freedesktop.org/series/66814/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7420 -> Patchwork_15430
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/index.html
Known issues
------------
Here are the changes found in Patchwork_15430 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [PASS][1] -> [DMESG-FAIL][2] ([fdo#112176])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][3] -> [DMESG-WARN][4] ([fdo#102614])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-hsw-peppy/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-hsw-peppy/igt@[email protected]
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][5] ([fdo#108511]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-skl-6770hq/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-skl-6770hq/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-u2: [FAIL][7] ([fdo#109635 ] / [fdo#110387]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-icl-u2/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][9] ([fdo#109483]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-kbl-7500u/igt@[email protected]
#### Warnings ####
* igt@gem_exec_suspend@basic-s0:
- fi-kbl-x1275: [DMESG-WARN][11] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [DMESG-WARN][12] ([fdo#103558] / [fdo#105602]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-kbl-x1275/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-kbl-x1275/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- fi-kbl-guc: [FAIL][13] ([fdo#112223]) -> [SKIP][14] ([fdo#109271])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-kbl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-kbl-guc/igt@[email protected]
* igt@kms_flip@basic-flip-vs-modeset:
- fi-kbl-x1275: [DMESG-WARN][15] ([fdo#103558] / [fdo#105602]) -> [DMESG-WARN][16] ([fdo#103558] / [fdo#105602] / [fdo#105763]) +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7420/fi-kbl-x1275/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
[fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387
[fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176
[fdo#112223]: https://bugs.freedesktop.org/show_bug.cgi?id=112223
[fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298
Participating hosts (51 -> 45)
------------------------------
Missing (6): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7420 -> Patchwork_15430
CI-20190529: 20190529
CI_DRM_7420: a876581f0065620f1519cfb9852fe5bd364db7c8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5305: eafaa79dfb71f7251126f1c000e0cbe94425c95a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15430: 454c413288cb165432247788c445271fa140b391 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
454c413288cb drm/i915/tgl: Add Clear Color support for TGL Render Decompression 6bcd43ce105c drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 57e9f38c1822 drm/i915: Extract framebufer CCS offset checks into a function 8c8a5ad3da3c drm/i915/tgl: Gen-12 render decompression60ea125445e6 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment ab7291ec70a1 drm/i915: Use intel_tile_height() instead of re-implementing d2bc012f7c24 drm/framebuffer: Format modifier for Intel Gen-12 render compression
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15430/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Clear Color Support for TGL Render Decompression (rev11)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev11)
URL : https://patchwork.freedesktop.org/series/66814/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip f5811af5d1c2 drm/framebuffer: Format modifier for Intel Gen-12 render compression 9773ae4503c6 drm/i915: Use intel_tile_height() instead of re-implementing ca318c275544 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment 5c41ebad1f36 drm/i915/tgl: Gen-12 render decompression 71732116fbab drm/i915: Extract framebufer CCS offset checks into a function d7097e80bb5c drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 2d950a93060e drm/i915/tgl: Add Clear Color support for TGL Render Decompression -:259: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pipe' - possible side-effects? #259: FILE: drivers/gpu/drm/i915/i915_reg.h:6888: +#define PLANE_CC_VAL(pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe))
total: 0 errors, 0 warnings, 1 checks, 202 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Clear Color Support for TGL Render Decompression (rev11)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev11)
URL : https://patchwork.freedesktop.org/series/66814/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7428 -> Patchwork_15453
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/index.html
Known issues
------------
Here are the changes found in Patchwork_15453 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [PASS][1] -> [DMESG-WARN][2] ([fdo#112261])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-skl-6770hq/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-skl-6770hq/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- fi-hsw-4770r: [PASS][3] -> [DMESG-FAIL][4] ([fdo#111991])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html
#### Possible fixes ####
* igt@i915_module_load@reload-with-fault-injection:
- {fi-kbl-7560u}: [INCOMPLETE][5] ([fdo#109964] / [fdo#112298]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-kbl-7560u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-kbl-7560u/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-bsw-n3050: [DMESG-FAIL][7] ([fdo#112176]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-bsw-n3050/igt@i915_selftest@live_blt.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-bsw-n3050/igt@i915_selftest@live_blt.html
- fi-hsw-peppy: [DMESG-FAIL][9] ([fdo#112147]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-hsw-peppy/igt@i915_selftest@live_blt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-hsw-peppy/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_execlists:
- fi-glk-dsi: [DMESG-FAIL][11] -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-glk-dsi/igt@i915_selftest@live_execlists.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-glk-dsi/igt@i915_selftest@live_execlists.html
* igt@kms_busy@basic-flip-pipe-a:
- fi-icl-u2: [TIMEOUT][13] ([fdo#111800]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-icl-u2/igt@[email protected]
#### Warnings ####
* igt@gem_exec_suspend@basic-s0:
- fi-kbl-x1275: [DMESG-WARN][15] ([fdo#103558] / [fdo#105602]) -> [DMESG-WARN][16] ([fdo#103558] / [fdo#105602] / [fdo#105763]) +6 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-kbl-x1275/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-kbl-x1275/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][17] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [DMESG-WARN][18] ([fdo#103558] / [fdo#105602]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/fi-kbl-x1275/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
[fdo#111800]: https://bugs.freedesktop.org/show_bug.cgi?id=111800
[fdo#111991]: https://bugs.freedesktop.org/show_bug.cgi?id=111991
[fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147
[fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176
[fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261
[fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298
Participating hosts (51 -> 44)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bsw-kefka fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7428 -> Patchwork_15453
CI-20190529: 20190529
CI_DRM_7428: d90242799e46210c5c09e1f0c64db2bb7ee870c6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5310: d1ea62b3f759f10ff6860561ba82e5c4902511d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15453: 2d950a93060e2bf172275f5bad57795b082e989a @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
2d950a93060e drm/i915/tgl: Add Clear Color support for TGL Render Decompression d7097e80bb5c drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 71732116fbab drm/i915: Extract framebufer CCS offset checks into a function 5c41ebad1f36 drm/i915/tgl: Gen-12 render decompressionca318c275544 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment 9773ae4503c6 drm/i915: Use intel_tile_height() instead of re-implementing f5811af5d1c2 drm/framebuffer: Format modifier for Intel Gen-12 render compression
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for Clear Color Support for TGL Render Decompression (rev11)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev11)
URL : https://patchwork.freedesktop.org/series/66814/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7428_full -> Patchwork_15453_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_15453_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_15453_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15453_full:
### IGT changes ###
#### Possible regressions ####
* igt@kms_draw_crc@draw-method-rgb565-blt-untiled:
- shard-skl: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl3/igt@[email protected]
* igt@kms_plane@pixel-format-pipe-a-planes:
- shard-tglb: [PASS][3] -> [FAIL][4] +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb8/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_15453_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@vcs0-s3:
- shard-tglb: [PASS][5] -> [INCOMPLETE][6] ([fdo#111832])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb8/igt@[email protected]
* igt@gem_ctx_isolation@vcs1-s3:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276] / [fdo#112080])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb7/igt@[email protected]
* igt@gem_eio@in-flight-suspend:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([fdo#104108])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl2/igt@[email protected]
* igt@gem_eio@kms:
- shard-iclb: [PASS][11] -> [DMESG-WARN][12] ([fdo#112394])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb1/igt@[email protected]
* igt@gem_eio@reset-stress:
- shard-skl: [PASS][13] -> [DMESG-WARN][14] ([fdo#106107])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl5/igt@[email protected]
- shard-snb: [PASS][15] -> [FAIL][16] ([fdo#109661])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-snb2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-snb1/igt@[email protected]
* igt@gem_eio@suspend:
- shard-tglb: [PASS][17] -> [INCOMPLETE][18] ([fdo#111850])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb1/igt@[email protected]
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#112146]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb4/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
- shard-hsw: [PASS][21] -> [DMESG-WARN][22] ([fdo#111870]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-hsw4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-hsw4/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-apl: [PASS][23] -> [INCOMPLETE][24] ([fdo#103927])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-apl2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-apl8/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][25] -> [FAIL][26] ([fdo#111830 ])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb3/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb4/igt@[email protected]
* igt@i915_selftest@live_gem_contexts:
- shard-kbl: [PASS][27] -> [DMESG-FAIL][28] ([fdo#112402])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl4/igt@i915_selftest@live_gem_contexts.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl3/igt@i915_selftest@live_gem_contexts.html
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][29] -> [DMESG-WARN][30] ([fdo#108566]) +8 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl4/igt@[email protected]
* igt@kms_cursor_legacy@pipe-a-forked-move:
- shard-snb: [PASS][31] -> [INCOMPLETE][32] ([fdo#105411])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-snb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-snb1/igt@[email protected]
* igt@kms_draw_crc@draw-method-xrgb8888-blt-xtiled:
- shard-skl: [PASS][33] -> [INCOMPLETE][34] ([fdo#112395])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl10/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl3/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [PASS][35] -> [FAIL][36] ([fdo#105363])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl7/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl10/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][37] -> [DMESG-WARN][38] ([fdo#108566]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-apl8/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-apl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt:
- shard-tglb: [PASS][39] -> [FAIL][40] ([fdo#103167]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb3/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt:
- shard-kbl: [PASS][41] -> [INCOMPLETE][42] ([fdo#103665] / [fdo#112356])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl2/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-iclb: [PASS][43] -> [FAIL][44] ([fdo#103167])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb8/igt@[email protected]
* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-kbl: [PASS][45] -> [INCOMPLETE][46] ([fdo#103665])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl1/igt@[email protected]
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-skl: [PASS][47] -> [INCOMPLETE][48] ([fdo#112391])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl10/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-tglb: [PASS][49] -> [INCOMPLETE][50] ([fdo#111832] / [fdo#111850])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb2/igt@[email protected]
#### Possible fixes ####
* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][51] ([fdo#112080]) -> [PASS][52] +5 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb3/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb4/igt@[email protected]
* igt@gem_exec_create@forked:
- shard-tglb: [INCOMPLETE][53] ([fdo#108838] / [fdo#111747]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb1/igt@[email protected]
* igt@gem_exec_parallel@fds:
- shard-tglb: [INCOMPLETE][55] ([fdo#111867]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb6/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [SKIP][57] ([fdo#109276]) -> [PASS][58] +15 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb3/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb1/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-chain-bsd:
- shard-iclb: [SKIP][59] ([fdo#112146]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb4/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb7/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-chain-vebox:
- shard-tglb: [INCOMPLETE][61] ([fdo#111677]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb8/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][63] ([fdo#112392]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-glk7/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-glk1/igt@[email protected]
- shard-skl: [FAIL][65] ([fdo#112392]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl9/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl10/igt@[email protected]
* igt@gem_sync@basic-each:
- shard-tglb: [INCOMPLETE][67] ([fdo#111880] / [fdo#111998]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb7/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb1/igt@[email protected]
* igt@gem_userptr_blits@dmabuf-unsync:
- shard-hsw: [DMESG-WARN][69] ([fdo#111870]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-hsw5/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-hsw1/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-snb: [DMESG-WARN][71] ([fdo#110789] / [fdo#111870]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-snb5/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-snb1/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [DMESG-WARN][73] ([fdo#108566]) -> [PASS][74] +2 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-apl1/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-apl7/igt@[email protected]
* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][75] ([fdo#111830 ]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb3/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb4/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- shard-hsw: [DMESG-FAIL][77] ([fdo#111991]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-hsw5/igt@i915_selftest@live_hangcheck.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-hsw8/igt@i915_selftest@live_hangcheck.html
* igt@kms_ccs@pipe-a-bad-rotation-90:
- shard-tglb: [SKIP][79] ([fdo#111595]) -> [PASS][80] +8 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb2/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb8/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [DMESG-WARN][81] ([fdo#108566]) -> [PASS][82] +3 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl7/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl3/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][83] ([fdo#104873]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-glk5/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-glk5/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [FAIL][85] ([fdo#105363]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl3/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl9/igt@[email protected]
* igt@kms_flip@flip-vs-panning-vs-hang:
- shard-skl: [DMESG-WARN][87] ([fdo#106107]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl7/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl10/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-tglb: [INCOMPLETE][89] ([fdo#111884]) -> [PASS][90] +3 similar issues
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb3/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-wc:
- shard-tglb: [FAIL][91] ([fdo#103167]) -> [PASS][92] +1 similar issue
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-wc.html
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-cpu:
- shard-iclb: [INCOMPLETE][93] ([fdo#106978] / [fdo#107713]) -> [PASS][94]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb4/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-cpu.html
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb7/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-cpu.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-tglb: [INCOMPLETE][95] -> [PASS][96]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-tglb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-plflip-blt:
- shard-skl: [INCOMPLETE][97] ([fdo#106978]) -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-skl2/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-skl1/igt@[email protected]
* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-kbl: [INCOMPLETE][99] ([fdo#103665]) -> [PASS][100] +1 similar issue
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-kbl3/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-kbl3/igt@[email protected]
* igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
- shard-iclb: [INCOMPLETE][101] ([fdo#107713] / [fdo#110041]) -> [PASS][102]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb7/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/shard-iclb8/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][103] ([fdo#109276] / [fdo#112080]) -> [FAIL][104] ([fdo#111329])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7428/shard-iclb8/igt@[email protected]
[104]: https://intel-gfx-ci.01.org
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15453/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Clear Color Support for TGL Render Decompression (rev12)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev12)
URL : https://patchwork.freedesktop.org/series/66814/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip eef8e7c65d3d drm/framebuffer: Format modifier for Intel Gen-12 render compression 3d307d5a0d3a drm/i915: Use intel_tile_height() instead of re-implementing 871adcbad142 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment a1238bf781b7 drm/i915/tgl: Gen-12 render decompression 917868f37bba drm/i915: Extract framebufer CCS offset checks into a function 296e8b66ab8f drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 559b82abcc4b drm/i915/tgl: Add Clear Color support for TGL Render Decompression -:259: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pipe' - possible side-effects? #259: FILE: drivers/gpu/drm/i915/i915_reg.h:6888: +#define PLANE_CC_VAL(pipe, plane) \ + _MMIO_PLANE(plane, _PLANE_CC_VAL_1(pipe), _PLANE_CC_VAL_2(pipe))
total: 0 errors, 0 warnings, 1 checks, 202 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for Clear Color Support for TGL Render Decompression (rev12)
In reply to Radhakrishna Sripada== Series Details ==
== Series Details ==
Series: Clear Color Support for TGL Render Decompression (rev12)
URL : https://patchwork.freedesktop.org/series/66814/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7477 -> Patchwork_15568
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/index.html
Known issues
------------
Here are the changes found in Patchwork_15568 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0:
- fi-icl-u2: [PASS][1] -> [DMESG-WARN][2] ([i915#109])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-icl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-icl-u2/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([i915#109])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-icl-u3/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [PASS][5] -> [DMESG-FAIL][6] ([i915#683])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gem_contexts:
- fi-cfl-guc: [PASS][7] -> [INCOMPLETE][8] ([fdo#106070] / [i915#424])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#111096] / [i915#323])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [INCOMPLETE][11] ([i915#694]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
#### Warnings ####
* igt@gem_exec_suspend@basic-s0:
- fi-kbl-x1275: [DMESG-WARN][13] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][14] ([i915#62] / [i915#92]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-kbl-x1275/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-kbl-x1275/igt@[email protected]
* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-x1275: [DMESG-WARN][15] ([fdo#107139] / [i915#62] / [i915#92]) -> [DMESG-WARN][16] ([fdo#107139] / [i915#62] / [i915#92] / [i915#95])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-kbl-x1275/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-kbl-x1275/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [FAIL][17] ([fdo#110829]) -> [SKIP][18] ([fdo#109271])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-kbl-guc/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-kbl-guc/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][19] ([i915#563]) -> [DMESG-FAIL][20] ([i915#683])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-hsw-4770/igt@i915_selftest@live_blt.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-hsw-4770/igt@i915_selftest@live_blt.html
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [FAIL][21] ([i915#217]) -> [DMESG-WARN][22] ([IGT#4] / [i915#263])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-icl-u2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-icl-u2/igt@[email protected]
* igt@kms_flip@basic-flip-vs-modeset:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +6 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7477/fi-kbl-x1275/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#4]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/4
[fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#110829]: https://bugs.freedesktop.org/show_bug.cgi?id=110829
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#263]: https://gitlab.freedesktop.org/drm/intel/issues/263
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#683]: https://gitlab.freedesktop.org/drm/intel/issues/683
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#710]: https://gitlab.freedesktop.org/drm/intel/issues/710
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (52 -> 46)
------------------------------
Missing (6): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7477 -> Patchwork_15568
CI-20190529: 20190529
CI_DRM_7477: 4e1a5310e718283f5d6af658cd54e9a67bf90aa8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5323: b0f877d06a78b9c38ed246be2537a0453b6c214f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15568: 559b82abcc4b07ff77035d3c9941a88f35dd6729 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
559b82abcc4b drm/i915/tgl: Add Clear Color support for TGL Render Decompression 296e8b66ab8f drm/framebuffer/tgl: Format modifier for Intel Gen 12 render compression with Clear Color 917868f37bba drm/i915: Extract framebufer CCS offset checks into a function a1238bf781b7 drm/i915/tgl: Gen-12 render decompression871adcbad142 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment 3d307d5a0d3a drm/i915: Use intel_tile_height() instead of re-implementing eef8e7c65d3d drm/framebuffer: Format modifier for Intel Gen-12 render compression
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15568/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx