public inbox for amd-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 01/16] drm/amdgpu: move get_rev_id at first before load gpu_info firmware
Date: Wed, 12 Sep 2018 14:29:18 -0500	[thread overview]
Message-ID: <20180912192933.28712-2-alexander.deucher@amd.com> (raw)
In-Reply-To: <20180912192933.28712-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

From: Huang Rui <ray.huang@amd.com>

Rev id is used for identifying Raven2 series of chips. So we would better to
initialize it at first.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index e338ad6d0d20..794cfe4a52d1 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -479,6 +479,11 @@ static const struct amdgpu_ip_block_version vega10_common_ip_block =
 	.funcs = &soc15_common_ip_funcs,
 };
 
+static uint32_t soc15_get_rev_id(struct amdgpu_device *adev)
+{
+	return adev->nbio_funcs->get_rev_id(adev);
+}
+
 int soc15_set_ip_blocks(struct amdgpu_device *adev)
 {
 	/* Set IP register base before any HW register access */
@@ -507,6 +512,8 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)
 		adev->df_funcs = &df_v3_6_funcs;
 	else
 		adev->df_funcs = &df_v1_7_funcs;
+
+	adev->rev_id = soc15_get_rev_id(adev);
 	adev->nbio_funcs->detect_hw_virt(adev);
 
 	if (amdgpu_sriov_vf(adev))
@@ -581,11 +588,6 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)
 	return 0;
 }
 
-static uint32_t soc15_get_rev_id(struct amdgpu_device *adev)
-{
-	return adev->nbio_funcs->get_rev_id(adev);
-}
-
 static void soc15_flush_hdp(struct amdgpu_device *adev, struct amdgpu_ring *ring)
 {
 	adev->nbio_funcs->hdp_flush(adev, ring);
@@ -642,7 +644,6 @@ static int soc15_common_early_init(void *handle)
 
 	adev->asic_funcs = &soc15_asic_funcs;
 
-	adev->rev_id = soc15_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
 	case CHIP_VEGA10:
-- 
2.13.6

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

  parent reply	other threads:[~2018-09-12 19:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 19:29 [PATCH 00/16] Add support for Raven2 Alex Deucher
     [not found] ` <20180912192933.28712-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-09-12 19:29   ` Alex Deucher [this message]
2018-09-12 19:29   ` [PATCH 02/16] drm/amdgpu: set external rev id for raven2 Alex Deucher
2018-09-12 19:29   ` [PATCH 03/16] drm/amdgpu: add raven2 to gpu_info firmware Alex Deucher
2018-09-12 19:29   ` [PATCH 04/16] drm/amdgpu: add raven2 vcn firmware support Alex Deucher
2018-09-12 19:29   ` [PATCH 05/16] drm/amdgpu: add psp support for raven2 Alex Deucher
2018-09-12 19:29   ` [PATCH 06/16] drm/amdgpu/sdma4: specify raven2 firmware Alex Deucher
2018-09-12 19:29   ` [PATCH 07/16] drm/amdgpu/sdma4: Add raven2 golden setting Alex Deucher
2018-09-12 19:29   ` [PATCH 08/16] drm/amdgpu/gfx9: add support for raven2 gfx firmware Alex Deucher
2018-09-12 19:29   ` [PATCH 09/16] drm/amdgpu/gfx9: add raven2 golden setting Alex Deucher
2018-09-12 19:29   ` [PATCH 10/16] drm/amdgpu: fix the VM fault while write at the top of the invisible vram Alex Deucher
2018-09-12 19:29   ` [PATCH 11/16] drm/amd/display: Add Raven2 definitions in dc Alex Deucher
     [not found]     ` <20180912192933.28712-12-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-09-12 20:10       ` Alex Deucher
     [not found]         ` <CADnq5_PsBONPZyirw5BVGNb=sf5_9njE6=jXBm0d7RjqC8=i+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-12 20:43           ` Harry Wentland
     [not found]             ` <4a0826ff-d3a2-4f6f-2c74-d262e6ec70b3-5C7GfCeVMHo@public.gmane.org>
2018-09-12 20:56               ` Alex Deucher
2018-09-12 19:29   ` [PATCH 12/16] drm/amd/display: Add DC config flag for Raven2 (v2) Alex Deucher
2018-09-12 19:29   ` [PATCH 13/16] drm/amd/powerplay: update smu10_verify_smc_interface() to be raven2 compatible Alex Deucher
2018-09-12 19:29   ` [PATCH 14/16] drm/amd/powerplay: round up the Mhz convertion (v2) Alex Deucher
2018-09-12 19:29   ` [PATCH 15/16] drm/amd/powerplay: disable raven2 force dpm level support (v2) Alex Deucher
2018-09-12 19:29   ` [PATCH 16/16] drm/amdgpu: set CG flags for raven2 (v2) 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=20180912192933.28712-2-alexander.deucher@amd.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=ray.huang-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox