drm/i915/dg2: Enabling 64k page size and flat ccs
Subsystems (5)
v3 cover drm/i915/dg2: Enabling 64k page size and flat ccs
This series introduces the enabling patches for new memory compression feature Flat CCS and 64k page support for i915 local memory, along with documentation on the uAPI impact. Included the details of the feature and the implications on the uAPI below. Which is also added into Documentation/gpu/rfc/i915_dg2.rst
DG2 64K page size support:
=========================
On discrete platforms, starting from DG2, we have to contend with GTT page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE objects. Specifically the hardware only supports 64K or larger GTT page sizes for such memory. The kernel will already ensure that all I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page sizes underneath.
Note that the returned size here will always reflect any required rounding up done by the kernel, i.e 4K will now become 64K on devices such as DG2.
Special DG2 GTT address alignment requirement:
=============================================
The GTT alignment will also need be at least 64K for such objects.
Note that due to how the hardware implements 64K GTT page support, we have some further complications:
1) The entire PDE(which covers a 2M virtual address range), must contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same PDE is forbidden by the hardware.
2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM objects.
To handle the above the kernel implements a memory coloring scheme to prevent userspace from mixing I915_MEMORY_CLASS_DEVICE and I915_MEMORY_CLASS_SYSTEM objects in the same PDE. If the kernel is ever unable to evict the required pages for the given PDE(different color) when inserting the object into the GTT then it will simply fail the request.
Since userspace needs to manage the GTT address space themselves, special care is needed to ensure this doesn’t happen. The simplest scheme is to simply align and round up all I915_MEMORY_CLASS_DEVICE objects to 2M, which avoids any issues here. At the very least this is likely needed for objects that can be placed in both I915_MEMORY_CLASS_DEVICE and I915_MEMORY_CLASS_SYSTEM, to avoid potential issues when the kernel needs to migrate the object behind the scenes, since that might also involve evicting other objects.
To summarise the GTT rules, on platforms like DG2:
1) All objects that can be placed in I915_MEMORY_CLASS_DEVICE must have 64K alignment. The kernel will reject this otherwise.
2) All I915_MEMORY_CLASS_DEVICE objects must never be placed in the same PDE with other I915_MEMORY_CLASS_SYSTEM objects. The kernel will reject this otherwise.
3) Objects that can be placed in both I915_MEMORY_CLASS_DEVICE and I915_MEMORY_CLASS_SYSTEM should probably be aligned and padded out to 2M.
Flat CCS support for lmem
=========================
On Xe-HP and later devices, we use dedicated compression control state (CCS) stored in local memory for each surface, to support the 3D and media compression formats.
The memory required for the CCS of the entire local memory is 1/256 of the local memory size. So before the kernel boot, the required memory is reserved for the CCS data and a secure register will be programmed with the CCS base address.
Flat CCS data needs to be cleared when a lmem object is allocated. And CCS data can be copied in and out of CCS region through XY_CTRL_SURF_COPY_BLT. CPU can’t access the CCS data directly.
When we exaust the lmem, if the object’s placements support smem, then we can directly decompress the compressed lmem object into smem and start using it from smem itself.
But when we need to swapout the compressed lmem object into a smem region though objects’ placement doesn’t support smem, then we copy the lmem content as it is into smem region along with ccs data (using XY_CTRL_SURF_COPY_BLT). When the object is referred, lmem content will be swaped in along with restoration of the CCS data (using XY_CTRL_SURF_COPY_BLT) at corresponding location.
Flat-CCS Modifiers for different compression formats
====================================================I915_FORMAT_MOD_F_TILED_DG2_RC_CCS - used to indicate the buffers of Flat CCS render compression formats. Though the general layout is same as I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, new hashing/compression algorithm is used. Render compression uses 128 byte compression blocks
I915_FORMAT_MOD_F_TILED_DG2_MC_CCS -used to indicate the buffers of Flat CCS media compression formats. Though the general layout is same as I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, new hashing/compression algorithm is used. Media compression uses 256 byte compression blocks.
I915_FORMAT_MOD_F_TILED_DG2_RC_CCS_CC - used to indicate the buffers of Flat CCS clear color render compression formats. Unified compression format for clear color render compression. The genral layout is a tiled layout using 4Kb tiles i.e Tile4 layout.
v2:
Fixed some formatting issues and platform naming issues Added some more documentation on Flat-CCS
v3:
Plane programming is handled for flat-ccs and clear color Tile4 and flat ccs modifier patches are rebased on table based
modifier reference method
Three patches are squashed
Y tile is pruned for DG2.
flat_ccs_cc plane format info is added
Added mesa, compute and media ppl for required uAPI ack.
Abdiel Janulgue (1):
drm/i915/lmem: Enable lmem for platforms with Flat CCS
Anshuman Gupta (1):
drm/i915/dg2: Plane handling for Flat CCS and clear color
Ayaz A Siddiqui (1):
drm/i915/gt: Clear compress metadata for Xe_HP platforms
CQ Tang (1):
drm/i915/xehpsdv: Add has_flat_ccs to device info
Matt Roper (1):
uapi/drm/dg2: Format modifier for DG2 unified compression and clear
color
Matthew Auld (7):
drm/i915/xehpsdv: set min page-size to 64K drm/i915/xehpsdv: enforce min GTT alignment drm/i915: enforce min page size for scratch drm/i915/gtt/xehpsdv: move scratch page to system memory drm/i915/xehpsdv: support 64K GTT pages drm/i915/xehpsdv: implement memory coloring drm/i915/uapi: document behaviour for DG2 64K support
Ramalingam C (3):
drm/i915/dg2: Prune the Y Tiling modifiers drm/i915/Flat-CCS: Document on Flat-CCS memory compression Doc/gpu/rfc/i915: i915 DG2 uAPI
Stanislav Lisovskiy (1):
drm/i915/dg2: Tile 4 plane format support
Stuart Summers (1):
drm/i915: Add has_64k_pages flag
Documentation/gpu/rfc/i915_dg2.rst | 32 ++++ Documentation/gpu/rfc/index.rst | 3 + .../gpu/drm/i915/display/intel_atomic_plane.c | 3 +- drivers/gpu/drm/i915/display/intel_display.c | 5 +- drivers/gpu/drm/i915/display/intel_fb.c | 87 +++++++-- drivers/gpu/drm/i915/display/intel_fb.h | 3 +- drivers/gpu/drm/i915/display/intel_fbc.c | 1 + .../drm/i915/display/intel_plane_initial.c | 1 + drivers/gpu/drm/i915/display/skl_scaler.c | 6 +- .../drm/i915/display/skl_universal_plane.c | 68 +++++-- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 +- .../gpu/drm/i915/gem/selftests/huge_pages.c | 61 +++++++ .../i915/gem/selftests/i915_gem_client_blt.c | 23 ++- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 1 + drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 145 ++++++++++++++- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 14 ++ drivers/gpu/drm/i915/gt/intel_gt.c | 19 ++ drivers/gpu/drm/i915/gt/intel_gt.h | 1 + drivers/gpu/drm/i915/gt/intel_gtt.c | 23 ++- drivers/gpu/drm/i915/gt/intel_gtt.h | 20 +++ drivers/gpu/drm/i915/gt/intel_migrate.c | 167 +++++++++++++++++- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 1 + drivers/gpu/drm/i915/gt/intel_region_lmem.c | 27 ++- drivers/gpu/drm/i915/i915_drv.h | 7 + drivers/gpu/drm/i915/i915_gem_evict.c | 17 ++ drivers/gpu/drm/i915/i915_pci.c | 4 + drivers/gpu/drm/i915/i915_reg.h | 4 + drivers/gpu/drm/i915/i915_vma.c | 55 ++++-- drivers/gpu/drm/i915/intel_device_info.h | 3 + drivers/gpu/drm/i915/intel_pm.c | 10 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++---- drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 + include/uapi/drm/drm_fourcc.h | 38 ++++ include/uapi/drm/i915_drm.h | 67 ++++++- 35 files changed, 909 insertions(+), 113 deletions(-) create mode 100644 Documentation/gpu/rfc/i915_dg2.rst
Signature · 1 line
2.20.1
PATCH v3 1/17 drm/i915: Add has_64k_pages flag
From: Stuart Summers <[email protected]>
Add a new platform flag, has_64k_pages, for platforms supporting base page sizes of 64k.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 2 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1713,6 +1713,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_MSLICES (dev_priv) \ (INTEL_INFO(dev_priv)->has_mslices) +#define HAS_64K_PAGES (dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages) +#define HAS_IPC (dev_priv) (INTEL_INFO(dev_priv)->display.has_ipc)#define HAS_REGION (i915, i) (INTEL_INFO(i915)->memory_regions & (i))
drivers/gpu/drm/i915/i915_pci.c +2 -0
@@ -1015,6 +1015,7 @@ static const struct intel_device_info xehpsdv_info = {DGFX_FEATURES ,PLATFORM (INTEL_XEHPSDV ), .display = { }, + .has_64k_pages =1 , .pipe_mask = 0, .platform_engine_mask = BIT(RCS0) | BIT(BCS0) |
@@ -1033,6 +1034,7 @@ static const struct intel_device_info dg2_info = { .graphics_rel = 55, .media_rel =55 ,PLATFORM (INTEL_DG2 ), + .has_64k_pages = 1, .platform_engine_mask =BIT (RCS0 ) |BIT (BCS0 ) | BIT(VECS0) | BIT(VECS1) |
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -123,6 +123,7 @@ enum intel_ppgtt_type {func (is_dgfx); \/* Keep has_* in alphabetical order */ \func (has_64bit_reloc); \ +func (has_64k_pages); \func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_global_mocs); \
Signature · 1 line
2.20.1
PATCH v3 2/17 drm/i915/xehpsdv: set min page-size to 64K
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
LMEM should be allocated at 64K granularity, since 4K page support will eventually be dropped for LMEM when using the PPGTT.
--- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 +++++- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_stolen.c +5 -1
@@ -778,6 +778,7 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,struct intel_uncore *uncore = &i915->uncore;struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct intel_memory_region *mem; +resource_size_t min_page_size;resource_size_t io_start;resource_size_t lmem_size;u64 lmem_base;
@@ -789,8 +790,11 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type, lmem_size =pci_resource_len (pdev,2 ) - lmem_base; io_start =pci_resource_start (pdev,2 ) + lmem_base; + min_page_size =HAS_64K_PAGES (i915) ?I915_GTT_PAGE_SIZE_64K : +I915_GTT_PAGE_SIZE_4K ; + mem =intel_memory_region_create (i915, lmem_base, lmem_size, -I915_GTT_PAGE_SIZE_4K , io_start, + min_page_size, io_start, type, instance, &i915_region_stolen_lmem_ops);if (IS_ERR (mem))
drivers/gpu/drm/i915/gt/intel_region_lmem.c +4 -1
@@ -193,6 +193,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)struct intel_uncore *uncore = gt->uncore;struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct intel_memory_region *mem; +resource_size_t min_page_size;resource_size_t io_start;resource_size_t lmem_size;int err;
@@ -207,10 +208,12 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)if (GEM_WARN_ON (lmem_size >pci_resource_len (pdev,2 )))return ERR_PTR (-ENODEV ); + min_page_size =HAS_64K_PAGES (i915) ?I915_GTT_PAGE_SIZE_64K : +I915_GTT_PAGE_SIZE_4K ; mem = intel_memory_region_create(i915, 0, lmem_size, - I915_GTT_PAGE_SIZE_4K, + min_page_size, io_start, INTEL_MEMORY_LOCAL, 0,
Signature · 1 line
2.20.1
PATCH v3 3/17 drm/i915/xehpsdv: enforce min GTT alignment
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
For local-memory objects we need to align the GTT addresses to 64K, both for the ppgtt and ggtt.
We need to support vm->min_alignment > 4K, depending on the vm itself and the type of object we are inserting. With this in mind update the GTT selftests to take this into account.
--- .../i915/gem/selftests/i915_gem_client_blt.c | 23 +++-- drivers/gpu/drm/i915/gt/intel_gtt.c | 9 ++ drivers/gpu/drm/i915/gt/intel_gtt.h | 9 ++ drivers/gpu/drm/i915/i915_vma.c | 9 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++++++++------- 5 files changed, 103 insertions(+), 43 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +15 -8
@@ -39,6 +39,7 @@ struct tiled_blits {struct blit_buffer scratch;struct i915_vma *batch;u64 hole; +u64 align;u32 width;u32 height; };
@@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng) goto err_free; } - hole_size =2 *PAGE_ALIGN (WIDTH *HEIGHT *4 ); + t->align =I915_GTT_PAGE_SIZE_2M ;/* XXX worst case, derive from vm! */ + t->align =max (t->align, +i915_vm_min_alignment (t->ce->vm,INTEL_MEMORY_LOCAL )); + t->align =max (t->align, +i915_vm_min_alignment (t->ce->vm,INTEL_MEMORY_SYSTEM )); + + hole_size =2 *round_up (WIDTH *HEIGHT *4 , t->align); hole_size *=2 ;/* room to maneuver */ - hole_size +=2 *I915_GTT_MIN_ALIGNMENT ; + hole_size +=2 * t->align;/* padding on either side */ mutex_lock (&t->ce->vm->mutex);memset (&hole,0 ,sizeof (hole)); err =drm_mm_insert_node_in_range (&t->ce->vm->mm, &hole, - hole_size,0 ,I915_COLOR_UNEVICTABLE , + hole_size, t->align, +I915_COLOR_UNEVICTABLE ,0 ,U64_MAX ,DRM_MM_INSERT_BEST );if (!err)
@@ -428,7 +436,7 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng) goto err_put; } - t->hole = hole.start +I915_GTT_MIN_ALIGNMENT ; + t->hole = hole.start + t->align;pr_info ("Using hole at %llx\n" , t->hole); err =tiled_blits_create_buffers (t,WIDTH ,HEIGHT , prng);
@@ -455,7 +463,7 @@ static void tiled_blits_destroy(struct tiled_blits *t)static int tiled_blits_prepare (struct tiled_blits *t,struct rnd_state *prng) { -u64 offset =PAGE_ALIGN (t->width * t->height *4 ); +u64 offset =round_up (t->width * t->height *4 , t->align);u32 *map;int err;int i;
@@ -486,8 +494,7 @@ static int tiled_blits_prepare(struct tiled_blits *t,static int tiled_blits_bounce (struct tiled_blits *t,struct rnd_state *prng) { -u64 offset = -round_up (t->width * t->height *4 ,2 *I915_GTT_MIN_ALIGNMENT ); +u64 offset =round_up (t->width * t->height *4 ,2 * t->align);int err;/* We want to check position invariant tiling across GTT eviction */
@@ -500,7 +507,7 @@ static int tiled_blits_bounce(struct tiled_blits *t, struct rnd_state *prng)/* Reposition so that we overlap the old addresses, and slightly off */ err =tiled_blit (t, - &t->buffers[2 ], t->hole +I915_GTT_MIN_ALIGNMENT , + &t->buffers[2 ], t->hole + t->align, &t->buffers[1 ], t->hole +3 * offset /2 );if (err)return err;
drivers/gpu/drm/i915/gt/intel_gtt.c +9 -0
@@ -216,6 +216,15 @@ void i915_address_space_init(struct i915_address_space *vm, int subclass)GEM_BUG_ON (!vm->total);drm_mm_init (&vm->mm,0 , vm->total); + +memset64 (vm->min_alignment,I915_GTT_MIN_ALIGNMENT , +ARRAY_SIZE (vm->min_alignment)); + +if (HAS_64K_PAGES (vm->i915)) { + vm->min_alignment[INTEL_MEMORY_LOCAL ] =I915_GTT_PAGE_SIZE_64K ; + vm->min_alignment[INTEL_MEMORY_STOLEN_LOCAL ] =I915_GTT_PAGE_SIZE_64K ; + } + vm->mm.head_node.color =I915_COLOR_UNEVICTABLE ;INIT_LIST_HEAD (&vm->bound_list);
drivers/gpu/drm/i915/gt/intel_gtt.h +9 -0
@@ -28,6 +28,8 @@#include "gt/intel_reset.h" #include "i915_selftest.h" #include "i915_vma_types.h" +#include "i915_params.h" +#include "intel_memory_region.h" #define I915_GFP_ALLOW_FAIL (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)
@@ -221,6 +223,7 @@ struct i915_address_space {struct device *dma;u64 total;/* size addr space maps (ex. 2GB for ggtt) */ u64 reserved;/* size addr space reserved */ +u64 min_alignment[INTEL_MEMORY_STOLEN_LOCAL +1 ];unsigned int bind_async_flags;
@@ -377,6 +380,12 @@ i915_vm_has_scratch_64K(struct i915_address_space *vm)return vm->scratch_order ==get_order (I915_GTT_PAGE_SIZE_64K ); } +static inline u64 i915_vm_min_alignment (struct i915_address_space *vm, +enum intel_memory_type type) +{ +return vm->min_alignment[type]; +} +static inline bool i915_vm_has_cache_coloring (struct i915_address_space *vm) {
drivers/gpu/drm/i915/i915_vma.c +7 -2
@@ -670,8 +670,13 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 alignment, u64 flags) } color =0 ; -if (vma->obj &&i915_vm_has_cache_coloring (vma->vm)) - color = vma->obj->cache_level; +if (vma->obj) { +if (HAS_64K_PAGES (vma->vm->i915) &&i915_gem_object_is_lmem (vma->obj)) + alignment =max (alignment,I915_GTT_PAGE_SIZE_64K ); + +if (i915_vm_has_cache_coloring (vma->vm)) + color = vma->obj->cache_level; + }if (flags &PIN_OFFSET_FIXED ) {u64 offset = flags &PIN_OFFSET_MASK ;
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +63 -33
297 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v3 4/17 drm/i915: enforce min page size for scratch
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
If the device needs 64K minimum GTT pages for device local-memory, like on XEHPSDV, then we need to fail the allocation if we can't meet it, instead of falling back to 4K pages, otherwise we can't safely support the insertion of device local-memory pages for this vm, since the HW expects the correct physical alignment and size for every PTE, if we mark the page-table as 64K GTT mode.
--- drivers/gpu/drm/i915/gt/intel_gtt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/gt/intel_gtt.c +12 -0
@@ -343,6 +343,18 @@ int setup_scratch_page(struct i915_address_space *vm)if (size ==I915_GTT_PAGE_SIZE_4K )return -ENOMEM ; +/* +* If we need 64K minimum GTT pages for device local-memory, +* like on XEHPSDV, then we need to fail the allocation here, +* otherwise we can't safely support the insertion of +* local-memory pages for this vm, since the HW expects the +* correct physical alignment and size when the page-table is +* operating in 64K GTT mode, which includes any scratch PTEs, +* since userpsace can still touch them. +*/ +if (HAS_64K_PAGES (vm->i915)) +return -ENOMEM ; + size =I915_GTT_PAGE_SIZE_4K ; }while (1 ); }
Signature · 1 line
2.20.1
PATCH v3 5/17 drm/i915/gtt/xehpsdv: move scratch page to system memory
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
On some platforms the hw has dropped support for 4K GTT pages when dealing with LMEM, and due to the design of 64K GTT pages in the hw, we can only mark the *entire* page-table as operating in 64K GTT mode, since the enable bit is still on the pde, and not the pte. And since we we still need to allow 4K GTT pages for SMEM objects, we can't have a "normal" 4K page-table with scratch pointing to LMEM, since that's undefined from the hw pov. The simplest solution is to just move the 64K scratch page to SMEM on such platforms and call it a day, since that should work for all configurations.
--- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 1 + drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 23 +++++++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 ++ drivers/gpu/drm/i915/gt/intel_gtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 2 ++ drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 ++ 6 files changed, 29 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/gen6_ppgtt.c +1 -0
@@ -439,6 +439,7 @@ struct i915_ppgtt *gen6_ppgtt_create(struct intel_gt *gt) ppgtt->base.vm.cleanup = gen6_ppgtt_cleanup; ppgtt->base.vm.alloc_pt_dma = alloc_pt_dma; + ppgtt->base.vm.alloc_scratch_dma = alloc_pt_dma; ppgtt->base.vm.pte_encode = ggtt->vm.pte_encode; ppgtt->base.pd =__alloc_pd (I915_PDES );
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +21 -2
@@ -776,10 +776,29 @@ struct i915_ppgtt *gen8_ppgtt_create(struct intel_gt *gt,*/ ppgtt->vm.has_read_only = !IS_GRAPHICS_VER (gt->i915,11 ,12 ); -if (HAS_LMEM (gt->i915)) +if (HAS_LMEM (gt->i915)) { ppgtt->vm.alloc_pt_dma = alloc_pt_lmem; -else + +/* +* On some platforms the hw has dropped support for 4K GTT pages +* when dealing with LMEM, and due to the design of 64K GTT +* pages in the hw, we can only mark the *entire* page-table as +* operating in 64K GTT mode, since the enable bit is still on +* the pde, and not the pte. And since we still need to allow +* 4K GTT pages for SMEM objects, we can't have a "normal" 4K +* page-table with scratch pointing to LMEM, since that's +* undefined from the hw pov. The simplest solution is to just +* move the 64K scratch page to SMEM on such platforms and call +* it a day, since that should work for all configurations. +*/ +if (HAS_64K_PAGES (gt->i915)) + ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; +else + ppgtt->vm.alloc_scratch_dma = alloc_pt_lmem; + }else { ppgtt->vm.alloc_pt_dma = alloc_pt_dma; + ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; + } err =gen8_init_scratch (&ppgtt->vm);if (err)
drivers/gpu/drm/i915/gt/intel_ggtt.c +2 -0
@@ -1077,6 +1077,7 @@ static int gen6_gmch_probe(struct i915_ggtt *ggtt) ggtt->vm.total = (size /sizeof (gen6_pte_t)) *I915_GTT_PAGE_SIZE ; ggtt->vm.alloc_pt_dma = alloc_pt_dma; + ggtt->vm.alloc_scratch_dma = alloc_pt_dma; ggtt->vm.clear_range = nop_clear_range;if (!HAS_FULL_PPGTT (i915) ||intel_scanout_needs_vtd_wa (i915))
@@ -1129,6 +1130,7 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt) (struct resource )DEFINE_RES_MEM (gmadr_base, ggtt->mappable_end); ggtt->vm.alloc_pt_dma = alloc_pt_dma; + ggtt->vm.alloc_scratch_dma = alloc_pt_dma;if (needs_idle_maps (i915)) { drm_notice(&i915->drm,
drivers/gpu/drm/i915/gt/intel_gtt.c +1 -1
@@ -307,7 +307,7 @@ int setup_scratch_page(struct i915_address_space *vm) do { struct drm_i915_gem_object *obj; - obj = vm->alloc_pt_dma(vm, size); + obj = vm->alloc_scratch_dma(vm, size); if (IS_ERR(obj)) goto skip;
drivers/gpu/drm/i915/gt/intel_gtt.h +2 -0
@@ -268,6 +268,8 @@ struct i915_address_space {struct drm_i915_gem_object * (*alloc_pt_dma)(struct i915_address_space *vm,int sz); +struct drm_i915_gem_object * + (*alloc_scratch_dma)(struct i915_address_space *vm,int sz); u64 (*pte_encode)(dma_addr_t addr, enum i915_cache_level level,
drivers/gpu/drm/i915/selftests/mock_gtt.c +2 -0
@@ -78,6 +78,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name)i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT ); ppgtt->vm.alloc_pt_dma = alloc_pt_dma; + ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; ppgtt->vm.clear_range = mock_clear_range; ppgtt->vm.insert_page = mock_insert_page;
@@ -118,6 +119,7 @@ void mock_init_ggtt(struct drm_i915_private *i915, struct i915_ggtt *ggtt) ggtt->vm.total =4096 *PAGE_SIZE ; ggtt->vm.alloc_pt_dma = alloc_pt_dma; + ggtt->vm.alloc_scratch_dma = alloc_pt_dma; ggtt->vm.clear_range = mock_clear_range; ggtt->vm.insert_page = mock_insert_page;
Signature · 1 line
2.20.1
PATCH v3 6/17 drm/i915/xehpsdv: support 64K GTT pages
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
XEHPSDV optimises 64K GTT pages for local-memory, since everything should be allocated at 64K granularity. We say goodbye to sparse entries, and instead get a compact 256B page-table for 64K pages, which should be more cache friendly. 4K pages for local-memory are no longer supported by the HW.
--- .../gpu/drm/i915/gem/selftests/huge_pages.c | 61 ++++++++++ drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 106 +++++++++++++++++- drivers/gpu/drm/i915/gt/intel_gtt.h | 3 + drivers/gpu/drm/i915/gt/intel_ppgtt.c | 1 + 4 files changed, 168 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +61 -0
@@ -1456,6 +1456,66 @@ static int igt_ppgtt_sanity_check(void *arg)return err; } +static int igt_ppgtt_compact (void *arg) +{ +struct i915_gem_context *ctx = arg; +struct drm_i915_private *i915 = ctx->i915; +struct drm_i915_gem_object *obj; +int err; + +/* +* Simple test to catch issues with compact 64K pages -- since the pt is +* compacted to 256B that gives us 32 entries per pt, however since the +* backing page for the pt is 4K, any extra entries we might incorrectly +* write out should be ignored by the HW. If ever hit such a case this +* test should catch it since some of our writes would land in scratch. +*/ + +if (!HAS_64K_PAGES (i915)) { +pr_info ("device lacks compact 64K page support, skipping\n" ); +return 0 ; + } + +if (!HAS_LMEM (i915)) { +pr_info ("device lacks LMEM support, skipping\n" ); +return 0 ; + } + +/* We want the range to cover multiple page-table boundaries. */ + obj =i915_gem_object_create_lmem (i915,SZ_4M ,0 ); +if (IS_ERR (obj)) +return err; + + err =i915_gem_object_pin_pages_unlocked (obj); +if (err) + goto out_put; + +if (obj->mm.page_sizes.phys <I915_GTT_PAGE_SIZE_64K ) { +pr_info ("LMEM compact unable to allocate huge-page(s)\n" ); + goto out_unpin; + } + +/* +* Disable 2M GTT pages by forcing the page-size to 64K for the GTT +* insertion. +*/ + obj->mm.page_sizes.sg =I915_GTT_PAGE_SIZE_64K ; + + err =igt_write_huge (ctx, obj); +if (err) +pr_err ("LMEM compact write-huge failed\n" ); + +out_unpin: +i915_gem_object_unpin_pages (obj); +out_put: +i915_gem_object_put (obj); + +if (err == -ENOMEM ) + err =0 ; + +return err; +} +static int igt_tmpfs_fallback (void *arg) {struct i915_gem_context *ctx = arg;
@@ -1686,6 +1746,7 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915)SUBTEST (igt_tmpfs_fallback),SUBTEST (igt_ppgtt_smoke_huge),SUBTEST (igt_ppgtt_sanity_check), + SUBTEST(igt_ppgtt_compact), };struct i915_gem_context *ctx;struct i915_address_space *vm;
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +103 -3
132 lines not on this page · raw message
drivers/gpu/drm/i915/gt/intel_gtt.h +3 -0
@@ -91,6 +91,8 @@ typedef u64 gen8_pte_t;#define GEN12_GGTT_PTE_LM BIT_ULL(1) +#define GEN12_PDE_64K BIT(6) +/* * Cacheability Control is a 4-bit value. The low three bits are stored in bits * 3:1 of the PTE, while the fourth bit is stored in bit 11 of the PTE.
@@ -156,6 +158,7 @@ struct i915_page_table {atomic_t used;struct i915_page_table *stash; }; +bool is_compact; };struct i915_page_directory {
drivers/gpu/drm/i915/gt/intel_ppgtt.c +1 -0
@@ -26,6 +26,7 @@ struct i915_page_table *alloc_pt(struct i915_address_space *vm)return ERR_PTR (-ENOMEM ); } + pt->is_compact = false;atomic_set (&pt->used,0 );return pt; }
Signature · 1 line
2.20.1
PATCH v3 7/17 drm/i915/xehpsdv: implement memory coloring
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
The basic idea is that each 2M block(page-table) has a color, depending on if the page-table is occupied by LMEM objects(64K) or SMEM objects(4K), where our goal is to prevent mixing 64K and 4K GTT pages in the page-table, which is not supported by the HW.
--- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 16 ++++++++++ drivers/gpu/drm/i915/gt/intel_gtt.h | 6 ++++ drivers/gpu/drm/i915/i915_gem_evict.c | 17 ++++++++++ drivers/gpu/drm/i915/i915_vma.c | 46 +++++++++++++++++++-------- 4 files changed, 71 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +16 -0
@@ -463,6 +463,19 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt,return idx; } +static void xehpsdv_ppgtt_color_adjust (const struct drm_mm_node *node, +unsigned long color, +u64 *start, +u64 *end) +{ +if (i915_node_color_differs (node, color)) + *start =round_up (*start,SZ_2M ); + + node =list_next_entry (node, node_list); +if (i915_node_color_differs (node, color)) + *end =round_down (*end,SZ_2M ); +} + static void xehpsdv_ppgtt_insert_huge(struct i915_vma *vma, struct sgt_dma *iter,
@@ -900,6 +913,9 @@ struct i915_ppgtt *gen8_ppgtt_create(struct intel_gt *gt, ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; } +if (HAS_64K_PAGES (gt->i915)) + ppgtt->vm.mm.color_adjust = xehpsdv_ppgtt_color_adjust; + err =gen8_init_scratch (&ppgtt->vm);if (err) goto err_free;
drivers/gpu/drm/i915/gt/intel_gtt.h +6 -0
@@ -397,6 +397,12 @@ i915_vm_has_cache_coloring(struct i915_address_space *vm)return i915_is_ggtt (vm) && vm->mm.color_adjust; } +static inline bool +i915_vm_has_memory_coloring (struct i915_address_space *vm) +{ +return !i915_is_ggtt (vm) && vm->mm.color_adjust; +} +static inline struct i915_ggtt *i915_vm_to_ggtt (struct i915_address_space *vm) {
drivers/gpu/drm/i915/i915_gem_evict.c +17 -0
@@ -292,6 +292,13 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,/* Always look at the page afterwards to avoid the end-of-GTT */ end +=I915_GTT_PAGE_SIZE ; + }else if (i915_vm_has_memory_coloring (vm)) { +/* +* Expand the search the cover the page-table boundries, in +* case we need to flip the color of the page-table(s). +*/ + start =round_down (start,SZ_2M ); + end =round_up (end,SZ_2M ); }GEM_BUG_ON (start >= end);
@@ -321,6 +328,16 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,if (node->color == target->color)continue ; } + }else if (i915_vm_has_memory_coloring (vm)) { +if (node->start + node->size <= target->start) { +if (node->color == target->color) +continue ; + } + +if (node->start >= target->start + target->size) { +if (node->color == target->color) +continue ; + } }if (i915_vma_is_pinned (vma)) {
drivers/gpu/drm/i915/i915_vma.c +32 -14
66 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v3 8/17 drm/i915/xehpsdv: Add has_flat_ccs to device info
In reply to Ramalingam CFrom: CQ Tang <[email protected]>
Gen12+ devices support 3D surface (buffer) compression and various compression formats. This is accomplished by an additional compression control state (CCS) stored for each surface.
Gen 12 devices(TGL family and DG1) stores compression states in a separate region of memory. It is managed by user-space and has an associated set of user-space managed page tables used by hardware for address translation.
In Gen12.5 devices(XEHPSDV, DG2, etc), there is a new feature introduced i.e Flat CCS. It replaced AUX page tables with a flat indexed region of device memory for storing compression states.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 4 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1720,6 +1720,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_REGION (i915, i) (INTEL_INFO(i915)->memory_regions & (i))#define HAS_LMEM (i915) HAS_REGION(i915, REGION_LMEM) +#define HAS_FLAT_CCS (dev_priv) (INTEL_INFO(dev_priv)->has_flat_ccs) +#define HAS_GT_UC (dev_priv) (INTEL_INFO(dev_priv)->has_gt_uc)#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu)
drivers/gpu/drm/i915/i915_pci.c +1 -0
@@ -991,6 +991,7 @@ static const struct intel_device_info adl_p_info = { XE_HP_PAGE_SIZES, \ .dma_mask_size = 46, \ .has_64bit_reloc = 1, \ + .has_flat_ccs = 1, \ .has_global_mocs = 1, \ .has_gt_uc = 1, \ .has_llc = 1, \
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -126,6 +126,7 @@ enum intel_ppgtt_type {func (has_64k_pages); \func (gpu_reset_clobbers_display); \func (has_reset_engine); \ +func (has_flat_ccs); \func (has_global_mocs); \func (has_gt_uc); \func (has_l3_dpf); \
Signature · 1 line
2.20.1
PATCH v3 9/17 drm/i915/lmem: Enable lmem for platforms with Flat CCS
In reply to Ramalingam CFrom: Abdiel Janulgue <[email protected]>
A portion of device memory is reserved for Flat CCS so usable device memory will be reduced by size of Flat CCS. Size of Flat CCS is specified in “XEHPSDV_FLAT_CCS_BASE_ADDR”. So to get effective device memory we need to subtract total device memory by Flat CCS memory size.
--- drivers/gpu/drm/i915/gt/intel_gt.c | 19 ++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt.h | 1 + drivers/gpu/drm/i915/gt/intel_region_lmem.c | 22 +++++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 3 +++ 4 files changed, 43 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt.c +19 -0
@@ -900,6 +900,25 @@ u32 intel_gt_read_register_fw(struct intel_gt *gt, i915_reg_t reg)return intel_uncore_read_fw (gt->uncore, reg); } +u32 intel_gt_read_register (struct intel_gt *gt,i915_reg_t reg) +{ +int type; +u8 sliceid, subsliceid; + +for (type =0 ; type <NUM_STEERING_TYPES ; type++) { +if (intel_gt_reg_needs_read_steering (gt, reg, type)) { +intel_gt_get_valid_steering (gt, type, &sliceid, + &subsliceid); +return intel_uncore_read_with_mcr_steering (gt->uncore, + reg, + sliceid, + subsliceid); + } + } + +return intel_uncore_read (gt->uncore, reg); +} +void intel_gt_info_print (const struct intel_gt_info *info,struct drm_printer *p) {
drivers/gpu/drm/i915/gt/intel_gt.h +1 -0
@@ -84,6 +84,7 @@ static inline bool intel_gt_needs_read_steering(struct intel_gt *gt, }u32 intel_gt_read_register_fw (struct intel_gt *gt,i915_reg_t reg); +u32 intel_gt_read_register (struct intel_gt *gt,i915_reg_t reg);void intel_gt_info_print (const struct intel_gt_info *info,struct drm_printer *p);
drivers/gpu/drm/i915/gt/intel_region_lmem.c +20 -2
@@ -201,8 +201,26 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)if (!IS_DGFX (i915))return ERR_PTR (-ENODEV ); -/* Stolen starts from GSMBASE on DG1 */ - lmem_size =intel_uncore_read64 (uncore,GEN12_GSMBASE ); +if (HAS_FLAT_CCS (i915)) { +u64 tile_stolen, flat_ccs_base_addr_reg, flat_ccs_base; + + lmem_size =pci_resource_len (pdev,2 ); + flat_ccs_base_addr_reg =intel_gt_read_register (gt,XEHPSDV_FLAT_CCS_BASE_ADDR ); + flat_ccs_base = (flat_ccs_base_addr_reg >>XEHPSDV_CCS_BASE_SHIFT ) *SZ_64K ; + tile_stolen = lmem_size - flat_ccs_base; + +/* If the FLAT_CCS_BASE_ADDR register is not populated, flag an error */ +if (tile_stolen == lmem_size) +DRM_ERROR ("CCS_BASE_ADDR register did not have expected value\n" ); + + lmem_size -= tile_stolen; + }else { +/* Stolen starts from GSMBASE without CCS */ + lmem_size =intel_uncore_read64 (&i915->uncore,GEN12_GSMBASE ); +if (GEM_WARN_ON (lmem_size >pci_resource_len (pdev,2 ))) +return ERR_PTR (-ENODEV ); + } + io_start =pci_resource_start (pdev,2 );if (GEM_WARN_ON (lmem_size >pci_resource_len (pdev,2 )))
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -12467,6 +12467,9 @@ enum skl_power_gate {#define GEN12_GSMBASE _MMIO(0x108100)#define GEN12_DSMBASE _MMIO(0x1080C0) +#define XEHPSDV_FLAT_CCS_BASE_ADDR _MMIO(0x4910) +#define XEHPSDV_CCS_BASE_SHIFT 8 +/* gamt regs */ #define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)#define GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW 0x67F1427F/* max/min for LRA1/2 */
Signature · 1 line
2.20.1
PATCH v3 10/17 drm/i915/gt: Clear compress metadata for Xe_HP platforms
In reply to Ramalingam CFrom: Ayaz A Siddiqui <[email protected]>
Xe-hp and latest devices support Flat CCS which reserved a portion of the device memory to store compression metadata, during the clearing of device memory buffer object we also need to clear the associated CCS buffer.
Flat CCS memory can not be directly accessed by S/W. Address of CCS buffer associated main BO is automatically calculated by device itself. KMD/UMD can only access this buffer indirectly using XY_CTRL_SURF_COPY_BLT cmd via the address of device memory buffer.
v2: Fixed issues with platform naming [Lucas]
--- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 14 +++ drivers/gpu/drm/i915/gt/intel_migrate.c | 120 ++++++++++++++++++- 2 files changed, 131 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +14 -0
@@ -203,6 +203,20 @@#define GFX_OP_DRAWRECT_INFO ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))#define GFX_OP_DRAWRECT_INFO_I965 ((0x7900<<16)|0x2) +#define XY_CTRL_SURF_INSTR_SIZE 5 +#define MI_FLUSH_DW_SIZE 3 +#define XY_CTRL_SURF_COPY_BLT ((2 << 29) | (0x48 << 22) | 3) +#define SRC_ACCESS_TYPE_SHIFT 21 +#define DST_ACCESS_TYPE_SHIFT 20 +#define CCS_SIZE_SHIFT 8 +#define XY_CTRL_SURF_MOCS_SHIFT 25 +#define NUM_CCS_BYTES_PER_BLOCK 256 +#define NUM_CCS_BLKS_PER_XFER 1024 +#define INDIRECT_ACCESS 0 +#define DIRECT_ACCESS 1 +#define MI_FLUSH_LLC BIT(9) +#define MI_FLUSH_CCS BIT(16) +#define COLOR_BLT_CMD (2 << 29 | 0x40 << 22 | (5 - 2))#define XY_COLOR_BLT_CMD (2 << 29 | 0x50 << 22)#define SRC_COPY_BLT_CMD (2 << 29 | 0x43 << 22)
drivers/gpu/drm/i915/gt/intel_migrate.c +117 -3
151 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v3 11/17 drm/i915/dg2: Prune the Y Tiling modifiers
In reply to Ramalingam CRemove the Y Tiling modifiers for DG2.
--- drivers/gpu/drm/i915/display/intel_fb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/display/intel_fb.c +3 -0
@@ -315,6 +315,9 @@ static bool plane_has_modifier(struct drm_i915_private *i915,if (!IS_DISPLAY_VER (i915, md->display_ver.from, md->display_ver.until))return false; +if (IS_DG2 (i915) && md->tiling ==I915_TILING_Y ) +return false; +if (!md->is_linear && !(plane_caps &PLANE_HAS_TILING ))return false;
Signature · 1 line
2.20.1
PATCH v3 12/17 drm/i915/dg2: Tile 4 plane format support
In reply to Ramalingam CFrom: Stanislav Lisovskiy <[email protected]>
TileF(Tile4 in bspec) format is 4K tile organized into 64B subtiles with same basic shape as for legacy TileY which will be supported by Display13.
v2: - Fixed wrong case condition(Jani Nikula)
- Increased I915_FORMAT_MOD_F_TILED up to 12(Imre Deak)
v3: - s/I915_TILING_F/TILING_4/g
- s/I915_FORMAT_MOD_F_TILED/I915_FORMAT_MOD_4_TILED/g
- Removed unneeded fencing code
v4: - Rebased, fixed merge conflict with new table-oriented
format modifier checking(Stan)
- Replaced the rest of "Tile F" mentions to "Tile 4"(Stan)
v5: - Fixed the has_4tile addition (Ram)
--- drivers/gpu/drm/i915/display/intel_display.c | 1 + drivers/gpu/drm/i915/display/intel_fb.c | 11 ++++++++++ drivers/gpu/drm/i915/display/intel_fbc.c | 1 + .../drm/i915/display/intel_plane_initial.c | 1 + .../drm/i915/display/skl_universal_plane.c | 20 +++++++++++-------- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 1 + include/uapi/drm/drm_fourcc.h | 8 ++++++++ 11 files changed, 41 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -0
@@ -7755,6 +7755,7 @@ static int intel_atomic_check_async(struct intel_atomic_state *state)case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Yf_TILED: +case I915_FORMAT_MOD_4_TILED :break ;default : drm_dbg_kms(&i915->drm,
drivers/gpu/drm/i915/display/intel_fb.c +11 -0
@@ -188,6 +188,10 @@ static const struct intel_modifier_desc intel_modifiers[] = { .modifier = I915_FORMAT_MOD_Yf_TILED, .display_ver = { 9, 11 }, .tiling = I915_TILING_NONE, + }, { + .modifier =I915_FORMAT_MOD_4_TILED , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, }, { .modifier =I915_FORMAT_MOD_Y_TILED , .display_ver = { 9, 13 },
@@ -578,6 +582,12 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED : +/* +* Each 4K tile consists of 64B(8*8) subtiles, with +* same shape as Y Tile(i.e 4*16B OWords) +*/ +return 128 ;case I915_FORMAT_MOD_Y_TILED_CCS :if (intel_fb_is_ccs_aux_plane (fb, color_plane))return 128 ;
@@ -746,6 +756,7 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ;default :
drivers/gpu/drm/i915/display/intel_fbc.c +1 -0
@@ -747,6 +747,7 @@ static bool tiling_is_valid(struct drm_i915_private *dev_priv,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Yf_TILED: +case I915_FORMAT_MOD_4_TILED :return DISPLAY_VER (dev_priv) >=9 ;case I915_FORMAT_MOD_X_TILED :return true;
drivers/gpu/drm/i915/display/intel_plane_initial.c +1 -0
@@ -125,6 +125,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_4_TILED :break ;default : drm_dbg(&dev_priv->drm,
drivers/gpu/drm/i915/display/skl_universal_plane.c +12 -8
@@ -751,6 +751,8 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_X ;case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ; +case I915_FORMAT_MOD_4_TILED : +return PLANE_CTL_TILED_4 ;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 ;
@@ -1930,9 +1932,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_Y216 :case DRM_FORMAT_XVYU12_16161616 :case DRM_FORMAT_XVYU16161616 : -if (modifier ==DRM_FORMAT_MOD_LINEAR || - modifier ==I915_FORMAT_MOD_X_TILED || - modifier ==I915_FORMAT_MOD_Y_TILED ) +if (!intel_fb_is_ccs_modifier (modifier))return true; fallthrough;default :
@@ -2241,11 +2241,15 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,else fb->modifier =I915_FORMAT_MOD_Y_TILED ;break ; -case PLANE_CTL_TILED_YF : -if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) - fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS; -else - fb->modifier = I915_FORMAT_MOD_Yf_TILED; +case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ +if (DISPLAY_VER (dev_priv) >=13 ) { + fb->modifier =I915_FORMAT_MOD_4_TILED ; + }else { +if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS; +else + fb->modifier = I915_FORMAT_MOD_Yf_TILED; + }break ;default :MISSING_CASE (tiling);
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -1627,6 +1627,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define CMDPARSER_USES_GGTT (dev_priv) (GRAPHICS_VER(dev_priv) == 7)#define HAS_LLC (dev_priv) (INTEL_INFO(dev_priv)->has_llc) +#define HAS_FTILE (dev_priv) (INTEL_INFO(dev_priv)->has_4tile)#define HAS_SNOOP (dev_priv) (INTEL_INFO(dev_priv)->has_snoop)#define HAS_EDRAM (dev_priv) ((dev_priv)->edram_size_mb)#define HAS_SECURE_BATCHES (dev_priv) (GRAPHICS_VER(dev_priv) < 6)
@@ -1722,6 +1723,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_FLAT_CCS (dev_priv) (INTEL_INFO(dev_priv)->has_flat_ccs) +#define HAS_4TILE (dev_priv) (INTEL_INFO(dev_priv)->has_4tile) +#define HAS_GT_UC (dev_priv) (INTEL_INFO(dev_priv)->has_gt_uc)#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu)
drivers/gpu/drm/i915/i915_pci.c +1 -0
@@ -992,6 +992,7 @@ static const struct intel_device_info adl_p_info = { .dma_mask_size = 46, \ .has_64bit_reloc = 1, \ .has_flat_ccs = 1, \ + .has_4tile = 1, \ .has_global_mocs = 1, \ .has_gt_uc = 1, \ .has_llc = 1, \
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -7195,6 +7195,7 @@ enum {#define PLANE_CTL_TILED_X (1 << 10)#define PLANE_CTL_TILED_Y (4 << 10)#define PLANE_CTL_TILED_YF (5 << 10) +#define PLANE_CTL_TILED_4 (5 << 10)#define PLANE_CTL_ASYNC_FLIP (1 << 9)#define PLANE_CTL_FLIP_HORIZONTAL (1 << 8)#define PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE (1 << 4)/* TGL+ */
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -127,6 +127,7 @@ enum intel_ppgtt_type {func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_flat_ccs); \ +func (has_4tile); \func (has_global_mocs); \func (has_gt_uc); \func (has_l3_dpf); \
drivers/gpu/drm/i915/intel_pm.c +1 -0
@@ -5378,6 +5378,7 @@ skl_compute_wm_params(const struct intel_crtc_state *crtc_state, } wp->y_tiled = modifier ==I915_FORMAT_MOD_Y_TILED || + modifier ==I915_FORMAT_MOD_4_TILED || modifier == I915_FORMAT_MOD_Yf_TILED || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS;
include/uapi/drm/drm_fourcc.h +8 -0
@@ -558,6 +558,14 @@ extern "C" {* 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) +/* +* Intel F-tiling(aka Tile4) layout +* +* This is a tiled layout using 4Kb tiles in row-major layout. +* Within the tile pixels are laid out in 64 byte units / sub-tiles in OWORD +* (16 bytes) chunks column-major.. +*/ +#define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12)/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
Signature · 1 line
2.20.1
Re: [PATCH v3 12/17] drm/i915/dg2: Tile 4 plane format support
Quoted 177 lines · Ramalingam C
From: Stanislav Lisovskiy <[email protected]>
TileF(Tile4 in bspec) format is 4K tile organized into 64B subtiles with same basic shape as for legacy TileY which will be supported by Display13.
v2: - Fixed wrong case condition(Jani Nikula)
- IncreasedI915_FORMAT_MOD_F_TILEDup to 12(Imre Deak)v3: - s/I915_TILING_F/TILING_4/g
- s/I915_FORMAT_MOD_F_TILED/I915_FORMAT_MOD_4_TILED/g
- Removed unneeded fencing codev4: - Rebased, fixed merge conflict with new table-oriented
format modifier checking(Stan)
- Replaced the rest of "Tile F" mentions to "Tile 4"(Stan)v5: - Fixed the
has_4tileaddition (Ram)Cc Imre Deak <[email protected]>Cc Matt Roper <[email protected]>Cc Maarten Lankhorst <[email protected]>cc Simon Ser <[email protected]>cc Pekka Paalanen <[email protected]>Cc Jordan Justen <[email protected]>Cc Kenneth Graunke <[email protected]>Cc Tony Ye <[email protected]>Cc Slawomir Milczarek <[email protected]>Signed-off-by Stanislav Lisovskiy <[email protected]>Signed-off-by Matt Roper <[email protected]>Signed-off-by Juha-Pekka Heikkilä <[email protected]>Signed-off-by Ramalingam C <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 1 + drivers/gpu/drm/i915/display/intel_fb.c | 11 ++++++++++ drivers/gpu/drm/i915/display/intel_fbc.c | 1 + .../drm/i915/display/intel_plane_initial.c | 1 + .../drm/i915/display/skl_universal_plane.c | 20 +++++++++++-------- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 1 + include/uapi/drm/drm_fourcc.h | 8 ++++++++ 11 files changed, 41 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-0@@ -7755,6 +7755,7 @@ static int intel_atomic_check_async(struct intel_atomic_state *state)case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Yf_TILED: +case I915_FORMAT_MOD_4_TILED :break ;default : drm_dbg_kms(&i915->drm,drivers/gpu/drm/i915/display/intel_fb.c +11
-0@@ -188,6 +188,10 @@ static const struct intel_modifier_desc intel_modifiers[] = { .modifier = I915_FORMAT_MOD_Yf_TILED, .display_ver = { 9, 11 }, .tiling = I915_TILING_NONE, + }, { + .modifier =I915_FORMAT_MOD_4_TILED , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, }, { .modifier =I915_FORMAT_MOD_Y_TILED , .display_ver = { 9, 13 },@@ -578,6 +582,12 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED : +/* +* Each 4K tile consists of 64B(8*8) subtiles, with +* same shape as Y Tile(i.e 4*16B OWords) +*/ +return 128 ;case I915_FORMAT_MOD_Y_TILED_CCS :if (intel_fb_is_ccs_aux_plane (fb, color_plane))return 128 ;@@ -746,6 +756,7 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_Y_TILED_CCS :case I915_FORMAT_MOD_Yf_TILED_CCS:case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ;default :drivers/gpu/drm/i915/display/intel_fbc.c +1
-0@@ -747,6 +747,7 @@ static bool tiling_is_valid(struct drm_i915_private *dev_priv,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_Y_TILED :case I915_FORMAT_MOD_Yf_TILED: +case I915_FORMAT_MOD_4_TILED :return DISPLAY_VER (dev_priv) >=9 ;case I915_FORMAT_MOD_X_TILED :return true;drivers/gpu/drm/i915/display/intel_plane_initial.c +1
-0@@ -125,6 +125,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,case DRM_FORMAT_MOD_LINEAR :case I915_FORMAT_MOD_X_TILED :case I915_FORMAT_MOD_Y_TILED : +case I915_FORMAT_MOD_4_TILED :break ;default : drm_dbg(&dev_priv->drm,drivers/gpu/drm/i915/display/skl_universal_plane.c +12
-8@@ -751,6 +751,8 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_X ;case I915_FORMAT_MOD_Y_TILED :return PLANE_CTL_TILED_Y ; +case I915_FORMAT_MOD_4_TILED : +return PLANE_CTL_TILED_4 ;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 ;@@ -1930,9 +1932,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,case DRM_FORMAT_Y216 :case DRM_FORMAT_XVYU12_16161616 :case DRM_FORMAT_XVYU16161616 : -if (modifier ==DRM_FORMAT_MOD_LINEAR || - modifier ==I915_FORMAT_MOD_X_TILED || - modifier ==I915_FORMAT_MOD_Y_TILED ) +if (!intel_fb_is_ccs_modifier (modifier))return true; fallthrough;default :@@ -2241,11 +2241,15 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,else fb->modifier =I915_FORMAT_MOD_Y_TILED ;break ; -case PLANE_CTL_TILED_YF : -if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) - fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS; -else - fb->modifier = I915_FORMAT_MOD_Yf_TILED; +case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ +if (DISPLAY_VER (dev_priv) >=13 ) { + fb->modifier =I915_FORMAT_MOD_4_TILED ; + }else { +if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS; +else + fb->modifier = I915_FORMAT_MOD_Yf_TILED; + }break ;default :MISSING_CASE (tiling);drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -1627,6 +1627,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define CMDPARSER_USES_GGTT (dev_priv) (GRAPHICS_VER(dev_priv) == 7)#define HAS_LLC (dev_priv) (INTEL_INFO(dev_priv)->has_llc) +#define HAS_FTILE (dev_priv) (INTEL_INFO(dev_priv)->has_4tile)#define HAS_SNOOP (dev_priv) (INTEL_INFO(dev_priv)->has_snoop)#define HAS_EDRAM (dev_priv) ((dev_priv)->edram_size_mb)#define HAS_SECURE_BATCHES (dev_priv) (GRAPHICS_VER(dev_priv) < 6)
drivers/gpu/drm/i915/i915_drv.h IS_SUBPLATFORM(const struct drm_i915_private *i915, · line 1726
Quoted 4 lines
drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -1722,6 +1723,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_FLAT_CCS (dev_priv) (INTEL_INFO(dev_priv)->has_flat_ccs) +#define HAS_4TILE (dev_priv) (INTEL_INFO(dev_priv)->has_4tile)
There is also HAS_FTILE definition above which is still left. I guess you need to remove it.
Stan
Quoted 74 lines
drivers/gpu/drm/i915/i915_drv.h +1
-0+#define HAS_GT_UC (dev_priv) (INTEL_INFO(dev_priv)->has_gt_uc)#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu)drivers/gpu/drm/i915/i915_pci.c +1
-0@@ -992,6 +992,7 @@ static const struct intel_device_info adl_p_info = { .dma_mask_size = 46, \ .has_64bit_reloc = 1, \ .has_flat_ccs = 1, \ + .has_4tile = 1, \ .has_global_mocs = 1, \ .has_gt_uc = 1, \ .has_llc = 1, \drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -7195,6 +7195,7 @@ enum {#define PLANE_CTL_TILED_X (1 << 10)#define PLANE_CTL_TILED_Y (4 << 10)#define PLANE_CTL_TILED_YF (5 << 10) +#define PLANE_CTL_TILED_4 (5 << 10)#define PLANE_CTL_ASYNC_FLIP (1 << 9)#define PLANE_CTL_FLIP_HORIZONTAL (1 << 8)#define PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE (1 << 4)/* TGL+ */ drivers/gpu/drm/i915/intel_device_info.h +1
-0@@ -127,6 +127,7 @@ enum intel_ppgtt_type {func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_flat_ccs); \ +func (has_4tile); \func (has_global_mocs); \func (has_gt_uc); \func (has_l3_dpf); \drivers/gpu/drm/i915/intel_pm.c +1
-0@@ -5378,6 +5378,7 @@ skl_compute_wm_params(const struct intel_crtc_state *crtc_state, } wp->y_tiled = modifier ==I915_FORMAT_MOD_Y_TILED || + modifier ==I915_FORMAT_MOD_4_TILED || modifier == I915_FORMAT_MOD_Yf_TILED || modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS;include/uapi/drm/drm_fourcc.h +8
-0@@ -558,6 +558,14 @@ extern "C" {* 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) +/* +* Intel F-tiling(aka Tile4) layout +* +* This is a tiled layout using 4Kb tiles in row-major layout. +* Within the tile pixels are laid out in 64 byte units / sub-tiles in OWORD +* (16 bytes) chunks column-major.. +*/ +#define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12)/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks Signature · 1 line
2.20.1
PATCH v3 13/17 uapi/drm/dg2: Format modifier for DG2 unified compression and clear color
In reply to Ramalingam CFrom: Matt Roper <[email protected]>
DG2 unifies render compression and media compression into a single format for the first time. The programming and buffer layout is supposed to match compression on older gen12 platforms, but the actual compression algorithm is different from any previous platform; as such, we need a new framebuffer modifier to represent buffers in this format, but otherwise we can re-use the existing gen12 compression driver logic.
DG2 clear color render compression uses Tile4 layout. Therefore, we need to define a new format modifier for uAPI to support clear color rendering.
v2: Rebased on new format modifier check [Ram]
--- drivers/gpu/drm/i915/display/intel_fb.c | 43 +++++++++++++++++++ .../drm/i915/display/skl_universal_plane.c | 29 ++++++++++++- include/uapi/drm/drm_fourcc.h | 30 +++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_fb.c +43 -0
@@ -106,6 +106,21 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = { .hsub = 1, .vsub = 1, .has_alpha = true }, }; +static const struct drm_format_info gen12_flat_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, +}; +struct intel_modifier_desc {u64 modifier;struct {
@@ -166,6 +181,27 @@ static const struct intel_modifier_desc intel_modifiers[] = { .ccs.packed_aux_planes = BIT(1), FORMAT_OVERRIDE(gen12_ccs_cc_formats), + }, { + .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS, + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_MC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC_CC, + .ccs.cc_planes = BIT(1), + + FORMAT_OVERRIDE(gen12_flat_ccs_cc_formats), }, { .modifier = I915_FORMAT_MOD_Yf_TILED_CCS, .display_ver = { 9, 11 },
@@ -582,6 +618,9 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC :case I915_FORMAT_MOD_4_TILED :/* * Each 4K tile consists of 64B(8*8) subtiles, with
@@ -759,6 +798,10 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return 16 *1024 ;default :MISSING_CASE (fb->modifier);return 0 ;
drivers/gpu/drm/i915/display/skl_universal_plane.c +28 -1
@@ -753,6 +753,16 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_4_TILED :return PLANE_CTL_TILED_4 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +return PLANE_CTL_TILED_4 |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;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 ;
@@ -1983,6 +1993,9 @@ skl_plane_disable_flip_done(struct intel_plane *plane)static bool skl_plane_has_rc_ccs (struct drm_i915_private *i915,enum pipe pipe,enum plane_id plane_id) { +if (IS_DG2 (i915) && !HAS_4TILE (i915)) +return false; +/* Wa_22011186057 */ if (IS_ADLP_DISPLAY_STEP (i915,STEP_A0 ,STEP_B0 ))return false;
@@ -2001,6 +2014,10 @@ static bool skl_plane_has_rc_ccs(struct drm_i915_private *i915,static bool gen12_plane_has_mc_ccs (struct drm_i915_private *i915,enum plane_id plane_id) { +/* Wa_14013215631:dg2[a0,b0] */ +if (IS_DG2_DISP_STEP (i915,STEP_A0 ,STEP_C0 )) +return false; +/* Wa_14010477008:tgl[a0..c0],rkl[all],dg1[all] */ if (IS_DG1 (i915) ||IS_ROCKETLAKE (i915) ||IS_TGL_DISPLAY_STEP (i915,STEP_A0 ,STEP_D0 ))
@@ -2243,7 +2260,17 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,break ;case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ if (DISPLAY_VER (dev_priv) >=13 ) { - fb->modifier =I915_FORMAT_MOD_4_TILED ; +u32 rc_mask =PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; + +if ((val & rc_mask) == rc_mask) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ; +else if (val &PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; +else if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; +else + fb->modifier =I915_FORMAT_MOD_4_TILED ; }else {if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS;
include/uapi/drm/drm_fourcc.h +30 -0
@@ -567,6 +567,36 @@ extern "C" {*/ #define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12) +/* +* Intel color control surfaces (CCS) for DG2 render compression. +* +* DG2 uses a new compression format for render compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Render compression uses 128 byte +* compression blocks. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 13) + +/* +* Intel color control surfaces (CCS) for DG2 media compression. +* +* DG2 uses a new compression format for media compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Media compression uses 256 byte +* compression blocks. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 14) + +/* +* Intel color control surfaces (CCS) for DG2 clear color render compression. +* +* DG2 uses a unified compression format for clear color render compression. +* The general layout is a tiled layout using 4Kb tiles i.e. Tile4 layout. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 15) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks *
Signature · 1 line
2.20.1
Re: [Mesa-dev] [PATCH v3 13/17] uapi/drm/dg2: Format modifier for DG2 unified compression and clear color
Hi Ramalingam,
Quoted 11 lines · Ramalingam C
From: Matt Roper <[email protected]>
DG2 unifies render compression and media compression into a single format for the first time. The programming and buffer layout is supposed to match compression on older gen12 platforms, but the actual compression algorithm is different from any previous platform; as such, we need a new framebuffer modifier to represent buffers in this format, but otherwise we can re-use the existing gen12 compression driver logic.
Quoted 3 lines
DG2 clear color render compression uses Tile4 layout. Therefore, we need to define a new format modifier for uAPI to support clear color rendering.
I left some feedback on the modifier texts below, but I think it also applies to this commit message.
Quoted 174 lines
v2: Rebased on new format modifier check [Ram]
Signed-off-by Matt Roper <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v2)Signed-off-by Juha-Pekka Heikkilä <[email protected]>Signed-off-by Ramalingam C <[email protected]>cc Simon Ser <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Jordan Justen <[email protected]>Cc Kenneth Graunke <[email protected]>Cc Tony Ye <[email protected]>Cc Slawomir Milczarek <[email protected]>Acked-by Simon Ser <[email protected]>--- drivers/gpu/drm/i915/display/intel_fb.c | 43 +++++++++++++++++++ .../drm/i915/display/skl_universal_plane.c | 29 ++++++++++++- include/uapi/drm/drm_fourcc.h | 30 +++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_fb.c +43
-0@@ -106,6 +106,21 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = { .hsub = 1, .vsub = 1, .has_alpha = true }, }; +static const struct drm_format_info gen12_flat_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, +}; +struct intel_modifier_desc {u64 modifier;struct {@@ -166,6 +181,27 @@ static const struct intel_modifier_desc intel_modifiers[] = { .ccs.packed_aux_planes = BIT(1), FORMAT_OVERRIDE(gen12_ccs_cc_formats), + }, { + .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS, + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_MC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC_CC, + .ccs.cc_planes = BIT(1), + + FORMAT_OVERRIDE(gen12_flat_ccs_cc_formats), }, { .modifier = I915_FORMAT_MOD_Yf_TILED_CCS, .display_ver = { 9, 11 },@@ -582,6 +618,9 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC :case I915_FORMAT_MOD_4_TILED :/* * Each 4K tile consists of 64B(8*8) subtiles, with @@ -759,6 +798,10 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return 16 *1024 ;default :MISSING_CASE (fb->modifier);return 0 ;drivers/gpu/drm/i915/display/skl_universal_plane.c +28
-1@@ -753,6 +753,16 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_4_TILED :return PLANE_CTL_TILED_4 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +return PLANE_CTL_TILED_4 |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;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 ;@@ -1983,6 +1993,9 @@ skl_plane_disable_flip_done(struct intel_plane *plane)static bool skl_plane_has_rc_ccs (struct drm_i915_private *i915,enum pipe pipe,enum plane_id plane_id) { +if (IS_DG2 (i915) && !HAS_4TILE (i915)) +return false; +/* Wa_22011186057 */ if (IS_ADLP_DISPLAY_STEP (i915,STEP_A0 ,STEP_B0 ))return false;@@ -2001,6 +2014,10 @@ static bool skl_plane_has_rc_ccs(struct drm_i915_private *i915,static bool gen12_plane_has_mc_ccs (struct drm_i915_private *i915,enum plane_id plane_id) { +/* Wa_14013215631:dg2[a0,b0] */ +if (IS_DG2_DISP_STEP (i915,STEP_A0 ,STEP_C0 )) +return false; +/* Wa_14010477008:tgl[a0..c0],rkl[all],dg1[all] */ if (IS_DG1 (i915) ||IS_ROCKETLAKE (i915) ||IS_TGL_DISPLAY_STEP (i915,STEP_A0 ,STEP_D0 ))@@ -2243,7 +2260,17 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,break ;case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ if (DISPLAY_VER (dev_priv) >=13 ) { - fb->modifier =I915_FORMAT_MOD_4_TILED ; +u32 rc_mask =PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; + +if ((val & rc_mask) == rc_mask) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ; +else if (val &PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; +else if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; +else + fb->modifier =I915_FORMAT_MOD_4_TILED ; }else {if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS;include/uapi/drm/drm_fourcc.h +10
-0@@ -567,6 +567,36 @@ extern "C" {*/ #define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12) +/* +* Intel color control surfaces (CCS) for DG2 render compression. +* +* DG2 uses a new compression format for render compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Render compression uses 128 byte +* compression blocks. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 13)
include/uapi/drm/drm_fourcc.h extern "C" { · line 589
Quoted 10 lines
include/uapi/drm/drm_fourcc.h +10
-0+ +/* +* Intel color control surfaces (CCS) for DG2 media compression. +* +* DG2 uses a new compression format for media compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Media compression uses 256 byte +* compression blocks. +*/
More so than new compression algorithms, these modifiers are needed due to the lack of CCS planes.
The layout of these surfaces are more like I915_FORMAT_MOD_4_TILED, right?
include/uapi/drm/drm_fourcc.h extern "C" { · line 595
Quoted 6 lines
include/uapi/drm/drm_fourcc.h +6
-0+#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 14) + +/* +* Intel color control surfaces (CCS) for DG2 clear color render compression. +* +* DG2 uses a unified compression format for clear color render compression.
This seems to imply a different format than RC_CCS (with additional clear color tracking).
include/uapi/drm/drm_fourcc.h extern "C" { · line 597
Quoted 2 lines
include/uapi/drm/drm_fourcc.h +2
-0+* The general layout is a tiled layout using 4Kb tiles i.e. Tile4 layout. +*/
It's unclear where the clear color is located from this description (by comparison, the GEN12 modifier states that the clear color can be found at plane index 2).
Regards,
Nanley
Quoted 8 lines
include/uapi/drm/drm_fourcc.h +2
-1+#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 15) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks * -- 2.20.1
Re: [Mesa-dev] [PATCH v3 13/17] uapi/drm/dg2: Format modifier for DG2 unified compression and clear color
Ping. I see that a v4 has been sent out without these comments being addressed.
-Nanley
Quoted 241 lines · Nanley Chery
Hi Ramalingam,
Quoted 11 lines · Ramalingam C
From: Matt Roper <[email protected]>
DG2 unifies render compression and media compression into a single format for the first time. The programming and buffer layout is supposed to match compression on older gen12 platforms, but the actual compression algorithm is different from any previous platform; as such, we need a new framebuffer modifier to represent buffers in this format, but otherwise we can re-use the existing gen12 compression driver logic.
Quoted 3 lines
DG2 clear color render compression uses Tile4 layout. Therefore, we need to define a new format modifier for uAPI to support clear color rendering.
I left some feedback on the modifier texts below, but I think it also applies to this commit message.
Quoted 174 lines
v2: Rebased on new format modifier check [Ram]
Signed-off-by Matt Roper <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v2)Signed-off-by Juha-Pekka Heikkilä <[email protected]>Signed-off-by Ramalingam C <[email protected]>cc Simon Ser <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Jordan Justen <[email protected]>Cc Kenneth Graunke <[email protected]>Cc Tony Ye <[email protected]>Cc Slawomir Milczarek <[email protected]>Acked-by Simon Ser <[email protected]>--- drivers/gpu/drm/i915/display/intel_fb.c | 43 +++++++++++++++++++ .../drm/i915/display/skl_universal_plane.c | 29 ++++++++++++- include/uapi/drm/drm_fourcc.h | 30 +++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_fb.c +43
-0@@ -106,6 +106,21 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = { .hsub = 1, .vsub = 1, .has_alpha = true }, }; +static const struct drm_format_info gen12_flat_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, +}; +struct intel_modifier_desc {u64 modifier;struct {@@ -166,6 +181,27 @@ static const struct intel_modifier_desc intel_modifiers[] = { .ccs.packed_aux_planes = BIT(1), FORMAT_OVERRIDE(gen12_ccs_cc_formats), + }, { + .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS, + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_MC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC_CC, + .ccs.cc_planes = BIT(1), + + FORMAT_OVERRIDE(gen12_flat_ccs_cc_formats), }, { .modifier = I915_FORMAT_MOD_Yf_TILED_CCS, .display_ver = { 9, 11 },@@ -582,6 +618,9 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC :case I915_FORMAT_MOD_4_TILED :/* * Each 4K tile consists of 64B(8*8) subtiles, with @@ -759,6 +798,10 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return 16 *1024 ;default :MISSING_CASE (fb->modifier);return 0 ;drivers/gpu/drm/i915/display/skl_universal_plane.c +28
-1@@ -753,6 +753,16 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_4_TILED :return PLANE_CTL_TILED_4 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +return PLANE_CTL_TILED_4 |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;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 ;@@ -1983,6 +1993,9 @@ skl_plane_disable_flip_done(struct intel_plane *plane)static bool skl_plane_has_rc_ccs (struct drm_i915_private *i915,enum pipe pipe,enum plane_id plane_id) { +if (IS_DG2 (i915) && !HAS_4TILE (i915)) +return false; +/* Wa_22011186057 */ if (IS_ADLP_DISPLAY_STEP (i915,STEP_A0 ,STEP_B0 ))return false;@@ -2001,6 +2014,10 @@ static bool skl_plane_has_rc_ccs(struct drm_i915_private *i915,static bool gen12_plane_has_mc_ccs (struct drm_i915_private *i915,enum plane_id plane_id) { +/* Wa_14013215631:dg2[a0,b0] */ +if (IS_DG2_DISP_STEP (i915,STEP_A0 ,STEP_C0 )) +return false; +/* Wa_14010477008:tgl[a0..c0],rkl[all],dg1[all] */ if (IS_DG1 (i915) ||IS_ROCKETLAKE (i915) ||IS_TGL_DISPLAY_STEP (i915,STEP_A0 ,STEP_D0 ))@@ -2243,7 +2260,17 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,break ;case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ if (DISPLAY_VER (dev_priv) >=13 ) { - fb->modifier =I915_FORMAT_MOD_4_TILED ; +u32 rc_mask =PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; + +if ((val & rc_mask) == rc_mask) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ; +else if (val &PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; +else if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; +else + fb->modifier =I915_FORMAT_MOD_4_TILED ; }else {if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS;include/uapi/drm/drm_fourcc.h +10
-0@@ -567,6 +567,36 @@ extern "C" {*/ #define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12) +/* +* Intel color control surfaces (CCS) for DG2 render compression. +* +* DG2 uses a new compression format for render compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Render compression uses 128 byte +* compression blocks. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 13)include/uapi/drm/drm_fourcc.h extern "C" { · line 589
Quoted 10 lines
include/uapi/drm/drm_fourcc.h +10
-0+ +/* +* Intel color control surfaces (CCS) for DG2 media compression. +* +* DG2 uses a new compression format for media compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Media compression uses 256 byte +* compression blocks. +*/ More so than new compression algorithms, these modifiers are needed due to the lack of CCS planes.
The layout of these surfaces are more like
I915_FORMAT_MOD_4_TILED, right?include/uapi/drm/drm_fourcc.h extern "C" { · line 595
Quoted 6 lines
include/uapi/drm/drm_fourcc.h +6
-0+#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 14) + +/* +* Intel color control surfaces (CCS) for DG2 clear color render compression. +* +* DG2 uses a unified compression format for clear color render compression. This seems to imply a different format than
RC_CCS(with additional clear color tracking).include/uapi/drm/drm_fourcc.h extern "C" { · line 597
Quoted 2 lines
include/uapi/drm/drm_fourcc.h +2
-0+* The general layout is a tiled layout using 4Kb tiles i.e. Tile4 layout. +*/ It's unclear where the clear color is located from this description (by comparison, the GEN12 modifier states that the clear color can be found at plane index 2).
Regards,
NanleyQuoted 8 lines
include/uapi/drm/drm_fourcc.h +2
-1+#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 15) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks * -- 2.20.1
Re: [Mesa-dev] [PATCH v3 13/17] uapi/drm/dg2: Format modifier for DG2 unified compression and clear color
Quoted 1 line · Nanley Chery
Ping. I see that a v4 has been sent out without these comments being addressed.
Sorry for the miss. I will address it soon.
Ram.
Quoted 245 lines
-Nanley
Quoted 241 lines · Nanley Chery
Hi Ramalingam,
Quoted 11 lines · Ramalingam C
From: Matt Roper <[email protected]>
DG2 unifies render compression and media compression into a single format for the first time. The programming and buffer layout is supposed to match compression on older gen12 platforms, but the actual compression algorithm is different from any previous platform; as such, we need a new framebuffer modifier to represent buffers in this format, but otherwise we can re-use the existing gen12 compression driver logic.
Quoted 3 lines
DG2 clear color render compression uses Tile4 layout. Therefore, we need to define a new format modifier for uAPI to support clear color rendering.
I left some feedback on the modifier texts below, but I think it also applies to this commit message.
Quoted 174 lines
v2: Rebased on new format modifier check [Ram]
Signed-off-by Matt Roper <[email protected]>Signed-off-by Mika Kahola <[email protected]> (v2)Signed-off-by Juha-Pekka Heikkilä <[email protected]>Signed-off-by Ramalingam C <[email protected]>cc Simon Ser <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Jordan Justen <[email protected]>Cc Kenneth Graunke <[email protected]>Cc Tony Ye <[email protected]>Cc Slawomir Milczarek <[email protected]>Acked-by Simon Ser <[email protected]>--- drivers/gpu/drm/i915/display/intel_fb.c | 43 +++++++++++++++++++ .../drm/i915/display/skl_universal_plane.c | 29 ++++++++++++- include/uapi/drm/drm_fourcc.h | 30 +++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_fb.c +43
-0@@ -106,6 +106,21 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = { .hsub = 1, .vsub = 1, .has_alpha = true }, }; +static const struct drm_format_info gen12_flat_ccs_cc_formats[] = { + { .format =DRM_FORMAT_XRGB8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_XBGR8888 , .depth =24 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , }, + { .format =DRM_FORMAT_ARGB8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, + { .format =DRM_FORMAT_ABGR8888 , .depth =32 , .num_planes =2 , + .char_per_block = {4 ,0 }, .block_w = {1 ,2 }, .block_h = {1 ,1 }, + .hsub =1 , .vsub =1 , .has_alpha = true }, +}; +struct intel_modifier_desc {u64 modifier;struct {@@ -166,6 +181,27 @@ static const struct intel_modifier_desc intel_modifiers[] = { .ccs.packed_aux_planes = BIT(1), FORMAT_OVERRIDE(gen12_ccs_cc_formats), + }, { + .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS, + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_MC, + }, { + .modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC , + .display_ver = { 12, 13 }, + .tiling = I915_TILING_NONE, + + .ccs.type = INTEL_CCS_RC_CC, + .ccs.cc_planes = BIT(1), + + FORMAT_OVERRIDE(gen12_flat_ccs_cc_formats), }, { .modifier = I915_FORMAT_MOD_Yf_TILED_CCS, .display_ver = { 9, 11 },@@ -582,6 +618,9 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)return 128 ; else return 512; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC :case I915_FORMAT_MOD_4_TILED :/* * Each 4K tile consists of 64B(8*8) subtiles, with @@ -759,6 +798,10 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,case I915_FORMAT_MOD_4_TILED :case I915_FORMAT_MOD_Yf_TILED:return 1 *1024 *1024 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return 16 *1024 ;default :MISSING_CASE (fb->modifier);return 0 ;drivers/gpu/drm/i915/display/skl_universal_plane.c +28
-1@@ -753,6 +753,16 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)return PLANE_CTL_TILED_Y ;case I915_FORMAT_MOD_4_TILED :return PLANE_CTL_TILED_4 ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS : +return PLANE_CTL_TILED_4 | +PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; +case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC : +return PLANE_CTL_TILED_4 |PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ;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 ;@@ -1983,6 +1993,9 @@ skl_plane_disable_flip_done(struct intel_plane *plane)static bool skl_plane_has_rc_ccs (struct drm_i915_private *i915,enum pipe pipe,enum plane_id plane_id) { +if (IS_DG2 (i915) && !HAS_4TILE (i915)) +return false; +/* Wa_22011186057 */ if (IS_ADLP_DISPLAY_STEP (i915,STEP_A0 ,STEP_B0 ))return false;@@ -2001,6 +2014,10 @@ static bool skl_plane_has_rc_ccs(struct drm_i915_private *i915,static bool gen12_plane_has_mc_ccs (struct drm_i915_private *i915,enum plane_id plane_id) { +/* Wa_14013215631:dg2[a0,b0] */ +if (IS_DG2_DISP_STEP (i915,STEP_A0 ,STEP_C0 )) +return false; +/* Wa_14010477008:tgl[a0..c0],rkl[all],dg1[all] */ if (IS_DG1 (i915) ||IS_ROCKETLAKE (i915) ||IS_TGL_DISPLAY_STEP (i915,STEP_A0 ,STEP_D0 ))@@ -2243,7 +2260,17 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,break ;case PLANE_CTL_TILED_YF :/* aka PLANE_CTL_TILED_4 on XE_LPD+ */ if (DISPLAY_VER (dev_priv) >=13 ) { - fb->modifier =I915_FORMAT_MOD_4_TILED ; +u32 rc_mask =PLANE_CTL_RENDER_DECOMPRESSION_ENABLE | +PLANE_CTL_CLEAR_COLOR_DISABLE ; + +if ((val & rc_mask) == rc_mask) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ; +else if (val &PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; +else if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) + fb->modifier =I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; +else + fb->modifier =I915_FORMAT_MOD_4_TILED ; }else {if (val &PLANE_CTL_RENDER_DECOMPRESSION_ENABLE ) fb->modifier = I915_FORMAT_MOD_Yf_TILED_CCS;include/uapi/drm/drm_fourcc.h +10
-0@@ -567,6 +567,36 @@ extern "C" {*/ #define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 12) +/* +* Intel color control surfaces (CCS) for DG2 render compression. +* +* DG2 uses a new compression format for render compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Render compression uses 128 byte +* compression blocks. +*/ +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 13)include/uapi/drm/drm_fourcc.h extern "C" { · line 589
Quoted 10 lines
include/uapi/drm/drm_fourcc.h +10
-0+ +/* +* Intel color control surfaces (CCS) for DG2 media compression. +* +* DG2 uses a new compression format for media compression. The general +* layout is the same as I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, +* but a new hashing/compression algorithm is used, so a fresh modifier must +* be associated with buffers of this type. Media compression uses 256 byte +* compression blocks. +*/ More so than new compression algorithms, these modifiers are needed due to the lack of CCS planes.
The layout of these surfaces are more like
I915_FORMAT_MOD_4_TILED, right?include/uapi/drm/drm_fourcc.h extern "C" { · line 595
Quoted 6 lines
include/uapi/drm/drm_fourcc.h +6
-0+#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 14) + +/* +* Intel color control surfaces (CCS) for DG2 clear color render compression. +* +* DG2 uses a unified compression format for clear color render compression. This seems to imply a different format than
RC_CCS(with additional clear color tracking).include/uapi/drm/drm_fourcc.h extern "C" { · line 597
Quoted 2 lines
include/uapi/drm/drm_fourcc.h +2
-0+* The general layout is a tiled layout using 4Kb tiles i.e. Tile4 layout. +*/ It's unclear where the clear color is located from this description (by comparison, the GEN12 modifier states that the clear color can be found at plane index 2).
Regards,
NanleyQuoted 8 lines
include/uapi/drm/drm_fourcc.h +2
-1+#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 15) +/* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks * -- 2.20.1
PATCH v3 14/17 drm/i915/dg2: Plane handling for Flat CCS and clear color
In reply to Ramalingam CFrom: Anshuman Gupta <[email protected]>
Handles the plane programing for flat ccs and clear color modifiers for DG2
--- .../gpu/drm/i915/display/intel_atomic_plane.c | 3 +- drivers/gpu/drm/i915/display/intel_display.c | 4 ++- drivers/gpu/drm/i915/display/intel_fb.c | 30 +++++++++++-------- drivers/gpu/drm/i915/display/intel_fb.h | 3 +- drivers/gpu/drm/i915/display/skl_scaler.c | 6 ++-- .../drm/i915/display/skl_universal_plane.c | 21 ++++++++----- drivers/gpu/drm/i915/intel_pm.c | 9 +++--- 7 files changed, 46 insertions(+), 30 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic_plane.c +2 -1
@@ -355,7 +355,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ new_crtc_state->active_planes |=BIT (plane->id);if (new_plane_state->uapi.visible && -intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) +intel_format_info_is_yuv_semiplanar (to_i915 (fb->dev), + fb->format, fb->modifier)) new_crtc_state->nv12_planes |=BIT (plane->id); if (new_plane_state->uapi.visible &&
drivers/gpu/drm/i915/display/intel_display.c +3 -1
@@ -8595,7 +8595,9 @@ static void intel_atomic_prepare_plane_clear_colors(struct intel_atomic_state *s/* * The layout of the fast clear color value expected by HW -* (the DRM ABI requiring this value to be located in fb at offset 0 of plane#2): +* (the DRM ABI requiring this value to be located in fb at +* offset 0 of cc plane, plane#2 for non flat-ccs solutions and +* plane#1 for flat-ccs based solutions): * - 4 x 4 bytes per-channel value * (in surface type specific float/int format provided by the fb user) * - 8 bytes native color value used by the display
drivers/gpu/drm/i915/display/intel_fb.c +18 -12
@@ -427,7 +427,8 @@ bool intel_fb_plane_supports_modifier(struct intel_plane *plane, u64 modifier)return false; } -static bool format_is_yuv_semiplanar (const struct intel_modifier_desc *md, +static bool format_is_yuv_semiplanar (const struct drm_i915_private *i915, +const struct intel_modifier_desc *md,const struct drm_format_info *info) {int yuv_planes;
@@ -435,7 +436,7 @@ static bool format_is_yuv_semiplanar(const struct intel_modifier_desc *md,if (!info->is_yuv)return false; -if (is_ccs_type_modifier (md,INTEL_CCS_ANY )) +if (is_ccs_type_modifier (md,INTEL_CCS_ANY ) && !!HAS_FLAT_CCS (i915)) yuv_planes =4 ;else yuv_planes =2 ;
@@ -451,16 +452,18 @@ static bool format_is_yuv_semiplanar(const struct intel_modifier_desc *md,* Returns: * %true if @info / @modifier is YUV semiplanar. */ -bool intel_format_info_is_yuv_semiplanar (const struct drm_format_info *info, +bool intel_format_info_is_yuv_semiplanar (const struct drm_i915_private *i915, +const struct drm_format_info *info,u64 modifier) { -return format_is_yuv_semiplanar (lookup_modifier (modifier), info); +return format_is_yuv_semiplanar (i915,lookup_modifier (modifier), info); } -static u8 ccs_aux_plane_mask (const struct intel_modifier_desc *md, +static u8 ccs_aux_plane_mask (const struct drm_i915_private *i915, +const struct intel_modifier_desc *md,const struct drm_format_info *format) { -if (format_is_yuv_semiplanar (md, format)) +if (format_is_yuv_semiplanar (i915, md, format))return md->ccs.planar_aux_planes;else return md->ccs.packed_aux_planes;
@@ -478,7 +481,7 @@ bool intel_fb_is_ccs_aux_plane(const struct drm_framebuffer *fb, int color_plane {const struct intel_modifier_desc *md =lookup_modifier (fb->modifier); -return ccs_aux_plane_mask (md, fb->format) &BIT (color_plane); +return ccs_aux_plane_mask (to_i915 (fb->dev), md, fb->format) &BIT (color_plane); }/**
@@ -493,8 +496,11 @@ static bool intel_fb_is_gen12_ccs_aux_plane(const struct drm_framebuffer *fb, in {const struct intel_modifier_desc *md =lookup_modifier (fb->modifier); +if (HAS_FLAT_CCS (to_i915 (fb->dev))) +return false; +return check_modifier_display_ver_range (md,12 ,13 ) && -ccs_aux_plane_mask (md, fb->format) &BIT (color_plane); +ccs_aux_plane_mask (to_i915 (fb->dev), md, fb->format) &BIT (color_plane); }/**
@@ -524,8 +530,8 @@ static bool is_gen12_ccs_cc_plane(const struct drm_framebuffer *fb, int color_plstatic bool is_semiplanar_uv_plane (const struct drm_framebuffer *fb,int color_plane) { -return intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier) && - color_plane ==1 ; +return intel_format_info_is_yuv_semiplanar (to_i915 (fb->dev), fb->format, + fb->modifier) && color_plane ==1 ; }bool is_surface_linear (const struct drm_framebuffer *fb,int color_plane)
@@ -590,10 +596,10 @@ int skl_main_to_aux_plane(const struct drm_framebuffer *fb, int main_plane) {struct drm_i915_private *i915 =to_i915 (fb->dev); -if (intel_fb_is_ccs_modifier (fb->modifier)) +if (intel_fb_is_ccs_modifier (fb->modifier) && !HAS_FLAT_CCS (i915))return main_to_ccs_plane (fb, main_plane);else if (DISPLAY_VER (i915) <11 && -intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) +intel_format_info_is_yuv_semiplanar (i915, fb->format, fb->modifier))return 1 ;else return 0 ;
drivers/gpu/drm/i915/display/intel_fb.h +2 -1
@@ -42,7 +42,8 @@ const struct drm_format_info * intel_fb_get_format_info(const struct drm_mode_fb_cmd2 *cmd);bool -intel_format_info_is_yuv_semiplanar (const struct drm_format_info *info, +intel_format_info_is_yuv_semiplanar (const struct drm_i915_private *i915, +const struct drm_format_info *info,u64 modifier);bool is_surface_linear (const struct drm_framebuffer *fb,int color_plane);
drivers/gpu/drm/i915/display/skl_scaler.c +3 -3
@@ -148,7 +148,7 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,return 0 ; } -if (format &&intel_format_info_is_yuv_semiplanar (format, modifier) && +if (format &&intel_format_info_is_yuv_semiplanar (dev_priv, format, modifier) && (src_h <SKL_MIN_YUV_420_SRC_H || src_w <SKL_MIN_YUV_420_SRC_W )) {drm_dbg_kms (&dev_priv->drm,"Planar YUV: src dimensions not met\n" );
@@ -224,7 +224,7 @@ int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,/* Pre-gen11 and SDR planes always need a scaler for planar formats. */ if (!icl_is_hdr_plane (dev_priv, intel_plane->id) && - fb &&intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) + fb &&intel_format_info_is_yuv_semiplanar (dev_priv, fb->format, fb->modifier)) need_scaler = true; ret = skl_update_scaler(crtc_state, force_detach,
@@ -481,7 +481,7 @@ skl_program_plane_scaler(struct intel_plane *plane, 0, INT_MAX);/* TODO: handle sub-pixel coordinates */ -if (intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier) && +if (intel_format_info_is_yuv_semiplanar (dev_priv, fb->format, fb->modifier) && !icl_is_hdr_plane (dev_priv, plane->id)) { y_hphase =skl_scaler_calc_phase (1 , hscale, false); y_vphase =skl_scaler_calc_phase (1 , vscale, false);
drivers/gpu/drm/i915/display/skl_universal_plane.c +13 -8
@@ -823,8 +823,9 @@ static u32 icl_plane_ctl_flip(unsigned int reflect)static u32 adlp_plane_ctl_arb_slots (const struct intel_plane_state *plane_state) {const struct drm_framebuffer *fb = plane_state->hw.fb; +struct drm_i915_private *i915 =to_i915 (fb->dev); -if (intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) { +if (intel_format_info_is_yuv_semiplanar (i915, fb->format, fb->modifier)) {switch (fb->format->cpp[0 ]) {case 2 :return PLANE_CTL_ARB_SLOTS (1 );
@@ -1077,7 +1078,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_SIZE (pipe, plane_id), (src_h <<16 ) | src_w); -intel_de_write_fw (dev_priv,PLANE_AUX_DIST (pipe, plane_id), aux_dist); +/* FLAT CCS doesn't need to program AUX_DIST */ +if (!HAS_FLAT_CCS (dev_priv)) +intel_de_write_fw (dev_priv,PLANE_AUX_DIST (pipe, plane_id), aux_dist);if (icl_is_hdr_plane (dev_priv, plane_id)) intel_de_write_fw(dev_priv, PLANE_CUS_CTL(pipe, plane_id),
@@ -1300,11 +1303,12 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_sstatic int skl_plane_check_nv12_rotation (const struct intel_plane_state *plane_state) {const struct drm_framebuffer *fb = plane_state->hw.fb; +struct drm_i915_private *i915 =to_i915 (fb->dev);unsigned int rotation = plane_state->hw.rotation;int src_w =drm_rect_width (&plane_state->uapi.src) >>16 ;/* Display WA #1106 */ -if (intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier) && +if (intel_format_info_is_yuv_semiplanar (i915, fb->format, fb->modifier) && src_w &3 && (rotation ==DRM_MODE_ROTATE_270 || rotation == (DRM_MODE_REFLECT_X |DRM_MODE_ROTATE_90 ))) {
@@ -1325,7 +1329,7 @@ static int skl_plane_max_scale(struct drm_i915_private *dev_priv,* FIXME need to properly check this later. */ if (DISPLAY_VER (dev_priv) >=10 || - !intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) + !intel_format_info_is_yuv_semiplanar (dev_priv, fb->format, fb->modifier))return 0x30000 -1 ;else return 0x20000 -1 ;
@@ -1493,8 +1497,9 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)/* * CCS AUX surface doesn't have its own x/y offsets, we must make sure * they match with the main surface x/y offsets. +* On DG2 with Flat-CCS, there's no aux plane on fb so skip this checking. */ -if (intel_fb_is_ccs_modifier (fb->modifier)) { +if (intel_fb_is_ccs_modifier (fb->modifier) && !HAS_FLAT_CCS (dev_priv)) {while (!skl_check_main_ccs_coordinates (plane_state, x, y, offset, aux_plane)) {if (offset ==0 )
@@ -1558,7 +1563,7 @@ static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state) offset =intel_plane_compute_aligned_offset (&x, &y, plane_state, uv_plane); -if (intel_fb_is_ccs_modifier (fb->modifier)) { +if (intel_fb_is_ccs_modifier (fb->modifier) && !HAS_FLAT_CCS (i915)) {int ccs_plane =main_to_ccs_plane (fb, uv_plane);u32 aux_offset = plane_state->view.color_plane[ccs_plane].offset;u32 alignment =intel_surf_alignment (fb, uv_plane);
@@ -1662,7 +1667,7 @@ static int skl_check_plane_surface(struct intel_plane_state *plane_state)return ret; } -if (intel_format_info_is_yuv_semiplanar (fb->format, +if (intel_format_info_is_yuv_semiplanar (to_i915 (fb->dev), fb->format, fb->modifier)) { ret =skl_check_nv12_aux_surface (plane_state);if (ret)
@@ -1765,7 +1770,7 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state, plane_state->color_ctl =glk_plane_color_ctl (crtc_state, plane_state); -if (intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier) && +if (intel_format_info_is_yuv_semiplanar (dev_priv, fb->format, fb->modifier) &&icl_is_hdr_plane (dev_priv, plane->id))/* Enable and use MPEG-2 chroma siting */ plane_state->cus_ctl = PLANE_CUS_ENABLE |
drivers/gpu/drm/i915/intel_pm.c +5 -4
@@ -4926,7 +4926,8 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *crtc_state,return 0 ;if (color_plane ==1 && - !intel_format_info_is_yuv_semiplanar (fb->format, fb->modifier)) + !intel_format_info_is_yuv_semiplanar (to_i915 (fb->dev), fb->format, + fb->modifier))return 0 ;/*
@@ -5367,11 +5368,11 @@ skl_compute_wm_params(const struct intel_crtc_state *crtc_state, {struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +bool planar =intel_format_info_is_yuv_semiplanar (dev_priv, format, modifier);u32 interm_pbpl;/* only planar format has two planes */ -if (color_plane ==1 && - !intel_format_info_is_yuv_semiplanar (format, modifier)) { +if (color_plane ==1 && !planar) {drm_dbg_kms (&dev_priv->drm,"Non planar format have single plane\n" );return -EINVAL ;
@@ -5385,7 +5386,7 @@ skl_compute_wm_params(const struct intel_crtc_state *crtc_state, wp->x_tiled = modifier ==I915_FORMAT_MOD_X_TILED ; wp->rc_surface = modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS; - wp->is_planar =intel_format_info_is_yuv_semiplanar (format, modifier); + wp->is_planar = planar; wp->width = width;if (color_plane ==1 && wp->is_planar)
Signature · 1 line
2.20.1
PATCH v3 15/17 drm/i915/uapi: document behaviour for DG2 64K support
In reply to Ramalingam CFrom: Matthew Auld <[email protected]>
On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing with device local-memory. This is quite tricky for various reasons, so try to document the new implicit uapi for this.
v2: Fixed suggestions on formatting [Daniel]
--- include/uapi/drm/i915_drm.h | 67 ++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 5 deletions(-)
include/uapi/drm/i915_drm.h +62 -5
@@ -1118,10 +1118,16 @@ struct drm_i915_gem_exec_object2 {/** * When the EXEC_OBJECT_PINNED flag is specified this is populated by * the user with the GTT offset at which this object will be pinned. +* * When the I915_EXEC_NO_RELOC flag is specified this must contain the * presumed_offset of the object. +* * During execbuffer2 the kernel populates it with the value of the * current GTT offset of the object, for future presumed_offset writes. +* +* See struct drm_i915_gem_create_ext for the rules when dealing with +* alignment restrictions with I915_MEMORY_CLASS_DEVICE, on devices with +* minimum page sizes, like DG2. */ __u64 offset;
@@ -3144,11 +3150,62 @@ struct drm_i915_gem_create_ext {* * The (page-aligned) allocated size for the object will be returned. * -* Note that for some devices we have might have further minimum -* page-size restrictions(larger than 4K), like for device local-memory. -* However in general the final size here should always reflect any -* rounding up, if for example using the I915_GEM_CREATE_EXT_MEMORY_REGIONS -* extension to place the object in device local-memory. +* +* **DG2 64K min page size implications:** +* +* On discrete platforms, starting from DG2, we have to contend with GTT +* page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE +* objects. Specifically the hardware only supports 64K or larger GTT +* page sizes for such memory. The kernel will already ensure that all +* I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page +* sizes underneath. +* +* Note that the returned size here will always reflect any required +* rounding up done by the kernel, i.e 4K will now become 64K on devices +* such as DG2. +* +* **Special DG2 GTT address alignment requirement:** +* +* The GTT alignment will also need be at least 64K for such objects. +* +* Note that due to how the hardware implements 64K GTT page support, we +* have some further complications: +* +* 1) The entire PDE(which covers a 2M virtual address range), must +* contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same +* PDE is forbidden by the hardware. +* +* 2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM +* objects. +* +* To handle the above the kernel implements a memory coloring scheme to +* prevent userspace from mixing I915_MEMORY_CLASS_DEVICE and +* I915_MEMORY_CLASS_SYSTEM objects in the same PDE. If the kernel is +* ever unable to evict the required pages for the given PDE(different +* color) when inserting the object into the GTT then it will simply +* fail the request. +* +* Since userspace needs to manage the GTT address space themselves, +* special care is needed to ensure this doesn't happen. The simplest +* scheme is to simply align and round up all I915_MEMORY_CLASS_DEVICE +* objects to 2M, which avoids any issues here. At the very least this +* is likely needed for objects that can be placed in both +* I915_MEMORY_CLASS_DEVICE and I915_MEMORY_CLASS_SYSTEM, to avoid +* potential issues when the kernel needs to migrate the object behind +* the scenes, since that might also involve evicting other objects. +* +* **To summarise the GTT rules, on platforms like DG2:** +* +* 1) All objects that can be placed in I915_MEMORY_CLASS_DEVICE must +* have 64K alignment. The kernel will reject this otherwise. +* +* 2) All I915_MEMORY_CLASS_DEVICE objects must never be placed in +* the same PDE with other I915_MEMORY_CLASS_SYSTEM objects. The +* kernel will reject this otherwise. +* +* 3) Objects that can be placed in both I915_MEMORY_CLASS_DEVICE and +* I915_MEMORY_CLASS_SYSTEM should probably be aligned and padded out +* to 2M. */ __u64 size;/**
Signature · 1 line
2.20.1
PATCH v3 16/17 drm/i915/Flat-CCS: Document on Flat-CCS memory compression
In reply to Ramalingam CDocuments the Flat-CCS feature and kernel handling required along with modifiers used.
--- drivers/gpu/drm/i915/gt/intel_migrate.c | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+)
drivers/gpu/drm/i915/gt/intel_migrate.c +47 -0
@@ -491,6 +491,53 @@ intel_context_migrate_copy(struct intel_context *ce,return err; } +/** +* DOC: Flat-CCS - Memory compression for Local memory +* +* On Xe-HP and later devices, we use dedicated compression control state (CCS) +* stored in local memory for each surface, to support the 3D and media +* compression formats. +* +* The memory required for the CCS of the entire local memory is 1/256 of the +* local memory size. So before the kernel boot, the required memory is reserved +* for the CCS data and a secure register will be programmed with the CCS base +* address. +* +* Flat CCS data needs to be cleared when a lmem object is allocated. +* And CCS data can be copied in and out of CCS region through +* XY_CTRL_SURF_COPY_BLT. CPU can't access the CCS data directly. +* +* When we exaust the lmem, if the object's placements support smem, then we can +* directly decompress the compressed lmem object into smem and start using it +* from smem itself. +* +* But when we need to swapout the compressed lmem object into a smem region +* though objects' placement doesn't support smem, then we copy the lmem content +* as it is into smem region along with ccs data (using XY_CTRL_SURF_COPY_BLT). +* When the object is referred, lmem content will be swaped in along with +* restoration of the CCS data (using XY_CTRL_SURF_COPY_BLT) at corresponding +* location. +* +* +* Flat-CCS Modifiers for different compression formats +* ---------------------------------------------------- +* +* I915_FORMAT_MOD_F_TILED_DG2_RC_CCS - used to indicate the buffers of Flat CCS +* render compression formats. Though the general layout is same as +* I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, new hashing/compression algorithm is +* used. Render compression uses 128 byte compression blocks +* +* I915_FORMAT_MOD_F_TILED_DG2_MC_CCS -used to indicate the buffers of Flat CCS +* media compression formats. Though the general layout is same as +* I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, new hashing/compression algorithm is +* used. Media compression uses 256 byte compression blocks. +* +* I915_FORMAT_MOD_F_TILED_DG2_RC_CCS_CC - used to indicate the buffers of Flat +* CCS clear color render compression formats. Unified compression format for +* clear color render compression. The genral layout is a tiled layout using +* 4Kb tiles i.e Tile4 layout. +*/ +static inline u32 *i915_flush_dw (u32 *cmd,u64 dst,u32 flags) {/* Mask the 3 LSB to use the PPGTT address space */
Signature · 1 line
2.20.1
PATCH v3 17/17 Doc/gpu/rfc/i915: i915 DG2 uAPI
In reply to Ramalingam CDetails of the new features getting added as part of DG2 enabling and their implicit impact on the uAPI.
v2: improvised the Flat-CCS documentation [Danvet & CQ]
--- Documentation/gpu/rfc/i915_dg2.rst | 32 ++++++++++++++++++++++++++++++ Documentation/gpu/rfc/index.rst | 3 +++ 2 files changed, 35 insertions(+) create mode 100644 Documentation/gpu/rfc/i915_dg2.rst
Documentation/gpu/rfc/i915_dg2.rst new file +32 -0
@@ -0,0 +1,32 @@ +==================== +I915 DG2 RFC Section +==================== + +Upstream plan +============= +Plan to upstream the DG2 enabling is: + +* Merge basic HW enabling for DG2 (Still without pciid) +* Merge the 64k support for lmem +* Merge the flat CCS enabling patches +* Add the pciid for DG2 and enable the DG2 in CI + + +64K page support for lmem +========================= +On DG2 hw, local-memory supports minimum GTT page size of 64k only. 4k is not +supported anymore. + +DG2 hw doesn't support the 64k (lmem) and 4k (smem) pages in the same ppgtt +Page table. Refer the struct drm_i915_gem_create_ext for the implication of +handling the 64k page size. + +.. kernel-doc:: include/uapi/drm/i915_drm.h + :functions: drm_i915_gem_create_ext + + +Flat CCS support for lmem +========================= + +.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_migrate.c + :doc: Flat-CCS - Memory compression for Local memory
Documentation/gpu/rfc/index.rst +3 -0
@@ -20,6 +20,9 @@ host such documentation: i915_gem_lmem.rst +.. toctree:: + i915_dg2.rst + .. toctree:: i915_scheduler.rst
Signature · 1 line
2.20.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
URL : https://patchwork.freedesktop.org/series/95686/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 262eb27b8dcf drm/i915: Add has_64k_pages flag e3f6866bf3b6 drm/i915/xehpsdv: set min page-size to 64K f0364064d028 drm/i915/xehpsdv: enforce min GTT alignment -:260: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #260: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:456: + if (offset < hole_start + aligned_size)
-:272: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #272: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:480:
+ if (offset + aligned_size > hole_end)
-:290: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #290: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:496:
+ if (offset < hole_start + aligned_size)
-:302: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #302: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:519:
+ if (offset + aligned_size > hole_end)
-:320: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #320: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:535:
+ if (offset < hole_start + aligned_size)
-:332: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #332: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:559:
+ if (offset + aligned_size > hole_end)
-:350: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #350: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:575:
+ if (offset < hole_start + aligned_size)
-:362: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring #362: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:598:
+ if (offset + aligned_size > hole_end)
total: 0 errors, 8 warnings, 0 checks, 418 lines checkedaffe7c270c7b drm/i915: enforce min page size for scratchde0727edcf31 drm/i915/gtt/xehpsdv: move scratch page to system memory502e5874de68 drm/i915/xehpsdv: support 64K GTT pages34273abda035 drm/i915/xehpsdv: implement memory coloringb452eca49e6d drm/i915/xehpsdv: Add has_flat_ccs to device info8f7a32bb5f91 drm/i915/lmem: Enable lmem for platforms with Flat CCS21298f8428cc drm/i915/gt: Clear compress metadata for Xe_HP platforms
-:8: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8:
device memory buffer object we also need to clear the associated CCS buffer.
total: 0 errors, 1 warnings, 0 checks, 171 lines checked37dec488f909 drm/i915/dg2: Prune the Y Tiling modifiers2644de7ef016 drm/i915/dg2: Tile 4 plane format supportdf1ed00fc619 uapi/drm/dg2: Format modifier for DG2 unified compression and clear color e76d9270a03d drm/i915/dg2: Plane handling for Flat CCS and clear color 91830d73b8b3 drm/i915/uapi: document behaviour for DG2 64K support57c66718ad12 drm/i915/Flat-CCS: Document on Flat-CCS memory compression a76556fa89db Doc/gpu/rfc/i915: i915 DG2 uAPI
-:23: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644
-:28: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #28: FILE: Documentation/gpu/rfc/i915_dg2.rst:1:
+====================
total: 0 errors, 2 warnings, 0 checks, 41 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
URL : https://patchwork.freedesktop.org/series/95686/
State : warning
== Summary ==
$ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:319:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1416:25: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1416:25: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1416:25: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1417:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1417:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1417:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1476:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1476:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1476:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:355:16: error: incompatible types in comparison expression (different type sizes): +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:355:16: unsigned long * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:355:16: unsigned long long * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4481:31: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4481:31: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4481:31: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4483:33: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4483:33: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4483:33: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:294:25: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:294:25: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:294:25: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:295:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:295:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:295:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:344:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:344:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:344:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:117:1: warning: no newline at end of file +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:315:49: error: static assertion faile
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: drm/i915/dg2: Enabling 64k page size and flat ccs (rev3)
URL : https://patchwork.freedesktop.org/series/95686/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10799 -> Patchwork_21470
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_21470 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_21470, please notify your bug team 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/Patchwork_21470/index.html
Participating hosts (37 -> 7)
------------------------------
ERROR: It appears as if the changes made in Patchwork_21470 prevented too many machines from booting.
Missing (30): fi-kbl-soraka fi-rkl-11600 fi-rkl-guc bat-dg1-6 bat-dg1-5 fi-bdw-gvtdvm fi-apl-guc fi-skl-6600u fi-cml-u2 fi-bxt-dsi fi-bdw-5557u fi-bsw-n3050 fi-glk-dsi fi-kbl-7500u fi-bsw-nick fi-skl-6700k2 fi-kbl-7567u fi-tgl-dsi fi-skl-guc fi-cfl-8700k fi-ehl-2 fi-jsl-1 fi-tgl-1115g4 fi-bsw-cyan fi-cfl-guc bat-adlp-4 fi-kbl-guc fi-cfl-8109u fi-kbl-8809g fi-bsw-kefka
Known issues
------------
Here are the changes found in Patchwork_21470 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [PASS][1] -> [INCOMPLETE][2] ([i915#3921])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10799/fi-snb-2600/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21470/fi-snb-2600/igt@i915_selftest@[email protected]
[i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
Build changes
-------------
* Linux: CI_DRM_10799 -> Patchwork_21470
CI-20190529: 20190529
CI_DRM_10799: 9f1a26b0a231c3e7991d70b8622e47e1041467f1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6262: d1c793b26e31cc6ae3f9fa3239805a9bbcc749fb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21470: a76556fa89db6a0ea8a00569df40ee8d8d0c592c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a76556fa89db Doc/gpu/rfc/i915: i915 DG2 uAPI57c66718ad12 drm/i915/Flat-CCS: Document on Flat-CCS memory compression 91830d73b8b3 drm/i915/uapi: document behaviour for DG2 64K support e76d9270a03d drm/i915/dg2: Plane handling for Flat CCS and clear color df1ed00fc619 uapi/drm/dg2: Format modifier for DG2 unified compression and clear color 2644de7ef016 drm/i915/dg2: Tile 4 plane format support37dec488f909 drm/i915/dg2: Prune the Y Tiling modifiers21298f8428cc drm/i915/gt: Clear compress metadata for Xe_HP platforms 8f7a32bb5f91 drm/i915/lmem: Enable lmem for platforms with Flat CCS b452eca49e6d drm/i915/xehpsdv: Add has_flat_ccs to device info 34273abda035 drm/i915/xehpsdv: implement memory coloring502e5874de68 drm/i915/xehpsdv: support 64K GTT pagesde0727edcf31 drm/i915/gtt/xehpsdv: move scratch page to system memory affe7c270c7b drm/i915: enforce min page size for scratchf0364064d028 drm/i915/xehpsdv: enforce min GTT alignmente3f6866bf3b6 drm/i915/xehpsdv: set min page-size to 64K262eb27b8dcf drm/i915: Add has_64k_pages flag
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21470/index.html