diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2024-09-11 13:23:00 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2024-09-11 14:10:02 -0700 |
commit | c7c3c7b7400bef1ba14831c0a8ca1cdb35f32c94 (patch) | |
tree | a049e43c56dd8b636d5768918447ff9c398c8de0 /drivers/gpu/drm/xe/xe_bo.c | |
parent | fb2551a0e93897aec7fb3d4f473ebc06b146d160 (diff) | |
parent | b615b9c36cae0468491547206406a909a9a37f26 (diff) | |
download | lwn-c7c3c7b7400bef1ba14831c0a8ca1cdb35f32c94.tar.gz lwn-c7c3c7b7400bef1ba14831c0a8ca1cdb35f32c94.zip |
Merge drm/drm-next into drm-xe-next
Sync with drm-misc and drm-intel-next for common APIs and refactors.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c index 0dc8ebcf8389..a4dadd5a424c 100644 --- a/drivers/gpu/drm/xe/xe_bo.c +++ b/drivers/gpu/drm/xe/xe_bo.c @@ -2036,6 +2036,13 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data, bo_flags |= args->placement << (ffs(XE_BO_FLAG_SYSTEM) - 1); + /* CCS formats need physical placement at a 64K alignment in VRAM. */ + if ((bo_flags & XE_BO_FLAG_VRAM_MASK) && + (bo_flags & XE_BO_FLAG_SCANOUT) && + !(xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K) && + IS_ALIGNED(args->size, SZ_64K)) + bo_flags |= XE_BO_FLAG_NEEDS_64K; + if (args->flags & DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM) { if (XE_IOCTL_DBG(xe, !(bo_flags & XE_BO_FLAG_VRAM_MASK))) return -EINVAL; |