<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>yeah, this patch is correct <br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Koenig, Christian<br>
<b>Sent:</b> Wednesday, October 18, 2017 3:23:04 PM<br>
<b>To:</b> Ding, Pixel; Liu, Monk; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Sun, Gary; Li, Bingley<br>
<b>Subject:</b> Re: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">I've already did, but honestly have no idea what you do here.<br>
<br>
ASIC post is not something I've every worked on.<br>
<br>
It looks odd that you add/remove some static keyword here, but I can't <br>
judge the technical correctness.<br>
<br>
Monk, Alex what do you think of this?<br>
<br>
Sorry,<br>
Christian.<br>
<br>
Am 18.10.2017 um 09:19 schrieb Ding, Pixel:<br>
> Hi Christian,<br>
><br>
> Would you please take a look at this change? It’s to unify the VBIOS post checking.<br>
> —<br>
> Sincerely Yours,<br>
> Pixel<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On 18/10/2017, 10:25 AM, "Ding, Pixel" <Pixel.Ding@amd.com> wrote:<br>
><br>
>> Hi all,<br>
>><br>
>> Could someone review this patch?<br>
>><br>
>> —<br>
>> Sincerely Yours,<br>
>> Pixel<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> 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:<br>
>><br>
>>> 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?<br>
>>> —<br>
>>> Sincerely Yours,<br>
>>> Pixel<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On 17/10/2017, 5:00 PM, "Liu, Monk" <Monk.Liu@amd.com> wrote:<br>
>>><br>
>>> >From the patch itself I still couldn't tell the difference <br>
>>>> -----Original Message-----<br>
>>>> From: Ding, Pixel<br>
>>>> Sent: 2017年10月17日 15:54<br>
>>>> To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org; Koenig, Christian <Christian.Koenig@amd.com><br>
>>>> Cc: Li, Bingley <Bingley.Li@amd.com>; Sun, Gary <Gary.Sun@amd.com><br>
>>>> Subject: Re: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post<br>
>>>><br>
>>>> It fixes a issue hidden in:<br>
>>>><br>
>>>> 95 static bool igp_read_bios_from_vram(struct amdgpu_device *adev)<br>
>>>> 96 {<br>
>>>> 97 uint8_t __iomem *bios;<br>
>>>> 98 resource_size_t vram_base;<br>
>>>> 99 resource_size_t size = 256 * 1024; /* ??? */<br>
>>>> 100<br>
>>>> 101 if (!(adev->flags & AMD_IS_APU))<br>
>>>> 102 if (amdgpu_need_post(adev))<br>
>>>> 103 return false;<br>
>>>><br>
>>>><br>
>>>> This makes bios reading fallback to SMC INDEX/DATA register case.<br>
>>>><br>
>>>> —<br>
>>>> Sincerely Yours,<br>
>>>> Pixel<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On 17/10/2017, 3:48 PM, "Liu, Monk" <Monk.Liu@amd.com> wrote:<br>
>>>><br>
>>>>> I don't understand how this patch works??? Looks like just rename vpost_needed to check_post<br>
>>>>><br>
>>>>> -----Original Message-----<br>
>>>>> From: Pixel Ding [<a href="mailto:Pixel.Ding@amd.com">mailto:Pixel.Ding@amd.com</a>]<br>
>>>>> Sent: 2017年10月17日 14:38<br>
>>>>> To: amd-gfx@lists.freedesktop.org; Liu, Monk <Monk.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com><br>
>>>>> Cc: Li, Bingley <Bingley.Li@amd.com>; Sun, Gary <Gary.Sun@amd.com>; Ding, Pixel <Pixel.Ding@amd.com><br>
>>>>> Subject: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post<br>
>>>>><br>
>>>>> From: pding <Pixel.Ding@amd.com><br>
>>>>><br>
>>>>> The post checking on scratch registers isn't reliable for virtual function.<br>
>>>>><br>
>>>>> Signed-off-by: pding <Pixel.Ding@amd.com><br>
>>>>> ---<br>
>>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----<br>
>>>>> 1 file changed, 4 insertions(+), 4 deletions(-)<br>
>>>>><br>
>>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
>>>>> index 683965b..ab8f0d6 100644<br>
>>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
>>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
>>>>> @@ -669,7 +669,7 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)<br>
>>>>> * or post is needed if hw reset is performed.<br>
>>>>> * Returns true if need or false if not.<br>
>>>>> */<br>
>>>>> -bool amdgpu_need_post(struct amdgpu_device *adev)<br>
>>>>> +static bool amdgpu_check_post(struct amdgpu_device *adev)<br>
>>>>> {<br>
>>>>> uint32_t reg;<br>
>>>>><br>
>>>>> @@ -692,7 +692,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)<br>
>>>>><br>
>>>>> }<br>
>>>>><br>
>>>>> -static bool amdgpu_vpost_needed(struct amdgpu_device *adev)<br>
>>>>> +bool amdgpu_need_post(struct amdgpu_device *adev)<br>
>>>>> {<br>
>>>>> if (amdgpu_sriov_vf(adev))<br>
>>>>> return false;<br>
>>>>> @@ -716,7 +716,7 @@ static bool amdgpu_vpost_needed(struct amdgpu_device *adev)<br>
>>>>> return true;<br>
>>>>> }<br>
>>>>> }<br>
>>>>> - return amdgpu_need_post(adev);<br>
>>>>> + return amdgpu_check_post(adev);<br>
>>>>> }<br>
>>>>><br>
>>>>> /**<br>
>>>>> @@ -2208,7 +2208,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,<br>
>>>>> amdgpu_device_detect_sriov_bios(adev);<br>
>>>>><br>
>>>>> /* Post card if necessary */<br>
>>>>> - if (amdgpu_vpost_needed(adev)) {<br>
>>>>> + if (amdgpu_need_post(adev)) {<br>
>>>>> if (!adev->bios) {<br>
>>>>> dev_err(adev->dev, "no vBIOS found\n");<br>
>>>>> amdgpu_vf_error_put(AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);<br>
>>>>> --<br>
>>>>> 2.9.5<br>
>>>>><br>
>>> _______________________________________________<br>
>>> amd-gfx mailing list<br>
>>> amd-gfx@lists.freedesktop.org<br>
>>> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
<br>
<br>
</div>
</span></font>
</body>
</html>