drm/amdgpu: check ring type for secure IBs
Subsystems (2)
PATCH 1/1 drm/amdgpu: check ring type for secure IBs
We don't support secure operation on compute rings at the moment so reject them.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +6 -0
@@ -161,6 +161,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,return -EINVAL ; } +if ((ib->flags &AMDGPU_IB_FLAGS_SECURE ) && + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE )) { +dev_err (adev->dev,"secure submissions not supported on compute rings\n" ); +return -EINVAL ; + } + alloc_size = ring->funcs->emit_frame_size + num_ibs * ring->funcs->emit_ib_size;
Signature · 6 lines
2.25.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Andrey
Quoted 15 lines · Alex Deucher
We don't support secure operation on compute rings at the moment so reject them.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0@@ -161,6 +161,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, · line 172
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +6
-0+if ((ib->flags &AMDGPU_IB_FLAGS_SECURE ) && + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE )) { +dev_err (adev->dev,"secure submissions not supported on compute rings\n" ); +return -EINVAL ; + } + alloc_size = ring->funcs->emit_frame_size + num_ibs * ring->funcs->emit_ib_size;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
--
Best Regards
Aaron Liu
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, April 24, 2020 4:47 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: check ring type for secure IBs
We don't support secure operation on compute rings at the moment so reject them.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +6 -0
@@ -161,6 +161,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,return -EINVAL ; } +if ((ib->flags &AMDGPU_IB_FLAGS_SECURE ) && + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE )) { +dev_err (adev->dev,"secure submissions not supported on compute rings\n" ); +return -EINVAL ; + } + alloc_size = ring->funcs->emit_frame_size + num_ibs * ring->funcs->emit_ib_size;
--
2.25.3
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Caaron.liu%40amd.com%7C4237b46dff1743425aa708d7e7c78c83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637232717308400132&sdata=0%2BSeNlm5n2%2F3OaMf%2Bw0ArpVcyenjJ2fO%2FwaRymsbZxI%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 23.04.20 um 22:47 schrieb Alex Deucher:
Quoted 4 lines
We don't support secure operation on compute rings at the moment so reject them.
Signed-off-by Alex Deucher <[email protected]>
Quoted 11 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0@@ -161,6 +161,12 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, · line 172
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +6
-0+if ((ib->flags &AMDGPU_IB_FLAGS_SECURE ) && + (ring->funcs->type ==AMDGPU_RING_TYPE_COMPUTE )) { +dev_err (adev->dev,"secure submissions not supported on compute rings\n" ); +return -EINVAL ; + } + alloc_size = ring->funcs->emit_frame_size + num_ibs * ring->funcs->emit_ib_size;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx