All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
@ 2019-06-17 14:45 Alex Deucher
       [not found] ` <20190617144500.29491-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2019-06-17 14:45 UTC (permalink / raw
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

We need the asic_funcs set for the get rom callbacks in some
cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a836db1000f..e26303bc567e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
 
-	/* Read BIOS */
-	if (!amdgpu_get_bios(adev))
-		return -EINVAL;
-
-	r = amdgpu_atombios_init(adev);
-	if (r) {
-		dev_err(adev->dev, "amdgpu_atombios_init failed\n");
-		amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
-		return r;
-	}
-
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
 			DRM_ERROR("disabled ip block: %d <%s>\n",
@@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 				adev->ip_blocks[i].status.valid = true;
 			}
 		}
+		/* get the vbios after the asic_funcs are set up */
+		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
+			/* Read BIOS */
+			if (!amdgpu_get_bios(adev))
+				return -EINVAL;
+
+			r = amdgpu_atombios_init(adev);
+			if (r) {
+				dev_err(adev->dev, "amdgpu_atombios_init failed\n");
+				amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
+				return r;
+			}
+		}
 	}
 
 	adev->cg_flags &= amdgpu_cg_mask;
-- 
2.20.1

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

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

* RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
       [not found] ` <20190617144500.29491-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2019-06-17 14:55   ` Russell, Kent
  2019-06-17 15:14   ` Russell, Kent
  1 sibling, 0 replies; 6+ messages in thread
From: Russell, Kent @ 2019-06-17 14:55 UTC (permalink / raw
  To: Alex Deucher,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
  Cc: Deucher, Alexander

Thanks Alex, I am testing it out now.

 Kent

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

We need the asic_funcs set for the get rom callbacks in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a836db1000f..e26303bc567e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
 
-	/* Read BIOS */
-	if (!amdgpu_get_bios(adev))
-		return -EINVAL;
-
-	r = amdgpu_atombios_init(adev);
-	if (r) {
-		dev_err(adev->dev, "amdgpu_atombios_init failed\n");
-		amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
-		return r;
-	}
-
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
 			DRM_ERROR("disabled ip block: %d <%s>\n", @@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 				adev->ip_blocks[i].status.valid = true;
 			}
 		}
+		/* get the vbios after the asic_funcs are set up */
+		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
+			/* Read BIOS */
+			if (!amdgpu_get_bios(adev))
+				return -EINVAL;
+
+			r = amdgpu_atombios_init(adev);
+			if (r) {
+				dev_err(adev->dev, "amdgpu_atombios_init failed\n");
+				amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
+				return r;
+			}
+		}
 	}
 
 	adev->cg_flags &= amdgpu_cg_mask;
--
2.20.1

_______________________________________________
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] 6+ messages in thread

* RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
       [not found] ` <20190617144500.29491-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2019-06-17 14:55   ` Russell, Kent
@ 2019-06-17 15:14   ` Russell, Kent
       [not found]     ` <BN6PR12MB161858B2EF2FDE6983B8AF8085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Russell, Kent @ 2019-06-17 15:14 UTC (permalink / raw
  To: Alex Deucher,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
  Cc: Deucher, Alexander

This also worked. I don't think that I'm qualified enough to RB it, but you can add my

Verified-By: Kent Russell <kent.russell@amd.com>

 Kent

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

We need the asic_funcs set for the get rom callbacks in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a836db1000f..e26303bc567e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev))
 		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
 
-	/* Read BIOS */
-	if (!amdgpu_get_bios(adev))
-		return -EINVAL;
-
-	r = amdgpu_atombios_init(adev);
-	if (r) {
-		dev_err(adev->dev, "amdgpu_atombios_init failed\n");
-		amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
-		return r;
-	}
-
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
 			DRM_ERROR("disabled ip block: %d <%s>\n", @@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 				adev->ip_blocks[i].status.valid = true;
 			}
 		}
+		/* get the vbios after the asic_funcs are set up */
+		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
+			/* Read BIOS */
+			if (!amdgpu_get_bios(adev))
+				return -EINVAL;
+
+			r = amdgpu_atombios_init(adev);
+			if (r) {
+				dev_err(adev->dev, "amdgpu_atombios_init failed\n");
+				amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
+				return r;
+			}
+		}
 	}
 
 	adev->cg_flags &= amdgpu_cg_mask;
--
2.20.1

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
       [not found]     ` <BN6PR12MB161858B2EF2FDE6983B8AF8085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-06-17 15:23       ` Deucher, Alexander
       [not found]         ` <BN6PR12MB1809772C53A7C9BB535D0012F7EB0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Deucher, Alexander @ 2019-06-17 15:23 UTC (permalink / raw
  To: Russell, Kent, Alex Deucher,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org


[-- Attachment #1.1: Type: text/plain, Size: 3277 bytes --]

I'll make that a tested-by.  Thanks!

Alex
________________________________
From: Russell, Kent
Sent: Monday, June 17, 2019 11:14 AM
To: Alex Deucher; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander
Subject: RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

This also worked. I don't think that I'm qualified enough to RB it, but you can add my

Verified-By: Kent Russell <kent.russell-5C7GfCeVMHo@public.gmane.org>

 Kent

-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

We need the asic_funcs set for the get rom callbacks in some cases.

Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a836db1000f..e26303bc567e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
         if (amdgpu_sriov_vf(adev))
                 adev->pm.pp_feature &= ~PP_GFXOFF_MASK;

-       /* Read BIOS */
-       if (!amdgpu_get_bios(adev))
-               return -EINVAL;
-
-       r = amdgpu_atombios_init(adev);
-       if (r) {
-               dev_err(adev->dev, "amdgpu_atombios_init failed\n");
-               amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
-               return r;
-       }
-
         for (i = 0; i < adev->num_ip_blocks; i++) {
                 if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
                         DRM_ERROR("disabled ip block: %d <%s>\n", @@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
                                 adev->ip_blocks[i].status.valid = true;
                         }
                 }
+               /* get the vbios after the asic_funcs are set up */
+               if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
+                       /* Read BIOS */
+                       if (!amdgpu_get_bios(adev))
+                               return -EINVAL;
+
+                       r = amdgpu_atombios_init(adev);
+                       if (r) {
+                               dev_err(adev->dev, "amdgpu_atombios_init failed\n");
+                               amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
+                               return r;
+                       }
+               }
         }

         adev->cg_flags &= amdgpu_cg_mask;
--
2.20.1

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

[-- Attachment #1.2: Type: text/html, Size: 7416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

* RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
       [not found]         ` <BN6PR12MB1809772C53A7C9BB535D0012F7EB0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-06-17 15:26           ` Russell, Kent
       [not found]             ` <BN6PR12MB1618690F5B4843CD5E0CC31085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Russell, Kent @ 2019-06-17 15:26 UTC (permalink / raw
  To: Deucher, Alexander, Alex Deucher,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org


[-- Attachment #1.1: Type: text/plain, Size: 3714 bytes --]

Thanks, I need to get familiar with all of the tags 😊

Kent

From: Deucher, Alexander <Alexander.Deucher@amd.com>
Sent: Monday, June 17, 2019 11:24 AM
To: Russell, Kent <Kent.Russell@amd.com>; Alex Deucher <alexdeucher@gmail.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

I'll make that a tested-by.  Thanks!

Alex
________________________________
From: Russell, Kent
Sent: Monday, June 17, 2019 11:14 AM
To: Alex Deucher; amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander
Subject: RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

This also worked. I don't think that I'm qualified enough to RB it, but you can add my

Verified-By: Kent Russell <kent.russell@amd.com<mailto:kent.russell@amd.com>>

 Kent

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com<mailto:Alexander.Deucher@amd.com>>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

We need the asic_funcs set for the get rom callbacks in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com<mailto:alexander.deucher@amd.com>>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 4a836db1000f..e26303bc567e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
         if (amdgpu_sriov_vf(adev))
                 adev->pm.pp_feature &= ~PP_GFXOFF_MASK;

-       /* Read BIOS */
-       if (!amdgpu_get_bios(adev))
-               return -EINVAL;
-
-       r = amdgpu_atombios_init(adev);
-       if (r) {
-               dev_err(adev->dev, "amdgpu_atombios_init failed\n");
-               amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
-               return r;
-       }
-
         for (i = 0; i < adev->num_ip_blocks; i++) {
                 if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
                         DRM_ERROR("disabled ip block: %d <%s>\n", @@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
                                 adev->ip_blocks[i].status.valid = true;
                         }
                 }
+               /* get the vbios after the asic_funcs are set up */
+               if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
+                       /* Read BIOS */
+                       if (!amdgpu_get_bios(adev))
+                               return -EINVAL;
+
+                       r = amdgpu_atombios_init(adev);
+                       if (r) {
+                               dev_err(adev->dev, "amdgpu_atombios_init failed\n");
+                               amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
+                               return r;
+                       }
+               }
         }

         adev->cg_flags &= amdgpu_cg_mask;
--
2.20.1

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

[-- Attachment #1.2: Type: text/html, Size: 10124 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

* Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init
       [not found]             ` <BN6PR12MB1618690F5B4843CD5E0CC31085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-06-17 17:44               ` Christian König
  0 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2019-06-17 17:44 UTC (permalink / raw
  To: Russell, Kent, Deucher, Alexander, Alex Deucher,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org


[-- Attachment #1.1: Type: text/plain, Size: 6034 bytes --]

A quick guide to the different tags:

Signed-off-by: I'm somehow responsible that the code is in the mainline 
tree. E.g. either the Author of a patch or some maintainer who forwarded 
the stuff to Linus.
Tested-by: I tested the code and found it working good.
Reviewed-by: I'm familiar with both the code and the hardware and judged 
that this looks like it should work as intended.
Acked-by: It looks good to me in general, but I'm not familiar with 
either the code or the hardware to judge if that is correct or not. 
Usually used to note general agreement to a design or piece of code 
without looking to deeply into it.

NAK means a fundamental disagreement on how a piece of code implements 
something and what a reviewer things is the right thing to do. It is 
something which needs to sorted out before some code can be committed.

A NAK does NOT mean general rejection, but rather that you need to 
retreat and start discussion things on a higher level.

Christian.

Am 17.06.19 um 17:26 schrieb Russell, Kent:
>
> Thanks, I need to get familiar with all of the tags 😊
>
> Kent
>
> *From:* Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
> *Sent:* Monday, June 17, 2019 11:24 AM
> *To:* Russell, Kent <Kent.Russell-5C7GfCeVMHo@public.gmane.org>; Alex Deucher 
> <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> *Subject:* Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after 
> common init
>
> I'll make that a tested-by.  Thanks!
>
> Alex
>
> ------------------------------------------------------------------------
>
> *From:*Russell, Kent
> *Sent:* Monday, June 17, 2019 11:14 AM
> *To:* Alex Deucher; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org 
> <mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
> *Cc:* Deucher, Alexander
> *Subject:* RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after 
> common init
>
> This also worked. I don't think that I'm qualified enough to RB it, 
> but you can add my
>
> Verified-By: Kent Russell <kent.russell-5C7GfCeVMHo@public.gmane.org 
> <mailto:kent.russell-5C7GfCeVMHo@public.gmane.org>>
>
>  Kent
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org 
> <mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>> On Behalf Of Alex Deucher
> Sent: Monday, June 17, 2019 10:45 AM
> To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
> Cc: Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org 
> <mailto:Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>>
> Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after 
> common init
>
> We need the asic_funcs set for the get rom callbacks in some cases.
>
> Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org 
> <mailto:alexander.deucher-5C7GfCeVMHo@public.gmane.org>>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------
>  1 file changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4a836db1000f..e26303bc567e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct 
> amdgpu_device *adev)
>          if (amdgpu_sriov_vf(adev))
>                  adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
>
> -       /* Read BIOS */
> -       if (!amdgpu_get_bios(adev))
> -               return -EINVAL;
> -
> -       r = amdgpu_atombios_init(adev);
> -       if (r) {
> -               dev_err(adev->dev, "amdgpu_atombios_init failed\n");
> -               amdgpu_vf_error_put(adev, 
> AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
> -               return r;
> -       }
> -
>          for (i = 0; i < adev->num_ip_blocks; i++) {
>                  if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
>                          DRM_ERROR("disabled ip block: %d <%s>\n", @@ 
> -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct 
> amdgpu_device *adev)
> adev->ip_blocks[i].status.valid = true;
>                          }
>                  }
> +               /* get the vbios after the asic_funcs are set up */
> +               if (adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_COMMON) {
> +                       /* Read BIOS */
> +                       if (!amdgpu_get_bios(adev))
> +                               return -EINVAL;
> +
> +                       r = amdgpu_atombios_init(adev);
> +                       if (r) {
> +                               dev_err(adev->dev, 
> "amdgpu_atombios_init failed\n");
> +                               amdgpu_vf_error_put(adev, 
> AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
> +                               return r;
> +                       }
> +               }
>          }
>
>          adev->cg_flags &= amdgpu_cg_mask;
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[-- Attachment #1.2: Type: text/html, Size: 12537 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

end of thread, other threads:[~2019-06-17 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 14:45 [PATCH] drm/amdgpu: wait to fetch the vbios until after common init Alex Deucher
     [not found] ` <20190617144500.29491-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-06-17 14:55   ` Russell, Kent
2019-06-17 15:14   ` Russell, Kent
     [not found]     ` <BN6PR12MB161858B2EF2FDE6983B8AF8085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-17 15:23       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1809772C53A7C9BB535D0012F7EB0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-17 15:26           ` Russell, Kent
     [not found]             ` <BN6PR12MB1618690F5B4843CD5E0CC31085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-17 17:44               ` Christian König

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.