Compression support for Lunarlake
v7 cover Compression support for Lunarlake
Series enables the compression feature for Lunarlake and address various changes of the feature from Gen12. The Main-to-CCS ratio has been changed to 512:1. This changes the calculations and value for fields such as CCS Copy size for blitter command APIs.
This patch series updates tests xe_ccs and gem_ccs for XE2. This series doesn't solve "in-place" and "suspend-resume" subtests.
These changes are based on top of the "vm_bind pat_index" patch here:
https://patchwork.freedesktop.org/series/124667/
v2: Lots of improvements/tweaks (Kamil)
Addressed review comments (Matthew, Karolina)
v3: Reused dg2_xy_fast_copy definition for defing xe2_cmds_info struct(Karolina)
Split the patch to address ccs_size calculation and updatingpat_index, updated the intel_get_pat_idx_uc_comp function as per review comments (Kamil)
v4: Addressed review comments (Karolina)
Rebase. Removed few unnecessary conditions, plus few fixes.
v5: Addressed Review comments (Matthew, Zbigniew)
Rebase, Fixes for pre-merge IGT tests.
v6: Addressed Review comments (Matthew)
v7: Addressed Review comments (Zbigniew, Kamil)
Akshata Jahagirdar (6):
lib: Add blt command properties for lunarlake lib/intel_blt: Update calculation of ccs_size and size_of_ctrl_copy lib/intel_pat: Add uc_comp pat_index
lib/intel_blt: Update caching mode and pat_index lib/xe/xe_util: Align obj size before bind/unbind tests/intel/xe_ccs: Add compression support for Lunarlake
lib/intel_blt.c | 24 +++++++++++++++++------- lib/intel_blt.h | 2 +- lib/intel_cmds_info.c | 16 ++++++++++++++++ lib/intel_cmds_info.h | 1 + lib/intel_device_info.c | 2 +- lib/intel_pat.c | 14 +++++++++++++- lib/intel_pat.h | 2 ++ lib/xe/xe_util.c | 2 +- tests/intel/gem_ccs.c | 2 +- tests/intel/xe_ccs.c | 40 +++++++++++++++++++++++++--------------- 10 files changed, 78 insertions(+), 27 deletions(-)
Signature · 1 line
2.34.1
PATCH v7 1/6 lib: Add blt command properties for lunarlake
Add struct to describe properties of XY_BLOCK_COPY for XE2 platform. Reuse XY_FAST_COPY struct from DG2 and Update the definitions for Lunarlake.
--- lib/intel_cmds_info.c | 16 ++++++++++++++++ lib/intel_cmds_info.h | 1 + lib/intel_device_info.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-)
lib/intel_cmds_info.c +16 -0
@@ -67,6 +67,15 @@ static const struct blt_cmd_infoBLT_CMD_EXTENDED | BLT_CMD_SUPPORTS_COMPRESSION); +static const struct blt_cmd_info + xe2_xy_block_copy =BLT_INFO_EXT (XY_BLOCK_COPY , +BIT (T_LINEAR ) | +BIT (T_XMAJOR ) | +BIT (T_TILE4 ) | +BIT (T_TILE64 ), +BLT_CMD_EXTENDED | +BLT_CMD_SUPPORTS_COMPRESSION ); +static const struct blt_cmd_info mtl_xy_block_copy = BLT_INFO_EXT(XY_BLOCK_COPY, BIT(T_LINEAR) |
@@ -169,6 +178,13 @@ const struct intel_cmds_info gen12_pvc_cmds_info = { } }; +const struct intel_cmds_info xe2_cmds_info = { + .blt_cmds = { + [XY_FAST_COPY ] = &dg2_xy_fast_copy, + [XY_BLOCK_COPY ] = &xe2_xy_block_copy, + } +}; +const struct blt_cmd_info *blt_get_cmd_info (const struct intel_cmds_info *cmds_info,enum blt_cmd_type cmd) {
lib/intel_cmds_info.h +1 -0
@@ -55,6 +55,7 @@ extern const struct intel_cmds_info gen12_cmds_info;extern const struct intel_cmds_info gen12_dg2_cmds_info;extern const struct intel_cmds_info gen12_mtl_cmds_info;extern const struct intel_cmds_info gen12_pvc_cmds_info; +extern const struct intel_cmds_info xe2_cmds_info;#define for_each_tiling (__tiling) \ for (__tiling = T_LINEAR; __tiling < __BLT_MAX_TILING; __tiling++)
lib/intel_device_info.c +1 -1
@@ -511,7 +511,7 @@ static const struct intel_device_info intel_lunarlake_info = { .has_4tile = true, .is_lunarlake = true, .codename = "lunarlake", - .cmds_info = &gen12_pvc_cmds_info, + .cmds_info = &xe2_cmds_info, };static const struct pci_id_match intel_device_match[] = {
Signature · 1 line
2.34.1
PATCH v7 2/6 lib/intel_blt: Update calculation of ccs_size and size_of_ctrl_copy
In reply to Akshata JahagirdarThe Main-to-CCS Ratio for XE2 has been changed to 512:1. Update the CCS_RATIO macro to select relevant ratio based on platform. Update the ccs_ratio call in gem_ccs and xe_ccs tests
based on previous change.
--- lib/intel_blt.c | 13 ++++++++----- lib/intel_blt.h | 2 +- tests/intel/gem_ccs.c | 2 +- tests/intel/xe_ccs.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-)
lib/intel_blt.c +8 -5
@@ -948,15 +948,16 @@ int blt_block_copy(int fd,return ret; } -static uint16_t __ccs_size (const struct blt_ctrl_surf_copy_data *surf) +static uint16_t __ccs_size (int fd,const struct blt_ctrl_surf_copy_data *surf) {uint32_t src_size, dst_size; +uint16_t ccsratio =CCS_RATIO (fd); src_size = surf->src.access_type ==DIRECT_ACCESS ? - surf->src.size : surf->src.size /CCS_RATIO ; + surf->src.size : surf->src.size / ccsratio; dst_size = surf->dst.access_type ==DIRECT_ACCESS ? - surf->dst.size : surf->dst.size /CCS_RATIO ; + surf->dst.size : surf->dst.size / ccsratio;igt_assert_f (src_size <= dst_size,"dst size must be >= src size for CCS copy\n" );
@@ -1118,6 +1119,8 @@ uint64_t emit_blt_ctrl_surf_copy(int fd,uint64_t dst_offset, src_offset, bb_offset, alignment;uint32_t bbe =MI_BATCH_BUFFER_END ;uint32_t *bb; +uint16_t num_ccs_blocks = (ip_ver >=IP_VER (20 ,0 )) ? + (xe_get_default_alignment (fd) /CCS_RATIO (fd)) :CCS_RATIO (fd);igt_assert_f (ahnd,"ctrl-surf-copy supports softpin only\n" );igt_assert_f (surf,"ctrl-surf-copy requires data to do ctrl-surf-copy blit\n" );
@@ -1136,7 +1139,7 @@ uint64_t emit_blt_ctrl_surf_copy(int fd, data.xe2.dw00.dst_access_type = surf->dst.access_type;/* Ensure dst has size capable to keep src ccs aux */ - data.xe2.dw00.size_of_ctrl_copy =__ccs_size (surf) /CCS_RATIO -1 ; + data.xe2.dw00.size_of_ctrl_copy =__ccs_size (fd, surf) / num_ccs_blocks -1 ; data.xe2.dw00.length =0x3 ; data.xe2.dw01.src_address_lo = src_offset;
@@ -1155,7 +1158,7 @@ uint64_t emit_blt_ctrl_surf_copy(int fd, data.gen12.dw00.dst_access_type = surf->dst.access_type;/* Ensure dst has size capable to keep src ccs aux */ - data.gen12.dw00.size_of_ctrl_copy =__ccs_size (surf) /CCS_RATIO -1 ; + data.gen12.dw00.size_of_ctrl_copy =__ccs_size (fd, surf) / num_ccs_blocks -1 ; data.gen12.dw00.length =0x3 ; data.gen12.dw01.src_address_lo = src_offset;
lib/intel_blt.h +1 -1
@@ -52,7 +52,7 @@#include "igt.h" #include "intel_cmds_info.h" -#define CCS_RATIO 256 +#define CCS_RATIO (fd) (AT_LEAST_GEN(intel_get_drm_devid(fd), 20) ? 512 : 256)enum blt_color_depth { CD_8bit,
tests/intel/gem_ccs.c +1 -1
@@ -99,7 +99,7 @@ static void surf_copy(int i915,struct blt_block_copy_data_ext ext = {};struct blt_ctrl_surf_copy_data surf = {};uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2; -uint64_t bb_size, ccssize = mid->size /CCS_RATIO ; +uint64_t bb_size, ccssize = mid->size /CCS_RATIO (i915);uint32_t *ccscopy;uint8_t uc_mocs =intel_get_uc_mocs_index (i915);int result;
tests/intel/xe_ccs.c +1 -1
@@ -95,7 +95,7 @@ static void surf_copy(int xe,struct blt_block_copy_data_ext ext = {};struct blt_ctrl_surf_copy_data surf = {};uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2; -uint64_t bb_size, ccssize = mid->size /CCS_RATIO ; +uint64_t bb_size, ccssize = mid->size /CCS_RATIO (xe);uint32_t *ccscopy;uint8_t uc_mocs =intel_get_uc_mocs_index (xe);uint32_t sysmem =system_memory (xe);
Signature · 1 line
2.34.1
PATCH v7 3/6 lib/intel_pat: Add uc_comp pat_index
In reply to Akshata JahagirdarCompression in XE2 is programmed through pat-index attribute. Add a dedicated pat-index for compression for XE2 and later platforms. The caller to this helper function ensures GFX version is correct.
--- lib/intel_pat.c | 14 +++++++++++++- lib/intel_pat.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-)
lib/intel_pat.c +13 -1
@@ -11,7 +11,7 @@ struct intel_pat_cache {uint8_t uc;/* UC + COH_NONE */ uint8_t wt;/* WT + COH_NONE */ uint8_t wb;/* WB + COH_AT_LEAST_1WAY */ - +uint8_t uc_comp;/* UC + COH_NONE + COMPRESSION, XE2 and later*/ uint8_t max_index; };
@@ -23,6 +23,7 @@ static void intel_get_pat_idx(int fd, struct intel_pat_cache *pat) pat->uc =3 ; pat->wt =15 ;/* Compressed + WB-transient */ pat->wb =2 ; + pat->uc_comp =12 ;/* Compressed + UC, XE2 and later */ pat->max_index =31 ; }else if (IS_METEORLAKE (dev_id)) { pat->uc =2 ;
@@ -60,6 +61,17 @@ uint8_t intel_get_pat_idx_uc(int fd)return pat.uc; } +uint8_t intel_get_pat_idx_uc_comp (int fd) +{ +struct intel_pat_cache pat = {}; +uint16_t dev_id =intel_get_drm_devid (fd); + +igt_assert (AT_LEAST_GEN (dev_id,20 )); + +intel_get_pat_idx (fd, &pat); +return pat.uc_comp; +} +uint8_t intel_get_pat_idx_wt (int fd) {struct intel_pat_cache pat = {};
lib/intel_pat.h +2 -0
@@ -16,4 +16,6 @@ uint8_t intel_get_pat_idx_uc(int fd);uint8_t intel_get_pat_idx_wt (int fd);uint8_t intel_get_pat_idx_wb (int fd); +uint8_t intel_get_pat_idx_uc_comp (int fd); +#endif /* INTEL_PAT_H */
Signature · 1 line
2.34.1
PATCH v7 4/6 lib/intel_blt: Update caching mode and pat_index
In reply to Akshata JahagirdarThe pat-index and caching mode for compression need to change to uc_comp in case of compression, else they just take the default value of pat_index and caching.
--- lib/intel_blt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
lib/intel_blt.c +9 -2
@@ -1797,6 +1797,7 @@ blt_create_object(const struct blt_copy_data *blt, uint32_t region,uint64_t size = width * height * bpp /8 ;uint32_t stride = tiling ==T_LINEAR ? width *4 : width;uint32_t handle; +uint8_t pat_index =DEFAULT_PAT_INDEX ;igt_assert_f (blt->driver,"Driver isn't set, have you called blt_copy_init()?\n" );
@@ -1806,18 +1807,24 @@ blt_create_object(const struct blt_copy_data *blt, uint32_t region,if (blt->driver ==INTEL_DRIVER_XE ) {uint64_t flags =0 ; +uint16_t cpu_caching =__xe_default_cpu_caching (blt->fd, region, flags);if (create_mapping && region !=system_memory (blt->fd)) flags |=DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM ; +if (AT_LEAST_GEN (intel_get_drm_devid (blt->fd),20 ) && compression) { + pat_index =intel_get_pat_idx_uc_comp (blt->fd); + cpu_caching =DRM_XE_GEM_CPU_CACHING_WC ; + } + size =ALIGN (size,xe_get_default_alignment (blt->fd)); - handle =xe_bo_create (blt->fd,0 , size, region, flags); + handle =xe_bo_create_caching (blt->fd,0 , size, region, flags, cpu_caching); }else {igt_assert (__gem_create_in_memory_regions (blt->fd, &handle, &size, region) ==0 ); } -blt_set_object (obj, handle, size, region, mocs_index,DEFAULT_PAT_INDEX , tiling, +blt_set_object (obj, handle, size, region, mocs_index, pat_index, tiling, compression, compression_type);blt_set_geom (obj, stride,0 ,0 , width, height,0 ,0 );
Signature · 1 line
2.34.1
PATCH v7 5/6 lib/xe/xe_util: Align obj size before bind/unbind
In reply to Akshata JahagirdarAlter the range to default_alignment before vm bind/unbind operation to align the buffer object size with page size.
--- lib/xe/xe_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/xe/xe_util.c +1 -1
@@ -148,7 +148,7 @@ static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe, ops->flags = flags; ops->obj_offset =0 ; ops->addr = obj->offset; - ops->range = obj->size; + ops->range =ALIGN (obj->size,4096 ); ops->prefetch_mem_region_instance =0 ;if (obj->pat_index ==DEFAULT_PAT_INDEX ) ops->pat_index =intel_get_pat_idx_wb (xe);
Signature · 1 line
2.34.1
PATCH v7 6/6 tests/intel/xe_ccs: Add compression support for Lunarlake
In reply to Akshata JahagirdarIn XE2 IGFX platform only sysmem participates in compression.
So for XE2 IGFX platform, create all blt objects in sysmem itself, For other platform, it will stay the same way as per previous implementation. Also update the pat-index to reflect the compression status.
--- tests/intel/xe_ccs.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-)
tests/intel/xe_ccs.c +24 -14
@@ -96,20 +96,27 @@ static void surf_copy(int xe,struct blt_ctrl_surf_copy_data surf = {};uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2;uint64_t bb_size, ccssize = mid->size /CCS_RATIO (xe); +uint64_t ccs_bo_size =xe_get_default_alignment (xe);uint32_t *ccscopy;uint8_t uc_mocs =intel_get_uc_mocs_index (xe);uint32_t sysmem =system_memory (xe); +uint8_t comp_pat_index =DEFAULT_PAT_INDEX ; +uint16_t cpu_caching =__xe_default_cpu_caching (xe, sysmem,0 );int result;igt_assert (mid->compression); +if (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) && mid->compression) { + comp_pat_index =intel_get_pat_idx_uc_comp (xe); + cpu_caching =DRM_XE_GEM_CPU_CACHING_WC ; + } ccscopy = (uint32_t *)malloc (ccssize); - ccs =xe_bo_create (xe,0 , ccssize, sysmem,0 ); - ccs2 =xe_bo_create (xe,0 , ccssize, sysmem,0 ); + ccs =xe_bo_create_caching (xe,0 , ccs_bo_size, sysmem,0 , cpu_caching); + ccs2 =xe_bo_create_caching (xe,0 , ccs_bo_size, sysmem,0 , cpu_caching);blt_ctrl_surf_copy_init (xe, &surf); surf.print_bb = param.print_bb;blt_set_ctrl_surf_object (&surf.src, mid->handle, mid->region, mid->size, - uc_mocs,DEFAULT_PAT_INDEX ,BLT_INDIRECT_ACCESS ); + uc_mocs, comp_pat_index,BLT_INDIRECT_ACCESS );blt_set_ctrl_surf_object (&surf.dst, ccs, sysmem, ccssize, uc_mocs,DEFAULT_PAT_INDEX ,DIRECT_ACCESS ); bb_size =xe_get_default_alignment (xe);
@@ -157,7 +164,7 @@ static void surf_copy(int xe,blt_set_ctrl_surf_object (&surf.src, ccs, sysmem, ccssize, uc_mocs,DEFAULT_PAT_INDEX ,DIRECT_ACCESS );blt_set_ctrl_surf_object (&surf.dst, mid->handle, mid->region, mid->size, - uc_mocs,DEFAULT_PAT_INDEX ,INDIRECT_ACCESS ); + uc_mocs, comp_pat_index,INDIRECT_ACCESS );blt_ctrl_surf_copy (xe, ctx,NULL , ahnd, &surf);intel_ctx_xe_sync (ctx, true);
@@ -234,10 +241,10 @@ static int blt_block_copy3(int xe,igt_assert_f (blt3,"block-copy3 requires data to do blit\n" ); alignment =xe_get_default_alignment (xe); -get_offset (ahnd, blt3->src.handle, blt3->src.size, alignment); -get_offset (ahnd, blt3->mid.handle, blt3->mid.size, alignment); -get_offset (ahnd, blt3->dst.handle, blt3->dst.size, alignment); -get_offset (ahnd, blt3->final.handle, blt3->final.size, alignment); +get_offset_pat_index (ahnd, blt3->src.handle, blt3->src.size, alignment, blt3->src.pat_index); +get_offset_pat_index (ahnd, blt3->mid.handle, blt3->mid.size, alignment, blt3->mid.pat_index); +get_offset_pat_index (ahnd, blt3->dst.handle, blt3->dst.size, alignment, blt3->dst.pat_index); +get_offset_pat_index (ahnd, blt3->final.handle, blt3->final.size, alignment, blt3->final.pat_index); bb_offset =get_offset (ahnd, blt3->bb.handle, blt3->bb.size, alignment);/* First blit src -> mid */
@@ -291,8 +298,9 @@ static void block_copy(int xe,uint64_t bb_size =xe_get_default_alignment (xe);uint64_t ahnd =intel_allocator_open (xe, ctx->vm,INTEL_ALLOCATOR_RELOC );uint32_t run_id = mid_tiling; -uint32_t mid_region = region2, bb; -uint32_t width = param.width, height = param.height; +uint32_t mid_region = (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) & + !xe_has_vram (xe)) ? region1 : region2; +uint32_t width = param.width, height = param.height, bb;enum blt_compression mid_compression = config->compression;int mid_compression_format = param.compression_format;enum blt_compression_type comp_type =COMPRESSION_TYPE_3D ;
@@ -413,8 +421,9 @@ static void block_multicopy(int xe,uint64_t bb_size =xe_get_default_alignment (xe);uint64_t ahnd =intel_allocator_open (xe, ctx->vm,INTEL_ALLOCATOR_RELOC );uint32_t run_id = mid_tiling; -uint32_t mid_region = region2, bb; -uint32_t width = param.width, height = param.height; +uint32_t mid_region = (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) & + !xe_has_vram (xe)) ? region1 : region2; +uint32_t width = param.width, height = param.height, bb;enum blt_compression mid_compression = config->compression;int mid_compression_format = param.compression_format;enum blt_compression_type comp_type =COMPRESSION_TYPE_3D ;
@@ -539,8 +548,9 @@ static void block_copy_test(int xe, region1 =igt_collection_get_value (regions,0 ); region2 =igt_collection_get_value (regions,1 ); -/* Compressed surface must be in device memory */ -if (config->compression && !XE_IS_VRAM_MEMORY_REGION (xe, region2)) +/* if not XE2, then Compressed surface must be in device memory */ +if (config->compression && !(AT_LEAST_GEN ((intel_get_drm_devid (xe)),20 )) && + !XE_IS_VRAM_MEMORY_REGION (xe, region2))continue ; regtxt =xe_memregion_dynamic_subtest_name (xe, regions);
Signature · 1 line
2.34.1
Patchwork
CI✓ CI.xeBAT: success for Compression support for Lunarlake (rev2)
In reply to Akshata Jahagirdar== Series Details ==
== Series Details ==
Series: Compression support for Lunarlake (rev2)
URL : https://patchwork.freedesktop.org/series/127863/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7643_BAT -> XEIGTPW_10427_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_10427_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- bat-adlp-7: [PASS][1] -> [FAIL][2] ([Intel XE#480]) +2 other tests fail
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10427/bat-adlp-7/igt@kms_flip@[email protected]
* igt@xe_prime_self_import@basic-with_fd_dup:
- bat-atsm-2: [PASS][3] -> [FAIL][4] ([Intel XE#999])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10427/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
#### Possible fixes ####
* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- bat-adlp-7: [FAIL][5] ([i915#2346]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10427/bat-adlp-7/igt@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank:
- bat-dg2-oem2: [FAIL][7] ([Intel XE#480]) -> [PASS][8] +1 other test pass
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank.html
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10427/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank.html
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#999]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/999
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
Build changes
-------------
* IGT: IGT_7643 -> IGTPW_10427
* Linux: xe-577-5cd1893366708380854f4694ae57417192458a6b -> xe-579-6154a8abd3c0766b93740feb7e0268ae3f425849
IGTPW_10427: 10427
IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-577-5cd1893366708380854f4694ae57417192458a6b: 5cd1893366708380854f4694ae57417192458a6b xe-579-6154a8abd3c0766b93740feb7e0268ae3f425849: 6154a8abd3c0766b93740feb7e0268ae3f425849
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10427/index.html
Patchwork
CI✗ Fi.CI.BAT: failure for Compression support for Lunarlake (rev2)
In reply to Akshata Jahagirdar== Series Details ==
== Series Details ==
Series: Compression support for Lunarlake (rev2)
URL : https://patchwork.freedesktop.org/series/127863/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14027 -> IGTPW_10427
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10427 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10427, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10427/index.html
Participating hosts (37 -> 36)
------------------------------
Additional (1): bat-adlp-11
Missing (2): bat-mtlp-8 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10427:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@load:
- bat-adlp-11: NOTRUN -> [ABORT][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10427/bat-adlp-11/igt@[email protected]
Known issues
------------
Here are the changes found in IGTPW_10427 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_pm_rpm@basic-rte:
- bat-rpls-2: [PASS][2] -> [ABORT][3] ([i915#8668])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14027/bat-rpls-2/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10427/bat-rpls-2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7643 -> IGTPW_10427
CI-20190529: 20190529
CI_DRM_14027: 961ef418705ac5808345e883acd91f8ce167e00b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10427: 10427
IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10427/index.html
Cavitt, Jonathan
Acked-byRE: [PATCH i-g-t v7 5/6] lib/xe/xe_util: Align obj size before bind/unbind
In reply to a message not in the archive-----Original Message-----
Quoted 16 lines
From: Jahagirdar, Akshata <[email protected]>
Sent: Friday, December 15, 2023 1:10 PM
Cc: [email protected]; Siddiqui, Ayaz A <[email protected]>; Mishra, Pallavi <[email protected]>; [email protected]; Kempczynski, Zbigniew <[email protected]>; Auld, Matthew <[email protected]>; Jahagirdar, Akshata <[email protected]>
Subject: [PATCH i-g-t v7 5/6]lib/xe/xe_util: Align obj size before bind/unbindAlter the range to
default_alignmentbefore vm bind/unbind operation to align the buffer object size with page size.Signed-off-by Akshata Jahagirdar <[email protected]>--- lib/xe/xe_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/xe/xe_util.c static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe, · line 151
Quoted 5 lines
lib/xe/xe_util.c +1
-1@@ -148,7 +148,7 @@ static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe, ops->flags = flags; ops->obj_offset =0 ; ops->addr = obj->offset; - ops->range = obj->size; + ops->range =ALIGN (obj->size,4096 );
Hrmm... I was briefly concerned with us hard-coding the page size here, but it looks like we do so in a lot of places in the code, so I guess there's precedent.
-Jonathan Cavitt
Quoted 7 lines
lib/xe/xe_util.c +0
-1ops->prefetch_mem_region_instance =0 ;if (obj->pat_index ==DEFAULT_PAT_INDEX ) ops->pat_index =intel_get_pat_idx_wb (xe); --2.34.1
Re: [PATCH i-g-t v7 5/6] lib/xe/xe_util: Align obj size before bind/unbind
In reply to Akshata JahagirdarQuoted 24 lines · Akshata Jahagirdar
Alter the range to
default_alignmentbefore vm bind/unbind operation to align the buffer object size with page size.Signed-off-by Akshata Jahagirdar <[email protected]>--- lib/xe/xe_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/xe/xe_util.c +1
-1@@ -148,7 +148,7 @@ static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe, ops->flags = flags; ops->obj_offset =0 ; ops->addr = obj->offset; - ops->range = obj->size; + ops->range =ALIGN (obj->size,4096 ); ops->prefetch_mem_region_instance =0 ;if (obj->pat_index ==DEFAULT_PAT_INDEX ) ops->pat_index =intel_get_pat_idx_wb (xe);Signature · 1 line
2.34.1
LGTM, but please extend commit message why aligning to page size is necessary. With this:
--
Zbigniew
Re: [PATCH i-g-t v7 6/6] tests/intel/xe_ccs: Add compression support for Lunarlake
In reply to Akshata JahagirdarQuoted 108 lines · Akshata Jahagirdar
In XE2 IGFX platform only sysmem participates in compression.
So for XE2 IGFX platform, create all blt objects in sysmem itself, For other platform, it will stay the same way as per previous implementation. Also update the pat-index to reflect the compression status.Signed-off-by Akshata Jahagirdar <[email protected]>--- tests/intel/xe_ccs.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-)tests/intel/xe_ccs.c +24
-14@@ -96,20 +96,27 @@ static void surf_copy(int xe,struct blt_ctrl_surf_copy_data surf = {};uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2;uint64_t bb_size, ccssize = mid->size /CCS_RATIO (xe); +uint64_t ccs_bo_size =xe_get_default_alignment (xe);uint32_t *ccscopy;uint8_t uc_mocs =intel_get_uc_mocs_index (xe);uint32_t sysmem =system_memory (xe); +uint8_t comp_pat_index =DEFAULT_PAT_INDEX ; +uint16_t cpu_caching =__xe_default_cpu_caching (xe, sysmem,0 );int result;igt_assert (mid->compression); +if (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) && mid->compression) { + comp_pat_index =intel_get_pat_idx_uc_comp (xe); + cpu_caching =DRM_XE_GEM_CPU_CACHING_WC ; + } ccscopy = (uint32_t *)malloc (ccssize); - ccs =xe_bo_create (xe,0 , ccssize, sysmem,0 ); - ccs2 =xe_bo_create (xe,0 , ccssize, sysmem,0 ); + ccs =xe_bo_create_caching (xe,0 , ccs_bo_size, sysmem,0 , cpu_caching); + ccs2 =xe_bo_create_caching (xe,0 , ccs_bo_size, sysmem,0 , cpu_caching);blt_ctrl_surf_copy_init (xe, &surf); surf.print_bb = param.print_bb;blt_set_ctrl_surf_object (&surf.src, mid->handle, mid->region, mid->size, - uc_mocs,DEFAULT_PAT_INDEX ,BLT_INDIRECT_ACCESS ); + uc_mocs, comp_pat_index,BLT_INDIRECT_ACCESS );blt_set_ctrl_surf_object (&surf.dst, ccs, sysmem, ccssize, uc_mocs,DEFAULT_PAT_INDEX ,DIRECT_ACCESS ); bb_size =xe_get_default_alignment (xe);@@ -157,7 +164,7 @@ static void surf_copy(int xe,blt_set_ctrl_surf_object (&surf.src, ccs, sysmem, ccssize, uc_mocs,DEFAULT_PAT_INDEX ,DIRECT_ACCESS );blt_set_ctrl_surf_object (&surf.dst, mid->handle, mid->region, mid->size, - uc_mocs,DEFAULT_PAT_INDEX ,INDIRECT_ACCESS ); + uc_mocs, comp_pat_index,INDIRECT_ACCESS );blt_ctrl_surf_copy (xe, ctx,NULL , ahnd, &surf);intel_ctx_xe_sync (ctx, true);@@ -234,10 +241,10 @@ static int blt_block_copy3(int xe,igt_assert_f (blt3,"block-copy3 requires data to do blit\n" ); alignment =xe_get_default_alignment (xe); -get_offset (ahnd, blt3->src.handle, blt3->src.size, alignment); -get_offset (ahnd, blt3->mid.handle, blt3->mid.size, alignment); -get_offset (ahnd, blt3->dst.handle, blt3->dst.size, alignment); -get_offset (ahnd, blt3->final.handle, blt3->final.size, alignment); +get_offset_pat_index (ahnd, blt3->src.handle, blt3->src.size, alignment, blt3->src.pat_index); +get_offset_pat_index (ahnd, blt3->mid.handle, blt3->mid.size, alignment, blt3->mid.pat_index); +get_offset_pat_index (ahnd, blt3->dst.handle, blt3->dst.size, alignment, blt3->dst.pat_index); +get_offset_pat_index (ahnd, blt3->final.handle, blt3->final.size, alignment, blt3->final.pat_index); bb_offset =get_offset (ahnd, blt3->bb.handle, blt3->bb.size, alignment);/* First blit src -> mid */ @@ -291,8 +298,9 @@ static void block_copy(int xe,uint64_t bb_size =xe_get_default_alignment (xe);uint64_t ahnd =intel_allocator_open (xe, ctx->vm,INTEL_ALLOCATOR_RELOC );uint32_t run_id = mid_tiling; -uint32_t mid_region = region2, bb; -uint32_t width = param.width, height = param.height; +uint32_t mid_region = (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) & + !xe_has_vram (xe)) ? region1 : region2; +uint32_t width = param.width, height = param.height, bb;enum blt_compression mid_compression = config->compression;int mid_compression_format = param.compression_format;enum blt_compression_type comp_type =COMPRESSION_TYPE_3D ;@@ -413,8 +421,9 @@ static void block_multicopy(int xe,uint64_t bb_size =xe_get_default_alignment (xe);uint64_t ahnd =intel_allocator_open (xe, ctx->vm,INTEL_ALLOCATOR_RELOC );uint32_t run_id = mid_tiling; -uint32_t mid_region = region2, bb; -uint32_t width = param.width, height = param.height; +uint32_t mid_region = (AT_LEAST_GEN (intel_get_drm_devid (xe),20 ) & + !xe_has_vram (xe)) ? region1 : region2; +uint32_t width = param.width, height = param.height, bb;enum blt_compression mid_compression = config->compression;int mid_compression_format = param.compression_format;enum blt_compression_type comp_type =COMPRESSION_TYPE_3D ;@@ -539,8 +548,9 @@ static void block_copy_test(int xe, region1 =igt_collection_get_value (regions,0 ); region2 =igt_collection_get_value (regions,1 ); -/* Compressed surface must be in device memory */ -if (config->compression && !XE_IS_VRAM_MEMORY_REGION (xe, region2)) +/* if not XE2, then Compressed surface must be in device memory */ +if (config->compression && !(AT_LEAST_GEN ((intel_get_drm_devid (xe)),20 )) && + !XE_IS_VRAM_MEMORY_REGION (xe, region2))continue ; regtxt =xe_memregion_dynamic_subtest_name (xe, regions);Signature · 1 line
2.34.1
LGTM, inplace you'll handle with:
tests/intel/xe_ccs.c +6 -1
@@ -461,8 +461,13 @@ static void block_multicopy(int xe,blt_set_copy_object (&blt3.final, final);if (config->inplace) { +uint8_t pat_index =DEFAULT_PAT_INDEX ; + +if (AT_LEAST_GEN (intel_get_drm_devid (blt.fd),20 ) && config->compression) + pat_index =intel_get_pat_idx_uc_comp (blt.fd); +blt_set_object (&blt3.dst, mid->handle, dst->size, mid->region, - mid->mocs_index,DEFAULT_PAT_INDEX , mid_tiling, + mid->mocs_index, pat_index, mid_tiling,COMPRESSION_DISABLED , comp_type); blt3.dst.ptr = mid->ptr; }
--
Zbigniew
Patchwork
CI✗ Fi.CI.BUILD: failure for Compression support for Lunarlake (rev3)
In reply to Akshata Jahagirdar== Series Details ==
== Series Details ==
Series: Compression support for Lunarlake (rev3)
URL : https://patchwork.freedesktop.org/series/127863/
State : failure
== Summary ==
Applying: lib: Add blt command properties for lunarlake
Applying: lib/intel_blt: Update calculation of ccs_size and size_of_ctrl_copy
Applying: lib/intel_pat: Add uc_comp pat_index
Applying: lib/intel_blt: Update caching mode and pat_index
Applying: lib/xe/xe_util: Align obj size before bind/unbind
Applying: tests/intel/xe_ccs: Add compression support for Lunarlake Patch failed at 0006 tests/intel/xe_ccs: Add compression support for Lunarlake When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".