All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ding, Pixel" <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: "Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
	"Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Sun, Gary" <Gary.Sun-5C7GfCeVMHo@public.gmane.org>,
	"Li, Bingley" <Bingley.Li-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post
Date: Wed, 18 Oct 2017 09:20:01 +0000	[thread overview]
Message-ID: <1FC8D21C-AE70-4760-A9DB-61B8372EC54C@amd.com> (raw)
In-Reply-To: <b3d8df4b-38f9-2bc2-3340-782069591058-5C7GfCeVMHo@public.gmane.org>

Sorry for the confusion, while I still believe this is the right way to go.

amdgpu_need_post and amdgpu_vpost_needed both try to check the VBIOS posting, amdgpu_need_post doesn’t consider VF/PT devices. They were both in use.

This patch is to unify these 2 functions to single one and always consider the VF/PT devices.

So the amdgpu_vpost_needed is renamed to amdgpu_need_post, and the previous amdgpu_need_post becomes a static function.
— 
Sincerely Yours,
Pixel







On 18/10/2017, 3:23 PM, "amd-gfx on behalf of Christian König" <amd-gfx-bounces@lists.freedesktop.org on behalf of christian.koenig@amd.com> wrote:

>I've already did, but honestly have no idea what you do here.
>
>ASIC post is not something I've every worked on.
>
>It looks odd that you add/remove some static keyword here, but I can't 
>judge the technical correctness.
>
>Monk, Alex what do you think of this?
>
>Sorry,
>Christian.
>
>Am 18.10.2017 um 09:19 schrieb Ding, Pixel:
>> Hi Christian,
>>
>> Would you please take a look at this change? It’s to unify the VBIOS post checking.
>> —
>> Sincerely Yours,
>> Pixel
>>
>>
>>
>>
>>
>>
>>
>>
>> On 18/10/2017, 10:25 AM, "Ding, Pixel" <Pixel.Ding@amd.com> wrote:
>>
>>> Hi all,
>>>
>>> Could someone review this patch?
>>>
>>> —
>>> Sincerely Yours,
>>> Pixel
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 17/10/2017, 4:06 PM, "amd-gfx on behalf of Ding, Pixel" <amd-gfx-bounces@lists.freedesktop.org on behalf of Pixel.Ding@amd.com> wrote:
>>>
>>>> you can see the difference of function amdgpu_need_post. Generally speaking, there were 2 functions to check VBIOS posting, one considers VF and passthru while the other doesn’t. In fact we should always consider VF and PT for checking, right? For example, this checking here believe VF needs a posting because SCRATCH registers are not the expected value. Is it clear?
>>>> —
>>>> Sincerely Yours,
>>>> Pixel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 17/10/2017, 5:00 PM, "Liu, Monk" <Monk.Liu@amd.com> wrote:
>>>>
>>>> >From the patch itself I still couldn't tell the difference 
>>>>> -----Original Message-----
>>>>> From: Ding, Pixel
>>>>> Sent: 2017年10月17日 15:54
>>>>> To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org; Koenig, Christian <Christian.Koenig@amd.com>
>>>>> Cc: Li, Bingley <Bingley.Li@amd.com>; Sun, Gary <Gary.Sun@amd.com>
>>>>> Subject: Re: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post
>>>>>
>>>>> It fixes a issue hidden in:
>>>>>
>>>>> 95 static bool igp_read_bios_from_vram(struct amdgpu_device *adev)
>>>>> 96 {
>>>>> 97	uint8_t __iomem *bios;
>>>>> 98	resource_size_t vram_base;
>>>>> 99	resource_size_t size = 256 * 1024; /* ??? */
>>>>> 100
>>>>> 101	if (!(adev->flags & AMD_IS_APU))
>>>>> 102		if (amdgpu_need_post(adev))
>>>>> 103		return false;
>>>>>
>>>>>
>>>>> This makes bios reading fallback to SMC INDEX/DATA register case.
>>>>>
>>>>> —
>>>>> Sincerely Yours,
>>>>> Pixel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 17/10/2017, 3:48 PM, "Liu, Monk" <Monk.Liu@amd.com> wrote:
>>>>>
>>>>>> I don't understand how this patch works??? Looks like just rename vpost_needed to check_post
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Pixel Ding [mailto:Pixel.Ding@amd.com]
>>>>>> Sent: 2017年10月17日 14:38
>>>>>> To: amd-gfx@lists.freedesktop.org; Liu, Monk <Monk.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
>>>>>> Cc: Li, Bingley <Bingley.Li@amd.com>; Sun, Gary <Gary.Sun@amd.com>; Ding, Pixel <Pixel.Ding@amd.com>
>>>>>> Subject: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post
>>>>>>
>>>>>> From: pding <Pixel.Ding@amd.com>
>>>>>>
>>>>>> The post checking on scratch registers isn't reliable for virtual function.
>>>>>>
>>>>>> Signed-off-by: pding <Pixel.Ding@amd.com>
>>>>>> ---
>>>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----
>>>>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>>>>> index 683965b..ab8f0d6 100644
>>>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>>>>> @@ -669,7 +669,7 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
>>>>>>   * or post is needed if  hw reset is performed.
>>>>>>   * Returns true if need or false if not.
>>>>>>   */
>>>>>> -bool amdgpu_need_post(struct amdgpu_device *adev)
>>>>>> +static bool amdgpu_check_post(struct amdgpu_device *adev)
>>>>>> {
>>>>>> 	uint32_t reg;
>>>>>>
>>>>>> @@ -692,7 +692,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
>>>>>>
>>>>>> }
>>>>>>
>>>>>> -static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
>>>>>> +bool amdgpu_need_post(struct amdgpu_device *adev)
>>>>>> {
>>>>>> 	if (amdgpu_sriov_vf(adev))
>>>>>> 		return false;
>>>>>> @@ -716,7 +716,7 @@ static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
>>>>>> 				return true;
>>>>>> 		}
>>>>>> 	}
>>>>>> -	return amdgpu_need_post(adev);
>>>>>> +	return amdgpu_check_post(adev);
>>>>>> }
>>>>>>
>>>>>> /**
>>>>>> @@ -2208,7 +2208,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>>>>>> 	amdgpu_device_detect_sriov_bios(adev);
>>>>>>
>>>>>> 	/* Post card if necessary */
>>>>>> -	if (amdgpu_vpost_needed(adev)) {
>>>>>> +	if (amdgpu_need_post(adev)) {
>>>>>> 		if (!adev->bios) {
>>>>>> 			dev_err(adev->dev, "no vBIOS found\n");
>>>>>> 			amdgpu_vf_error_put(AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
>>>>>> --
>>>>>> 2.9.5
>>>>>>
>>>> _______________________________________________
>>>> amd-gfx mailing list
>>>> amd-gfx@lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-10-18  9:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  6:37 Make staging driver stable for SRIOV VF (1 v2) Pixel Ding
     [not found] ` <1508222267-18627-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17  6:37   ` [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post Pixel Ding
     [not found]     ` <1508222267-18627-2-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17  7:48       ` Liu, Monk
     [not found]         ` <BLUPR12MB04492724C9C66EF3ABA7C295844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17  7:53           ` Ding, Pixel
     [not found]             ` <77D84CB4-2676-4DBC-AB49-431923E87EAC-5C7GfCeVMHo@public.gmane.org>
2017-10-17  8:00               ` Liu, Monk
     [not found]                 ` <BLUPR12MB0449C0C378B70A73A44579CC844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17  8:06                   ` Ding, Pixel
     [not found]                     ` <BA0191B9-16C3-43D8-9816-BF77301CE5D5-5C7GfCeVMHo@public.gmane.org>
2017-10-18  2:13                       ` Liu, Monk
2017-10-18  2:25                       ` Ding, Pixel
     [not found]                         ` <9035FC71-9AB1-406C-9A0B-8B050E51C7F4-5C7GfCeVMHo@public.gmane.org>
2017-10-18  7:19                           ` Ding, Pixel
     [not found]                             ` <83AE16CE-43F8-44E7-AEF6-6FA581134C7A-5C7GfCeVMHo@public.gmane.org>
2017-10-18  7:23                               ` Christian König
     [not found]                                 ` <b3d8df4b-38f9-2bc2-3340-782069591058-5C7GfCeVMHo@public.gmane.org>
2017-10-18  9:13                                   ` Liu, Monk
2017-10-18  9:20                                   ` Ding, Pixel [this message]
2017-10-18 14:08                                   ` Deucher, Alexander
     [not found]                                     ` <BN6PR12MB16521D66D545EE9CF038725AF74D0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-19  3:23                                       ` Ding, Pixel
     [not found]                                         ` <5D15F8FE-DDA7-4AC9-AB1B-2B69ED5C410F-5C7GfCeVMHo@public.gmane.org>
2017-10-19  3:32                                           ` Deucher, Alexander
2017-10-17  6:37   ` [PATCH 2/3] drm/amdgpu: report more amdgpu_fence_info v2 Pixel Ding
     [not found]     ` <1508222267-18627-3-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17  7:03       ` Christian König
2017-10-17  7:49       ` Liu, Monk
     [not found]         ` <BLUPR12MB0449B223F1C69AE2587EE9F5844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17  7:55           ` Ding, Pixel
     [not found]             ` <AE86FEF5-92C5-4F1B-B302-5A9289C42CD8-5C7GfCeVMHo@public.gmane.org>
2017-10-17  7:59               ` Liu, Monk
2017-10-17  6:37   ` [PATCH 3/3] drm/amdgpu: busywait KIQ register accessing v2 Pixel Ding
     [not found]     ` <1508222267-18627-4-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17  8:20       ` Christian König
     [not found]         ` <7f22595c-ae6d-f859-3ba6-42fe30a24707-5C7GfCeVMHo@public.gmane.org>
2017-10-17  8:38           ` Ding, Pixel
     [not found]             ` <E8EDC6D0-8756-4E09-8C0F-187CE061A470-5C7GfCeVMHo@public.gmane.org>
2017-10-17  8:59               ` Christian König
     [not found]                 ` <b6506918-3acf-6480-2f90-6b4bbc09eada-5C7GfCeVMHo@public.gmane.org>
2017-10-17  9:27                   ` Ding, Pixel

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=1FC8D21C-AE70-4760-A9DB-61B8372EC54C@amd.com \
    --to=pixel.ding-5c7gfcevmho@public.gmane.org \
    --cc=Bingley.Li-5C7GfCeVMHo@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=Gary.Sun-5C7GfCeVMHo@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.