diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index d162e0655e7..cd7a3383d4b 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -183,6 +183,9 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_DEVICE_RESET_STATUS_QUERY: return sscreen->info.has_gpu_reset_status_query; + case PIPE_CAP_DEVICE_PROTECTED_CONTENT: + return sscreen->info.has_tmz_support; + case PIPE_CAP_TEXTURE_MULTISAMPLE: return sscreen->info.has_2d_tiling; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 839c5a36584..e8b95dc556b 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -1470,8 +1470,13 @@ static struct pb_buffer *amdgpu_bo_from_handle(struct radeon_winsys *rws, flags |= RADEON_FLAG_NO_CPU_ACCESS; if (info.alloc_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) flags |= RADEON_FLAG_GTT_WC; - if (info.alloc_flags & AMDGPU_GEM_CREATE_ENCRYPTED) + if (info.alloc_flags & AMDGPU_GEM_CREATE_ENCRYPTED) { + /* Imports are always possible even if the importer isn't using TMZ. + * For instance libweston needs to import the buffer to be able to determine + * if it can be used for scanout. + */ flags |= RADEON_FLAG_ENCRYPTED; + } /* Initialize the structure. */ simple_mtx_init(&bo->lock, mtx_plain);