All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Alexander.Deucher-5C7GfCeVMHo@public.gmane.org,
	Monk.Liu-5C7GfCeVMHo@public.gmane.org,
	Christian.Koenig-5C7GfCeVMHo@public.gmane.org
Cc: Gary.Sun-5C7GfCeVMHo@public.gmane.org,
	pding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>,
	Bingley.Li-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH] drm/amdgpu: drm/amdgpu: always consider virualised device for checking post (v2)
Date: Thu, 19 Oct 2017 09:44:08 +0800	[thread overview]
Message-ID: <1508377448-4671-1-git-send-email-Pixel.Ding@amd.com> (raw)

From: pding <Pixel.Ding@amd.com>

The post checking on scratch registers isn't reliable for virtual function.

v2: only change in IGP reading bios.

Signed-off-by: pding <Pixel.Ding@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c   | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 0280ae5..caabc5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1840,6 +1840,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
 /* Common functions */
 int amdgpu_gpu_reset(struct amdgpu_device *adev);
 bool amdgpu_need_backup(struct amdgpu_device *adev);
+bool amdgpu_vpost_needed(struct amdgpu_device *adev);
 void amdgpu_pci_config_reset(struct amdgpu_device *adev);
 bool amdgpu_need_post(struct amdgpu_device *adev);
 void amdgpu_update_display_priority(struct amdgpu_device *adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
index c21adf6..25f43eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
@@ -99,7 +99,7 @@ static bool igp_read_bios_from_vram(struct amdgpu_device *adev)
 	resource_size_t size = 256 * 1024; /* ??? */
 
 	if (!(adev->flags & AMD_IS_APU))
-		if (amdgpu_need_post(adev))
+		if (amdgpu_vpost_needed(adev))
 			return false;
 
 	adev->bios = NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index a601d87..098cd44 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -764,7 +764,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
 
 }
 
-static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
+bool amdgpu_vpost_needed(struct amdgpu_device *adev)
 {
 	if (amdgpu_sriov_vf(adev))
 		return false;
-- 
2.9.5

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

             reply	other threads:[~2017-10-19  1:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19  1:44 Pixel Ding [this message]
     [not found] ` <1508377448-4671-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-19  1:45   ` [PATCH] drm/amdgpu: drm/amdgpu: always consider virualised device for checking post (v2) Ding, Pixel
2017-10-19  2:34   ` Alex Deucher
     [not found]     ` <CADnq5_Pm6bS1JZ_GcLE=RNnCDDHmip99PK6KmogMoArUXk7pxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19  3:09       ` Ding, Pixel
     [not found]         ` <FC26870B-8173-40E3-94A1-5FC0A5227C5B-5C7GfCeVMHo@public.gmane.org>
2017-10-19  3:14           ` Alex Deucher

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=1508377448-4671-1-git-send-email-Pixel.Ding@amd.com \
    --to=pixel.ding-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-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.