All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post()
@ 2017-03-28 16:21 Alex Deucher
       [not found] ` <1490718105-24996-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2017-03-28 16:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

We check the mem config register to make sure it's been
programmed by the vbios to determine if we need to post
so we check for a non-0 value.  However, when the asic
comes out of reset, we may see all ones here, so check
for that too.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2a5af62..4bf1c8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
 	/* then check MEM_SIZE, in case the crtcs are off */
 	reg = amdgpu_asic_get_config_memsize(adev);
 
-	if (reg)
+	if ((reg != 0) && (reg != 0xffffffff))
 		return false;
 
 	return true;
-- 
2.5.5

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

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

* Re: [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post()
       [not found] ` <1490718105-24996-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-28 17:10   ` Christian König
  2017-03-29  0:49   ` 答复: " Qu, Jim
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2017-03-28 17:10 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Am 28.03.2017 um 18:21 schrieb Alex Deucher:
> We check the mem config register to make sure it's been
> programmed by the vbios to determine if we need to post
> so we check for a non-0 value.  However, when the asic
> comes out of reset, we may see all ones here, so check
> for that too.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2a5af62..4bf1c8f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
>   	/* then check MEM_SIZE, in case the crtcs are off */
>   	reg = amdgpu_asic_get_config_memsize(adev);
>   
> -	if (reg)
> +	if ((reg != 0) && (reg != 0xffffffff))
>   		return false;
>   
>   	return true;


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

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

* 答复: [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post()
       [not found] ` <1490718105-24996-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2017-03-28 17:10   ` Christian König
@ 2017-03-29  0:49   ` Qu, Jim
  1 sibling, 0 replies; 3+ messages in thread
From: Qu, Jim @ 2017-03-29  0:49 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Deucher, Alexander

Reviewed-by: Jim Qu <Jim.Qu@amd.com>

Thanks
JimQu

________________________________________
发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Alex Deucher <alexdeucher@gmail.com>
发送时间: 2017年3月29日 0:21
收件人: amd-gfx@lists.freedesktop.org
抄送: Deucher, Alexander
主题: [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post()

We check the mem config register to make sure it's been
programmed by the vbios to determine if we need to post
so we check for a non-0 value.  However, when the asic
comes out of reset, we may see all ones here, so check
for that too.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2a5af62..4bf1c8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
        /* then check MEM_SIZE, in case the crtcs are off */
        reg = amdgpu_asic_get_config_memsize(adev);

-       if (reg)
+       if ((reg != 0) && (reg != 0xffffffff))
                return false;

        return true;
--
2.5.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

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

end of thread, other threads:[~2017-03-29  0:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 16:21 [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post() Alex Deucher
     [not found] ` <1490718105-24996-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-03-28 17:10   ` Christian König
2017-03-29  0:49   ` 答复: " Qu, Jim

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.