All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry(Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: christian.koenig-5C7GfCeVMHo@public.gmane.org, "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: disable UVD/VCE for some polaris 12 variants
Date: Tue, 27 Nov 2018 09:47:40 +0800	[thread overview]
Message-ID: <962b81c0-358b-0447-d496-9b8efe817261@amd.com> (raw)
In-Reply-To: <b63c3263-9df8-6c3f-06aa-7b97609d21a6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3870 bytes --]

On 11/26/18 5:28 PM, Christian König wrote:
> Am 26.11.18 um 03:38 schrieb Zhang, Jerry(Junwei):
>> On 11/24/18 3:32 AM, Deucher, Alexander wrote:
>>>
>>> Is this required? Are the harvesting fuses incorrect?  If the blocks 
>>> are harvested, we should bail out of the blocks properly during 
>>> init.  Also, please make this more explicit if we still need it.  E.g.,
>>>
>>>
>>
>> The harvest fuse is indeed disabling UVD and VCE, as it's a mining card.
>> Then any command to UVD/VCE causing NULL pointer issue, like amdgpu_test.
>
> In this case we should fix the NULL pointer issue instead. Do you have 
> a backtrace for this?

Sorry to miss the detail.
The NULL pointer is caused by UVD is not initialized as it's disabled in 
VBIOS for this kind of card.

When cs submit, it will check ring->funcs->parse_cs in amdgpu_cs_ib_fill().
However, uvd_v6_0_early_init() skip the set ring function, as 
CC_HARVEST_FUSES is set UVD/VCE disabled.
Then the access to UVD/VCE ring's funcs will cause NULL pointer issue.

BTW, Windows driver disables UVD/VCE for it as well.

Regards,
Jerry

>
> Regards,
> Christian.
>
>>
>> AFAIW, windows also disable UVD and VCE in initialization.
>>
>>>        if ((adev->pdev->device == 0x67df) &&
>>>               (adev->pdev->revision == 0xf7)) {
>>>
>>> /* Some polaris12 variants don't support UVD/VCE */
>>>
>>>       } else  {
>>>
>>> amdgpu_device_ip_block_add(adev, &uvd_v6_3_ip_block);
>>>
>>> amdgpu_device_ip_block_add(adev, &vce_v3_4_ip_block);
>>>
>>>     }
>>>
>>>
>>
>> OK, will explicit the process.
>>
>> Regards,
>> Jerry
>>>
>>> That way if we re-arrange the order later, it will be easier to track.
>>>
>>>
>>> Alex
>>>
>>> ------------------------------------------------------------------------
>>> *From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of 
>>> Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
>>> *Sent:* Friday, November 23, 2018 3:32:27 AM
>>> *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>>> *Cc:* Zhang, Jerry
>>> *Subject:* [PATCH] drm/amdgpu: disable UVD/VCE for some polaris 12 
>>> variants
>>> Some variants don't support UVD and VCE.
>>>
>>> Signed-off-by: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
>>> ---
>>>  drivers/gpu/drm/amd/amdgpu/vi.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c 
>>> b/drivers/gpu/drm/amd/amdgpu/vi.c
>>> index f3a4cf1f013a..3338b013ded4 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
>>> @@ -1660,6 +1660,10 @@ int vi_set_ip_blocks(struct amdgpu_device *adev)
>>> amdgpu_device_ip_block_add(adev, &dce_v11_2_ip_block);
>>>                  amdgpu_device_ip_block_add(adev, &gfx_v8_0_ip_block);
>>>                  amdgpu_device_ip_block_add(adev, &sdma_v3_1_ip_block);
>>> +               /* Some polaris12 variants don't support UVD/VCE */
>>> +               if ((adev->pdev->device == 0x67df) &&
>>> +                     (adev->pdev->revision == 0xf7))
>>> +                       break;
>>>                  amdgpu_device_ip_block_add(adev, &uvd_v6_3_ip_block);
>>>                  amdgpu_device_ip_block_add(adev, &vce_v3_4_ip_block);
>>>                  break;
>>> -- 
>>> 2.17.1
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>


[-- Attachment #1.2: Type: text/html, Size: 10412 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-11-27  1:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23  8:32 [PATCH] drm/amdgpu: disable UVD/VCE for some polaris 12 variants Junwei Zhang
     [not found] ` <20181123083227.25555-1-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-11-23  9:19   ` Cui, Flora
2018-11-23 19:32   ` Deucher, Alexander
     [not found]     ` <BN6PR12MB18091B4409C1DC5CD17F903CF7D40-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-11-26  2:38       ` Zhang, Jerry(Junwei)
     [not found]         ` <b8a49f59-e466-b0e7-abf8-feedf1bf1946-5C7GfCeVMHo@public.gmane.org>
2018-11-26  9:28           ` Christian König
     [not found]             ` <b63c3263-9df8-6c3f-06aa-7b97609d21a6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-27  1:47               ` Zhang, Jerry(Junwei) [this message]
     [not found]                 ` <962b81c0-358b-0447-d496-9b8efe817261-5C7GfCeVMHo@public.gmane.org>
2018-11-27  9:56                   ` Christian König
     [not found]                     ` <31393f87-a966-4e90-7cdf-e00676124f73-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-27 16:11                       ` Alex Deucher
     [not found]                         ` <CADnq5_NOaJShmdMvbuiykPXfC7LZneZ8U54feDU4EWYcZSQ5fw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-28  3:48                           ` Zhang, Jerry
     [not found]                             ` <C7F70BA5-6F05-49FC-87DC-90DE04807BC9-5C7GfCeVMHo@public.gmane.org>
2018-11-28 15:00                               ` Deucher, Alexander
  -- strict thread matches above, loose matches on Subject: below --
2018-11-23  8:01 Junwei Zhang
     [not found] ` <20181123080144.24427-1-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-11-23  8:32   ` Zhang, Jerry(Junwei)

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=962b81c0-358b-0447-d496-9b8efe817261@amd.com \
    --to=jerry.zhang-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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.