drm/amdgpu: wait to fetch the vbios until after common init
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +13 -11
@@ -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;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190617144500.29491-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Thanks Alex, I am testing it out now.
Kent
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -11
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
This also worked. I don't think that I'm qualified enough to RB it, but you can add my
Kent
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -11
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB161858B2EF2FDE6983B8AF8085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
I'll make that a tested-by. Thanks!
Alex
________________________________
From: Russell, Kent
Sent: Monday, June 17, 2019 11:14 AM
To: Alex Deucher; [email protected]
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
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: [email protected]
Cc: Deucher, Alexander <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -11
@@ -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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1809772C53A7C9BB535D0012F7EB0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Thanks, I need to get familiar with all of the tags 😊
Kent
From: Deucher, Alexander <[email protected]>
Sent: Monday, June 17, 2019 11:24 AM
To: Russell, Kent <[email protected]>; Alex Deucher <[email protected]>; [email protected]
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; [email protected]<mailto:[email protected]>
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
Kent
-----Original Message-----
From: amd-gfx <[email protected]<mailto:[email protected]>> On Behalf Of Alex Deucher
Sent: Monday, June 17, 2019 10:45 AM
To: [email protected]<mailto:[email protected]>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -11
@@ -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 [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1618690F5B4843CD5E0CC31085EB0-/b2+HYfkarRqaFUXYJa4HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Christian König
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.A quick guide to the different tags:
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:
Quoted 99 lines
Thanks, I need to get familiar with all of the tags 😊
Kent
*From:* Deucher, Alexander <[email protected]>
*Sent:* Monday, June 17, 2019 11:24 AM
*To:* Russell, Kent <[email protected]>; Alex Deucher <[email protected]>; [email protected] *Subject:* Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common initI'll make that a tested-by. Thanks!
Alex
------------------------------------------------------------------------
*From:*Russell, Kent
*Sent:* Monday, June 17, 2019 11:14 AM
*To:* Alex Deucher; [email protected] <mailto:[email protected]> *Cc:* Deucher, Alexander
*Subject:* RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common initThis also worked. I don't think that I'm qualified enough to RB it, but you can add my
Verified-By Kent Russell <[email protected] <mailto:[email protected]>>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: [email protected] <mailto:[email protected]>
Cc: Deucher, Alexander <[email protected] <mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common initWe need the
asic_funcsset for the get rom callbacks in some cases.Signed-off-by Alex Deucher <[email protected] <mailto:[email protected]>>---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------1 file changed, 13 insertions(+), 11 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-11@@ -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 intamdgpu_device_ip_early_init(struct amdgpu_device *adev)
adev->ip_blocks[i].status.valid = true;
}
}
+ /* get the vbios after theasic_funcsare 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
[email protected] <mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx