From: James Zhu <jamesz-5C7GfCeVMHo@public.gmane.org>
To: Timothy Pearson
<tpearson-z0qzliK6Om0mgXJStvpl+vpXobYPEAuW@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: "Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
"David (ChunMing) Zhou"
<David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3
Date: Mon, 25 Jun 2018 10:46:49 -0400 [thread overview]
Message-ID: <03467f4e-bcab-165c-028b-fea16441446a@amd.com> (raw)
In-Reply-To: <1050162536.2570273.1529798571780.JavaMail.zimbra-z0qzliK6Om0mgXJStvpl+u2xl0RS173n@public.gmane.org>
On 2018-06-23 08:02 PM, Timothy Pearson wrote:
> 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.
Hi Timothy,
From design of view, it is not right to just change
AMDGPU_MAX_UVD_INSTANCES to 3.
Could you tell me some detail of UBSAN test and attach the dmesg also?
thanks!
James Zhu
>
> 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) + \
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-06-25 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03467f4e-bcab-165c-028b-fea16441446a@amd.com \
--to=jamesz-5c7gfcevmho@public.gmane.org \
--cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=tpearson-z0qzliK6Om0mgXJStvpl+vpXobYPEAuW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox