drm/amd/powerplay: Ignore smu buffer usage
Subsystems (2)
PATCH 3/6 drm/amd/powerplay: Ignore smu buffer usage
SMU buffer is used for power feature, but for virtualization, the power is controlled by hypervisor. Ignore it.
--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +12 -3
@@ -407,8 +407,14 @@ int smu7_request_smu_load_fw(struct pp_smumgr *smumgr) 0x0);if (smumgr->chip_id >CHIP_TOPAZ ) {/* add support for Topaz */ -smu7_send_msg_to_smc_with_parameter (smumgr,PPSMC_MSG_SMU_DRAM_ADDR_HI , smu_data->smu_buffer.mc_addr_high); -smu7_send_msg_to_smc_with_parameter (smumgr,PPSMC_MSG_SMU_DRAM_ADDR_LO , smu_data->smu_buffer.mc_addr_low); +if (!cgs_is_virtualization_enabled (smumgr->device)) { +smu7_send_msg_to_smc_with_parameter (smumgr, +PPSMC_MSG_SMU_DRAM_ADDR_HI , + smu_data->smu_buffer.mc_addr_high); +smu7_send_msg_to_smc_with_parameter (smumgr, +PPSMC_MSG_SMU_DRAM_ADDR_LO , + smu_data->smu_buffer.mc_addr_low); + } fw_to_load =UCODE_ID_RLC_G_MASK +UCODE_ID_SDMA0_MASK +UCODE_ID_SDMA1_MASK
@@ -543,7 +549,6 @@ int smu7_init(struct pp_smumgr *smumgr) smu_data = (struct smu7_smumgr *)(smumgr->backend); smu_data->header_buffer.data_size = ((sizeof (struct SMU_DRAMData_TOC ) /4096 ) +1 ) *4096 ; - smu_data->smu_buffer.data_size =200 *4096 ;/* Allocate FW image data structure and header buffer and * send the header buffer address to SMU */
@@ -566,6 +571,10 @@ int smu7_init(struct pp_smumgr *smumgr) (cgs_handle_t)smu_data->header_buffer.handle); return -EINVAL); +if (cgs_is_virtualization_enabled (smumgr->device)) +return 0 ; + + smu_data->smu_buffer.data_size =200 *4096 ; smu_allocate_memory(smumgr->device, smu_data->smu_buffer.data_size, CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB,
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1480489332-29092-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org
Quoted 52 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Wednesday, November 30, 2016 2:02 AM
To: [email protected]
Cc: Yu, Xiangliang; Liu, Monk
Subject: [PATCH 3/6] drm/amd/powerplay: Ignore smu buffer usageSMU buffer is used for power feature, but for virtualization, the power is controlled by hypervisor. Ignore it.
Signed-off-by Xiangliang Yu <[email protected]>Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1@@ -407,8 +407,14 @@ int smu7_request_smu_load_fw(struct pp_smumgr *smumgr) 0x0);if (smumgr->chip_id >CHIP_TOPAZ ) {/* add support for Topaz */ - smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_HI, smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1- smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_LO, smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +3
-0+if (!cgs_is_virtualization_enabled (smumgr->device)) { + smu7_send_msg_to_smc_with_parameter(smumgr, +
PPSMC_MSG_SMU_DRAM_ADDR_HI,drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +2
-0+ smu7_send_msg_to_smc_with_parameter(smumgr, +
PPSMC_MSG_SMU_DRAM_ADDR_LO,drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ } fw_to_load =UCODE_ID_RLC_G_MASK +UCODE_ID_SDMA0_MASK +UCODE_ID_SDMA1_MASK
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_init(struct pp_smumgr *smumgr) · line 547
Quoted 5 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1@@ -543,7 +549,6 @@ int smu7_init(struct pp_smumgr *smumgr) smu_data = (struct smu7_smumgr *)(smumgr->backend); smu_data->header_buffer.data_size = ((sizeof (struct SMU_DRAMData_TOC ) /4096 ) +1 ) *4096 ; - smu_data->smu_buffer.data_size =200 *4096 ;
Was this change intended? I'm assuming this is extraneous as it's set in smu7_init() as well.
Alex
Quoted 17 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-1/* Allocate FW image data structure and header buffer and * send the header buffer address to SMU */ @@ -566,6 +571,10 @@ int smu7_init(struct pp_smumgr *smumgr) (cgs_handle_t)smu_data->header_buffer.handle); return -EINVAL); +if (cgs_is_virtualization_enabled (smumgr->device)) +return 0 ; + + smu_data->smu_buffer.data_size =200 *4096 ; smu_allocate_memory(smumgr->device, smu_data->smu_buffer.data_size, CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB, --2.7.4
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
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB16940AD26D5DE55A89898018F78C0-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 56 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_request_smu_load_fw(struct
Quoted 25 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Wednesday, November 30, 2016 2:02 AM
To: [email protected]
Cc: Yu, Xiangliang; Liu, Monk
Subject: [PATCH 3/6] drm/amd/powerplay: Ignore smu buffer usageSMU buffer is used for power feature, but for virtualization, the power is controlled by hypervisor. Ignore it.
Signed-off-by Xiangliang Yu <[email protected]>Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0@@ -407,8 +407,14 @@ int smu7_request_smu_load_fw(struct
pp_smumgrQuoted 26 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1*smumgr) 0x0);if (smumgr->chip_id >CHIP_TOPAZ ) {/* add support for Topaz */ - smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_HI, smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1- smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_LO, smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +3
-0+if (!cgs_is_virtualization_enabled (smumgr->device)) { + smu7_send_msg_to_smc_with_parameter(smumgr, +
PPSMC_MSG_SMU_DRAM_ADDR_HI,drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +2
-0+ smu7_send_msg_to_smc_with_parameter(smumgr, +
PPSMC_MSG_SMU_DRAM_ADDR_LO,drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ } fw_to_load =UCODE_ID_RLC_G_MASK +UCODE_ID_SDMA0_MASK +UCODE_ID_SDMA1_MASK drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_init(struct pp_smumgr *smumgr) · line 551
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0@@ -543,7 +549,6 @@ int smu7_init(struct pp_smumgr *smumgr) smu_data = (struct smu7_smumgr *)(smumgr->backend); smu_data->header_buffer.data_size = ((sizeof(struct SMU_DRAMData_TOC) / 4096) + 1) *4096;
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_init(struct pp_smumgr *smumgr) · line 546
Quoted 1 line
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1- smu_data->smu_buffer.data_size =200 *4096 ;Was this change intended? I'm assuming this is extraneous as it's set in
smu7_init()as well.
It still in smu7_init() function, just put it together. I think it make code more clear.
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0/* Allocate FW image data structure and header buffer and * send the header buffer address to SMU */ @@ -566,6 +571,10 @@ intsmu7_init (struct pp_smumgr *smumgr)drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-1(cgs_handle_t)smu_data->header_buffer.handle); return -EINVAL); +if (cgs_is_virtualization_enabled (smumgr->device)) +return 0 ; + + smu_data->smu_buffer.data_size =200 *4096 ; smu_allocate_memory(smumgr->device, smu_data->smu_buffer.data_size, CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB, --2.7.4
Quoted 4 lines
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
A message that is not in the archive (sent off-list or not yet received): CY4PR12MB17014445B8939BF52AE0CF5AEB8F0-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Alex Deucher
Reviewed-byQuoted 56 lines · Xiangliang
Quoted 56 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_request_smu_load_fw(struct
Quoted 25 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Wednesday, November 30, 2016 2:02 AM
To: [email protected]
Cc: Yu, Xiangliang; Liu, Monk
Subject: [PATCH 3/6] drm/amd/powerplay: Ignore smu buffer usageSMU buffer is used for power feature, but for virtualization, the power is controlled by hypervisor. Ignore it.
Signed-off-by Xiangliang Yu <[email protected]>Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0@@ -407,8 +407,14 @@ int smu7_request_smu_load_fw(struct
pp_smumgrQuoted 26 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1*smumgr) 0x0);if (smumgr->chip_id >CHIP_TOPAZ ) {/* add support for Topaz */ - smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_HI, smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
- smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_LO, smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-0+if (!cgs_is_virtualization_enabled (smumgr->device)) { + smu7_send_msg_to_smc_with_parameter(smumgr, + PPSMC_MSG_SMU_DRAM_ADDR_HI, + smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +3
-0+ smu7_send_msg_to_smc_with_parameter(smumgr, + PPSMC_MSG_SMU_DRAM_ADDR_LO, + smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +1
-0+ } fw_to_load =UCODE_ID_RLC_G_MASK +UCODE_ID_SDMA0_MASK +UCODE_ID_SDMA1_MASK drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_init(struct pp_smumgr *smumgr) · line 551
Quoted 3 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0@@ -543,7 +549,6 @@ int smu7_init(struct pp_smumgr *smumgr) smu_data = (struct smu7_smumgr *)(smumgr->backend); smu_data->header_buffer.data_size = ((sizeof(struct SMU_DRAMData_TOC) / 4096) + 1) *4096;
Quoted 7 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_init(struct pp_smumgr *smumgr) · line 546
Quoted 1 line
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1- smu_data->smu_buffer.data_size =200 *4096 ;Was this change intended? I'm assuming this is extraneous as it's set in
smu7_init()as well.It still in
smu7_init()function, just put it together. I think it make code more clear.
That should probably be a separate commit since it's a different logical change. With that fixed, this patch is:
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0/* Allocate FW image data structure and header buffer and * send the header buffer address to SMU */ @@ -566,6 +571,10 @@ intsmu7_init (struct pp_smumgr *smumgr)(cgs_handle_t)smu_data->header_buffer.handle); return -EINVAL);drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-1+if (cgs_is_virtualization_enabled (smumgr->device)) +return 0 ; + + smu_data->smu_buffer.data_size =200 *4096 ; smu_allocate_memory(smumgr->device, smu_data->smu_buffer.data_size, CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB, --2.7.4
Quoted 8 lines
Quoted 4 lines
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
_______________________________________________
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): CADnq5_MFObCa6TaVx6cZ3JDojkLEoh0RO1i41fyCooSby=7y_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 65 lines
Quoted 63 lines · Xiangliang
Quoted 62 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c int smu7_request_smu_load_fw(struct
Quoted 25 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Xiangliang Yu
Sent: Wednesday, November 30, 2016 2:02 AM
To: [email protected]
Cc: Yu, Xiangliang; Liu, Monk
Subject: [PATCH 3/6] drm/amd/powerplay: Ignore smu buffer usageSMU buffer is used for power feature, but for virtualization, the power is controlled by hypervisor. Ignore it.
Signed-off-by Xiangliang Yu <[email protected]>Signed-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-0@@ -407,8 +407,14 @@ int smu7_request_smu_load_fw(struct
pp_smumgrQuoted 26 lines
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0
-1*smumgr) 0x0);if (smumgr->chip_id >CHIP_TOPAZ ) {/* add support for Topaz */ - smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_HI, smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
- smu7_send_msg_to_smc_with_parameter(smumgr,
PPSMC_MSG_SMU_DRAM_ADDR_LO, smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-0+if (!cgs_is_virtualization_enabled (smumgr->device)) { + smu7_send_msg_to_smc_with_parameter(smumgr, + PPSMC_MSG_SMU_DRAM_ADDR_HI, + smu_data-Quoted 1 line
smu_buffer.mc_addr_high);
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +3
-0+ smu7_send_msg_to_smc_with_parameter(smumgr, + PPSMC_MSG_SMU_DRAM_ADDR_LO, + smu_data-Quoted 1 line
smu_buffer.mc_addr_low);
+ }
fw_to_load=UCODE_ID_RLC_G_MASK
+UCODE_ID_SDMA0_MASK
+UCODE_ID_SDMA1_MASK@@ -543,7 +549,6 @@
intsmu7_init(struct pp_smumgr *smumgr)Quoted 4 lines
smu_data = (struct smu7_smumgr *)(smumgr->backend); smu_data->header_buffer.data_size = ((sizeof(struct SMU_DRAMData_TOC) / 4096) + 1)*
4096;
Quoted 1 line
-
smu_data->smu_buffer.data_size= 200*4096;Was this change intended? I'm assuming this is extraneous as it's set in
smu7_init()as well.
Quoted 7 lines
Quoted 1 line
It still in
smu7_init()function, just put it together. I think it make code moreclear.
Quoted 1 line
That should probably be a separate commit since it's a different logical change. With that fixed, this patch is:
Reviewed-by Alex Deucher <[email protected]>
Ok, I'll submit V2 later.
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
/* Allocate FW image data structure and header buffer and
* send the header buffer address to SMU */ @@ -566,6 +571,10 @@
intsmu7_init(struct pp_smumgr *smumgr)(cgs_handle_t)smu_data->header_buffer.handle); return -EINVAL);drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +4
-1+if (cgs_is_virtualization_enabled (smumgr->device)) +return 0 ; + + smu_data->smu_buffer.data_size =200 *4096 ; smu_allocate_memory(smumgr->device, smu_data->smu_buffer.data_size, CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB, --2.7.4
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx