Module: Mesa Branch: master Commit: 52268a3833e9b63df26bf73f1507ea4fe50c96c5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=52268a3833e9b63df26bf73f1507ea4fe50c96c5
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Mon May 18 17:21:05 2020 +0200 radeonsi: enable PIPE_CAP_DEVICE_PROTECTED_CONTENT Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5096> --- src/gallium/drivers/radeonsi/si_get.c | 3 +++ src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
