AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3
@ 2018-06-24  0:02 Timothy Pearson
       [not found] ` <1050162536.2570273.1529798571780.JavaMail.zimbra-z0qzliK6Om0mgXJStvpl+u2xl0RS173n@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Timothy Pearson @ 2018-06-24  0:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher, David (ChunMing) Zhou, Christian König


amdgpu_fence_driver_start_ring() attempts to access
UVD instance 2 during setup, while the existing UVD
instance count only allows instances 0 and 1.

Increase AMDGPU_MAX_UVD_INSTANCES by one to avoid the
invalid array access.

Caught by UBSAN.

Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
index 8b23a1b00c76..4a47cb570af7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
@@ -31,7 +31,7 @@
 #define AMDGPU_UVD_SESSION_SIZE		(50*1024)
 #define AMDGPU_UVD_FIRMWARE_OFFSET	256
 
-#define AMDGPU_MAX_UVD_INSTANCES			2
+#define AMDGPU_MAX_UVD_INSTANCES			3
 
 #define AMDGPU_UVD_FIRMWARE_SIZE(adev)    \
 	(AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(((const struct common_firmware_header *)(adev)->uvd.fw->data)->ucode_size_bytes) + \
-- 
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-25 19:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-24  0:02 [PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3 Timothy Pearson
     [not found] ` <1050162536.2570273.1529798571780.JavaMail.zimbra-z0qzliK6Om0mgXJStvpl+u2xl0RS173n@public.gmane.org>
2018-06-25 14:46   ` James Zhu
     [not found]     ` <03467f4e-bcab-165c-028b-fea16441446a-5C7GfCeVMHo@public.gmane.org>
2018-06-25 15:53       ` Timothy Pearson
     [not found]         ` <5B310FE8.4060900-z0qzliK6Om0mgXJStvpl+vpXobYPEAuW@public.gmane.org>
2018-06-25 17:29           ` Deucher, Alexander
     [not found]             ` <BN6PR12MB1809E207A784F6EE6D79239AF74A0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-06-25 18:37               ` James Zhu
     [not found]                 ` <2b12b893-e2a0-9362-cb8f-15b57b12fe11-5C7GfCeVMHo@public.gmane.org>
2018-06-25 18:53                   ` Alex Deucher
     [not found]                     ` <CADnq5_NVoR3zRRPWdQHTbRzZ7e0XYsjajDSx-jS_sa0-B3id1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-25 18:59                       ` James Zhu
     [not found]                         ` <b0c2612a-ac0b-ca7a-be8d-1a3d1cadc938-5C7GfCeVMHo@public.gmane.org>
2018-06-25 19:02                           ` Alex Deucher
     [not found]                             ` <CADnq5_O3P68Er_oEf9YybKxFBXk4BFQnJ45wtiKCs9oSxJBcAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-25 19:13                               ` Leo Liu
2018-06-25 19:15                               ` James Zhu
     [not found]                                 ` <f5941769-c342-6127-f932-414ab13414f8-5C7GfCeVMHo@public.gmane.org>
2018-06-25 19:35                                   ` Leo Liu
     [not found]                                     ` <691bc1b0-b3fb-6c48-081a-c9c9876a1b79-5C7GfCeVMHo@public.gmane.org>
2018-06-25 19:46                                       ` James Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox