Skip to content

Commit d7eafed

Browse files
cwabbott0robclark
authored andcommitted
drm/msm: Expose expanded UBWC config uapi
This adds extra parameters that affect UBWC tiling that will be used by the Mesa implementation of VK_EXT_host_image_copy. Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/607401/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent b874638 commit d7eafed

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/gpu/drm/msm/adreno/adreno_gpu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,12 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_file_private *ctx,
379379
case MSM_PARAM_RAYTRACING:
380380
*value = adreno_gpu->has_ray_tracing;
381381
return 0;
382+
case MSM_PARAM_UBWC_SWIZZLE:
383+
*value = adreno_gpu->ubwc_config.ubwc_swizzle;
384+
return 0;
385+
case MSM_PARAM_MACROTILE_MODE:
386+
*value = adreno_gpu->ubwc_config.macrotile_mode;
387+
return 0;
382388
default:
383389
DBG("%s: invalid param: %u", gpu->name, param);
384390
return -EINVAL;

include/uapi/drm/msm_drm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ struct drm_msm_timespec {
8888
#define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */
8989
#define MSM_PARAM_HIGHEST_BANK_BIT 0x10 /* RO */
9090
#define MSM_PARAM_RAYTRACING 0x11 /* RO */
91+
#define MSM_PARAM_UBWC_SWIZZLE 0x12 /* RO */
92+
#define MSM_PARAM_MACROTILE_MODE 0x13 /* RO */
9193

9294
/* For backwards compat. The original support for preemption was based on
9395
* a single ring per priority level so # of priority levels equals the #

0 commit comments

Comments
 (0)