[amdgpu] Is it possible to disable page tables and use the physical address directly in amdgpu

2020-11-30 Thread Smith John
Hello!
I was trying to figure out the impact of gpu page tables on applications'
performance. I noticed that there are 16 vmids supported by the hardware *Vega
10*. Is it possible to use physical address directly in some vmids, or use
physical address globally?
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/pm/smu11: Fix fan set speed bug

2020-11-30 Thread Arunpravin
Fix fan set speed calculation.

Signed-off-by: Arunpravin 
Suggested-by: Kenneth Feng 
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index 62c34a01a3e1..624065d3c079 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@ -1187,7 +1187,12 @@ int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
if (ret)
return ret;
 
-   crystal_clock_freq = amdgpu_asic_get_xclk(adev);
+   /*
+* crystal_clock_freq div by 4 is required since the fan control
+* module refers to 25MHz
+*/
+
+   crystal_clock_freq = amdgpu_asic_get_xclk(adev) / 4;
tach_period = 60 * crystal_clock_freq * 1 / (8 * speed);
WREG32_SOC15(THM, 0, mmCG_TACH_CTRL,
 REG_SET_FIELD(RREG32_SOC15(THM, 0, mmCG_TACH_CTRL),
-- 
2.17.1

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


RE: [PATCH] drm/amdgpu/swsmu/vangogh: return error if fetching metrics fails

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 6:56 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu/swsmu/vangogh: return error if fetching metrics 
fails

rather than just dropping the error.  Also fixes a set but not used variable 
warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 3d4d27a304e9..56704181c5a9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -410,6 +410,8 @@ static int vangogh_get_current_activity_percent(struct 
smu_context *smu,
 ret = vangogh_get_smu_metrics_data(smu,
   METRICS_AVERAGE_GFXACTIVITY,
   value);
+if (ret)
+return ret;
 break;
 default:
 dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n");
--
2.25.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C5733b7ad8c564980d55008d8958329c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637423737869233728%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PmSi3GKae6vnbF7giI0W9gAKZRywhQO3PcAk7Qhjll0%3D&reserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amdgpu/powerplay: return an error of copying to smc fails

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 7:08 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu/powerplay: return an error of copying to smc fails

Rather than just silently dropping it.  Also fixes a set but unused variable 
warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
index 4bfadb49521b..04b561f5d932 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
@@ -2545,7 +2545,7 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr 
*hwmgr)
 (uint32_t)sizeof(fan_table),
 SMC_RAM_END);

-return 0;
+return res;
 }


--
2.25.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7Cfad16e545f7f4a972c0408d89584d5b3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637423745042671997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=w%2F%2BbLqxPwkWsxW%2BfY12102WZzKZtKsYWFwMC3GbLDNM%3D&reserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amdgpu/powerplay/ci: return an error of copying to smc fails

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 7:13 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu/powerplay/ci: return an error of copying to smc 
fails

Rather than just silently dropping it.  Also fixes a set but unused variable 
warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
index 329bf4d44bbc..93a1c7248e26 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -2193,7 +2193,7 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr 
*hwmgr)

 res = ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t 
*)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);

-return 0;
+return res;
 }

 static int ci_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
--
2.25.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7Cdc04b379d57c4d96929b08d895858b0d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637423748100898322%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4%2FnT%2FoAlE5Yj5T2nyzQ1RgxAW21BZRbzdHnIml7gYaQ%3D&reserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amdgpu/powerplay/iceland: return an error if copying to smc fails

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 7:38 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu/powerplay/iceland: return an error if copying to 
smc fails

Rather than just silently dropping it.  Also fixes a set but
unused variable warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
index 6a0f581de999..03df35dee8ba 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
@@ -2156,7 +2156,7 @@ static int iceland_thermal_setup_fan_table(struct 
pp_hwmgr *hwmgr)

 res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t 
*)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);

-return 0;
+return res;
 }


--
2.25.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7Cb5c7fef8fc33490389a708d89588fb18%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637423762842822121%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sNFPNZLPera5DF6BUa6RZf0RsSTLlv9vaaGp9FlG7YM%3D&reserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Never mind. I just saw you fixed this in V2.

-Original Message-
From: Quan, Evan
Sent: Tuesday, December 1, 2020 9:54 AM
To: 'Alex Deucher' ; amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: RE: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x

Hi Alex,

The followings seem missing in programming 
mmMMMC_VM_SYSTEM_APERTURE_LOW/HIGH_ADDR.
min(adev->gmc.fb_start, adev->gmc.agp_start) max(adev->gmc.fb_end, 
adev->gmc.agp_end)

BR
Evan
-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Monday, November 30, 2020 11:47 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x

Just a small optimization for accessing system pages directly.
Was missed for gmc v10 since the feature landed for older gmcs while we were 
still on the emulator or gmc10 and we use the AGP aperture for zfb on the 
emulator.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 6 +++---  
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c   | 1 +
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c  | 6 +++---  
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c  | 4 ++--
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
index 456360bf58fa..51606d2c346c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
@@ -153,10 +153,10 @@ static void gfxhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;

 if (!amdgpu_sriov_vf(adev)) {
-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
index 724bb29e9bb4..95a50fadbd54 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
@@ -152,10 +152,10 @@ static void gfxhub_v2_1_init_system_aperture_regs(struct 
amdgpu_device *adev)  {
 uint64_t value;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 4f6e44e21691..518233d71e6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -738,6 +738,7 @@ static void gmc_v10_0_vram_gtt_location(struct 
amdgpu_device *adev,

 amdgpu_gmc_vram_location(adev, &adev->gmc, base);
 amdgpu_gmc_gart_location(adev, mc);
+amdgpu_gmc_agp_location(adev, mc);

 /* base offset of vram pages */
 adev->vm_manager.vram_base_offset = adev->gfxhub.funcs->get_mc_fb_offset(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
index 4ac8ac0c56c8..c539685948de 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
@@ -195,10 +195,10 @@ static void mmhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;
 uint32_t tmp;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 if (!amdgpu_sriov_vf(adev)) {
 /* Program the system aperture low logical page number. */ diff --git 
a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
index 3a248c8cd0b9..5372704889cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
@@ -152,8 +152,8 @@ static void mmhub_v2_3_init_system_aperture_regs(struct 
amdgpu_device *adev)

 /* Disable AGP. */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(MMHUB, 

RE: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x (v2)

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Reviewed-and-tested-by: Evan Quan 

-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 5:49 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x (v2)

Just a small optimization for accessing system pages directly.
Was missed for gmc v10 since the feature landed for older gmcs
while we were still on the emulator or gmc10 and we use the AGP
aperture for zfb on the emulator.

v2: fix up the system aperture as well

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 10 +-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 10 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c   |  1 +
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c  | 10 +-
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c  |  8 
 5 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
index 456360bf58fa..2aecc6a243e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
@@ -153,16 +153,16 @@ static void gfxhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;

 if (!amdgpu_sriov_vf(adev)) {
-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
- adev->gmc.vram_start >> 18);
+ min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
- adev->gmc.vram_end >> 18);
+ max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18);

 /* Set default page address. */
 value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
index 724bb29e9bb4..410fd3a1a388 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
@@ -152,16 +152,16 @@ static void gfxhub_v2_1_init_system_aperture_regs(struct 
amdgpu_device *adev)
 {
 uint64_t value;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
- adev->gmc.vram_start >> 18);
+ min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
- adev->gmc.vram_end >> 18);
+ max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18);

 /* Set default page address. */
 value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 4f6e44e21691..518233d71e6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -738,6 +738,7 @@ static void gmc_v10_0_vram_gtt_location(struct 
amdgpu_device *adev,

 amdgpu_gmc_vram_location(adev, &adev->gmc, base);
 amdgpu_gmc_gart_location(adev, mc);
+amdgpu_gmc_agp_location(adev, mc);

 /* base offset of vram pages */
 adev->vm_manager.vram_base_offset = adev->gfxhub.funcs->get_mc_fb_offset(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
index 4ac8ac0c56c8..57d5f8ffb764 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
@@ -195,17 +195,17 @@ static void mmhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;
 uint32_t tmp;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 if (!amdgpu_sriov_vf(adev)) {
 /* Program the system aperture low logical page number. */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_SYSTEM_APERTURE_LOW_ADDR,
- adev->gmc.vram_start >> 18);
+ min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
- adev->gmc.vram_end >> 18);
+ max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18);
 }

 /* Set default page address. */
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c 
b/drivers/gpu/drm/amd/a

RE: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x

2020-11-30 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only]

Hi Alex,

The followings seem missing in programming 
mmMMMC_VM_SYSTEM_APERTURE_LOW/HIGH_ADDR.
min(adev->gmc.fb_start, adev->gmc.agp_start)
max(adev->gmc.fb_end, adev->gmc.agp_end)

BR
Evan
-Original Message-
From: amd-gfx  On Behalf Of Alex Deucher
Sent: Monday, November 30, 2020 11:47 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander 
Subject: [PATCH] drm/amdgpu: enable AGP aperture on gmc10.x

Just a small optimization for accessing system pages directly.
Was missed for gmc v10 since the feature landed for older gmcs
while we were still on the emulator or gmc10 and we use the AGP
aperture for zfb on the emulator.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c   | 1 +
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c  | 6 +++---
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c  | 4 ++--
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
index 456360bf58fa..51606d2c346c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
@@ -153,10 +153,10 @@ static void gfxhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;

 if (!amdgpu_sriov_vf(adev)) {
-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
index 724bb29e9bb4..95a50fadbd54 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
@@ -152,10 +152,10 @@ static void gfxhub_v2_1_init_system_aperture_regs(struct 
amdgpu_device *adev)
 {
 uint64_t value;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 4f6e44e21691..518233d71e6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -738,6 +738,7 @@ static void gmc_v10_0_vram_gtt_location(struct 
amdgpu_device *adev,

 amdgpu_gmc_vram_location(adev, &adev->gmc, base);
 amdgpu_gmc_gart_location(adev, mc);
+amdgpu_gmc_agp_location(adev, mc);

 /* base offset of vram pages */
 adev->vm_manager.vram_base_offset = adev->gfxhub.funcs->get_mc_fb_offset(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
index 4ac8ac0c56c8..c539685948de 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
@@ -195,10 +195,10 @@ static void mmhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
 uint64_t value;
 uint32_t tmp;

-/* Disable AGP. */
+/* Program the AGP BAR */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 if (!amdgpu_sriov_vf(adev)) {
 /* Program the system aperture low logical page number. */
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
index 3a248c8cd0b9..5372704889cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c
@@ -152,8 +152,8 @@ static void mmhub_v2_3_init_system_aperture_regs(struct 
amdgpu_device *adev)

 /* Disable AGP. */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);

 /* Program the system aperture low logical page number. */
 WREG32_SOC15(MMHUB, 0, mmMMMC_VM_SYSTEM_APERTURE_LOW_ADDR,
--
2.25.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%

Re: [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/vector.c:55:6: warning: no 
> previous prototype for ‘dal_vector_presized_costruct’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/vector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/vector.c 
> b/drivers/gpu/drm/amd/display/dc/basics/vector.c
> index 8f93d25f91ee2..706c803c4d3b0 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/vector.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/vector.c
> @@ -52,7 +52,7 @@ bool dal_vector_construct(
> return true;
>  }
>
> -bool dal_vector_presized_costruct(
> +static bool dal_vector_presized_costruct(
> struct vector *vector,
> struct dc_context *ctx,
> uint32_t count,
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/fixpt31_32.c:29:32: warning: 
> ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Lee Jones 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c 
> b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> index 59f37563704ad..1726bdf89bae8 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> @@ -26,7 +26,6 @@
>  #include "dm_services.h"
>  #include "include/fixed31_32.h"
>
> -static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
>  static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
>  static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
>  static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:34:10: warning: 
> no previous prototype for ‘fixed_point_to_int_frac’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:81:6: warning: 
> no previous prototype for ‘convert_float_matrix’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/conversion.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c 
> b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> index 50b47f11875c9..24ed03d8cda74 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> @@ -24,6 +24,7 @@
>   */
>
>  #include "dm_services.h"
> +#include "conversion.h"
>
>  #define DIVIDER 1
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:664:20: 
> warning: no previous prototype for ‘pp_nv_set_pme_wa_enable’ 
> [-Wmissing-prototypes]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 
>  1 file changed, 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> index ac0a0539854ef..607ec09994456 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> @@ -661,22 +661,6 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct 
> pp_smu *pp,
> return PP_SMU_RESULT_OK;
>  }
>
> -static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
> -{
> -   const struct dc_context *ctx = pp->dm;
> -   struct amdgpu_device *adev = ctx->driver_context;
> -   struct smu_context *smu = &adev->smu;
> -
> -   if (!smu->ppt_funcs)
> -   return PP_SMU_RESULT_UNSUPPORTED;
> -
> -   /* 0: successful or smu.ppt_funcs->set_azalia_d3_pme = NULL;  1: fail 
> */
> -   if (smu_set_azalia_d3_pme(smu))
> -   return PP_SMU_RESULT_FAIL;
> -
> -   return PP_SMU_RESULT_OK;
> -}
> -
>  static enum pp_smu_status pp_nv_set_display_count(struct pp_smu *pp, int 
> count)
>  {
> const struct dc_context *ctx = pp->dm;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:538:6: 
> warning: no previous prototype for ‘pp_rv_set_wm_ranges’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:590:6: 
> warning: no previous prototype for ‘pp_rv_set_pme_wa_enable’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:601:6: 
> warning: no previous prototype for ‘pp_rv_set_active_display_count’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:614:6: 
> warning: no previous prototype for ‘pp_rv_set_min_deep_sleep_dcfclk’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:627:6: 
> warning: no previous prototype for ‘pp_rv_set_hard_min_dcefclk_by_freq’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:640:6: 
> warning: no previous prototype for ‘pp_rv_set_hard_min_fclk_by_freq’ 
> [-Wmissing-prototypes]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c   | 14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> index 84065c12d4b85..ac0a0539854ef 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> @@ -535,7 +535,7 @@ bool dm_pp_get_static_clocks(
> return true;
>  }
>
> -void pp_rv_set_wm_ranges(struct pp_smu *pp,
> +static void pp_rv_set_wm_ranges(struct pp_smu *pp,
> struct pp_smu_wm_range_sets *ranges)
>  {
> const struct dc_context *ctx = pp->dm;
> @@ -587,7 +587,7 @@ void pp_rv_set_wm_ranges(struct pp_smu *pp,
>
> &wm_with_clock_ranges);
>  }
>
> -void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
> +static void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> @@ -598,7 +598,7 @@ void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
> pp_funcs->notify_smu_enable_pwe(pp_handle);
>  }
>
> -void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
> +static void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> @@ -611,7 +611,7 @@ void pp_rv_set_active_display_count(struct pp_smu *pp, 
> int count)
> pp_funcs->set_active_display_count(pp_handle, count);
>  }
>
> -void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
> +static void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> @@ -624,7 +624,7 @@ void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, 
> int clock)
> pp_funcs->set_min_deep_sleep_dcefclk(pp_handle, clock);
>  }
>
> -void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
> +static void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> @@ -637,7 +637,7 @@ void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu 
> *pp, int clock)
> pp_funcs->set_hard_min_dcefclk_by_freq(pp_handle, clock);
>  }
>
> -void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
> +static void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> @@ -661,7 +661,7 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct 
> pp_smu *pp,
> return PP_SMU_RESULT_OK;
>  }
>
> -enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
> +static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
>  {
> const struct dc_context *ctx = pp->dm;
> struct amdgpu_device *adev = ctx->driver_context;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:44 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: 
> warning: Function parameter or member 'lut' not described in 
> '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: 
> warning: Function parameter or member 'gamma' not described in 
> '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: 
> warning: Function parameter or member 'is_legacy' not described in 
> '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:426: 
> warning: Function parameter or member 'dc_plane_state' not described in 
> 'amdgpu_dm_update_plane_color_mgmt'
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> index 5df05f0d18bc9..157fe4efbb599 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> @@ -119,7 +119,7 @@ static bool __is_lut_linear(const struct drm_color_lut 
> *lut, uint32_t size)
> return true;
>  }
>
> -/**
> +/*
>   * Convert the drm_color_lut to dc_gamma. The conversion depends on the size
>   * of the lut - whether or not it's legacy.
>   */
> @@ -413,7 +413,7 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state 
> *crtc)
>  /**
>   * amdgpu_dm_update_plane_color_mgmt: Maps DRM color management to DC plane.
>   * @crtc: amdgpu_dm crtc state
> - * @ dc_plane_state: target DC surface
> + * @dc_plane_state: target DC surface
>   *
>   * Update the underlying dc_stream_state's input transfer function (ITF) in
>   * preparation for hardware commit. The transfer function used depends on
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' as __maybe_unused

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> 'dpp_input_csc_matrix' is used by some, but not all source files which
> include dpp.h.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: 
> ‘dpp_input_csc_matrix’ defined but not used [-Wunused-const-variable=]
>
> NB: Snipped lots of these for brevity
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h 
> b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> index 6751186f6f904..ddbe4bb52724a 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> @@ -47,7 +47,7 @@ struct dpp_input_csc_matrix {
> uint16_t regval[12];
>  };
>
> -static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
> +static const struct dpp_input_csc_matrix __maybe_unused 
> dpp_input_csc_matrix[] = {
> {COLOR_SPACE_SRGB,
> {0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} },
> {COLOR_SPACE_SRGB_LIMITED,
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/display: move link_bandwidth_kbps under CONFIG_DRM_AMD_DC_DCN

2020-11-30 Thread Alex Deucher
It's only used when CONFIG_DRM_AMD_DC_DCN is set.  Fixes and set but
not used warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 08539f431586..c0e61c13b3fc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5076,9 +5076,8 @@ create_stream_for_sink(struct amdgpu_dm_connector 
*aconnector,
int preferred_refresh = 0;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
struct dsc_dec_dpcd_caps dsc_caps;
-#endif
uint32_t link_bandwidth_kbps;
-
+#endif
struct dc_sink *sink = NULL;
if (aconnector == NULL) {
DRM_ERROR("aconnector is NULL!\n");
@@ -5160,11 +5159,9 @@ create_stream_for_sink(struct amdgpu_dm_connector 
*aconnector,
  
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw,
  
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_branch_decoder_caps.raw,
  &dsc_caps);
-#endif
link_bandwidth_kbps = 
dc_link_bandwidth_kbps(aconnector->dc_link,
 
dc_link_get_link_cap(aconnector->dc_link));
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
if (aconnector->dsc_settings.dsc_force_enable != 
DSC_CLK_FORCE_DISABLE && dsc_caps.is_dsc_supported) {
/* Set DSC policy according to dsc_clock_en */
dc_dsc_policy_set_enable_dsc_when_not_needed(
-- 
2.25.4

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


Re: [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> 'link_bandwidth_kbps' is always obtained, but only used if
> CONFIG_DRM_AMD_DC_DCN is defined.

Probably better to just move this under CONFIG_DRM_AMD_DC_DCN.  I'll
send a patch.

Thanks,

Alex


>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
> ‘create_stream_for_sink’:
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5080:11: 
> warning: variable ‘link_bandwidth_kbps’ set but not used 
> [-Wunused-but-set-variable]
>
> Cc: Harry Wentland 
> Cc: Leo Li 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 08539f4315864..ac7643d73bc68 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5077,7 +5077,7 @@ create_stream_for_sink(struct amdgpu_dm_connector 
> *aconnector,
>  #if defined(CONFIG_DRM_AMD_DC_DCN)
> struct dsc_dec_dpcd_caps dsc_caps;
>  #endif
> -   uint32_t link_bandwidth_kbps;
> +   uint32_t __maybe_unused link_bandwidth_kbps;
>
> struct dc_sink *sink = NULL;
> if (aconnector == NULL) {
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: Fix some outdated function documentation

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:63: 
> warning: Cannot understand  * @fn vega12_enable_fan_control_feature
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:137: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:147: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: 
> warning: Function parameter or member 'range' not described in 
> 'vega12_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:208: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:226: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:240: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:256: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_setup_fan_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:279: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega12_thermal_start_smc_fan_control'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega12_thermal.c   | 82 ---
>  1 file changed, 36 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> index 7ace439dcde7a..0dc16f25a463b 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> @@ -60,11 +60,10 @@ int vega12_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr 
> *hwmgr, uint32_t *speed)
>  }
>
>  /**
> - * @fn vega12_enable_fan_control_feature
> - * @brief Enables the SMC Fan Control Feature.
> + * vega12_enable_fan_control_feature -Enables the SMC Fan Control Feature.
>   *
> - * @paramhwmgr - the address of the powerplay hardware manager.
> - * @return   0 on success. -1 otherwise.
> + * @hwmgr: the address of the powerplay hardware manager.
> + * Return:   0 on success. -1 otherwise.
>   */
>  static int vega12_enable_fan_control_feature(struct pp_hwmgr *hwmgr)
>  {
> @@ -129,20 +128,20 @@ int vega12_fan_ctrl_stop_smc_fan_control(struct 
> pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Reset Fan Speed to default.
> -* @paramhwmgr  the address of the powerplay hardware manager.
> -* @exception Always succeeds.
> -*/
> + * vega12_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Exception Always succeeds.
> + */
>  int vega12_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  {
> return vega12_fan_ctrl_start_smc_fan_control(hwmgr);
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @paramhwmgr The address of the hardware manager.
> -*/
> + * vega12_thermal_get_temperature - Reads the remote temperature from the 
> SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
> struct amdgpu_device *adev = hwmgr->adev;
> @@ -160,13 +159,13 @@ int vega12_thermal_get_temperature(struct pp_hwmgr 
> *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @paramhwmgr The address of the hardware manager.
> -* @paramrange Temperature range to be programmed for
> -*   high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * Set the requested temperature range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @range: Temperature range to be programmed for
> + *   high and low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
> struct PP_TemperatureRange *range)
>  {

Re: [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:217: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: 
> warning: Function parameter or member 'range' not described in 
> 'vega20_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:278: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:296: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:310: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:326: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega20_thermal_setup_fan_table'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega20_thermal.c   | 54 +--
>  1 file changed, 24 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> index 364162ddaa9c6..269dd7e95a445 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> @@ -209,10 +209,10 @@ int vega20_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr 
> *hwmgr, uint32_t speed)
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @paramhwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_get_temperature - Reads the remote temperature from the 
> SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
> struct amdgpu_device *adev = hwmgr->adev;
> @@ -230,13 +230,12 @@ int vega20_thermal_get_temperature(struct pp_hwmgr 
> *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @paramhwmgr The address of the hardware manager.
> -* @paramrange Temperature range to be programmed for
> -*   high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * vega20_thermal_set_temperature_range - Set the requested temperature 
> range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @range: Temperature range to be programmed for high and low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
> struct PP_TemperatureRange *range)
>  {
> @@ -270,10 +269,10 @@ static int vega20_thermal_set_temperature_range(struct 
> pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Enable thermal alerts on the RV770 thermal controller.
> -*
> -* @paramhwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_enable_alert - Enable thermal alerts on the RV770 thermal 
> controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  {
> struct amdgpu_device *adev = hwmgr->adev;
> @@ -289,9 +288,9 @@ static int vega20_thermal_enable_alert(struct pp_hwmgr 
> *hwmgr)
>  }
>
>  /**
> -* Disable thermal alerts on the RV770 thermal controller.
> -* @paramhwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_disable_alert - Disable thermal alerts on the RV770 
> thermal controller.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  {
> struct amdgpu_device *adev = hwmgr->adev;
> @@ -302,10 +301,10 @@ int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Uninitialize the thermal controller.
> -* Currently just disables alerts.
> -* @paramhwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_stop_thermal_controller - Uninitialize the thermal 
> controller.
> + * Currently just disables alerts.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
> int result = vega20_therma

Re: [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: 
> Function parameter or member 'hwmgr' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: 
> Function parameter or member 'index' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: 
> Function parameter or member 'value' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: 
> Function parameter or member 'mask' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: 
> Function parameter or member 'indirect_port' not described in 
> 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: 
> Function parameter or member 'index' not described in 
> 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: 
> Function parameter or member 'value' not described in 
> 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: 
> Function parameter or member 'mask' not described in 
> 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:494: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'phm_initializa_dynamic_state_adjustment_rule_settings'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> index 2a0ca5194bbe9..bfe80ac0ad8c8 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> @@ -103,7 +103,7 @@ uint32_t phm_set_field_to_u32(u32 offset, u32 
> original_data, u32 field, u32 size
> return original_data;
>  }
>
> -/**
> +/*
>   * Returns once the part of the register indicated by the mask has
>   * reached the given value.
>   */
> @@ -132,7 +132,7 @@ int phm_wait_on_register(struct pp_hwmgr *hwmgr, uint32_t 
> index,
>  }
>
>
> -/**
> +/*
>   * Returns once the part of the register indicated by the mask has
>   * reached the given value.The indirect space is described by giving
>   * the memory-mapped index of the indirect index register.
> @@ -486,9 +486,9 @@ int phm_get_sclk_for_voltage_evv(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> - * Initialize Dynamic State Adjustment Rule Settings
> + * phm_initializa_dynamic_state_adjustment_rule_settings - Initialize 
> Dynamic State Adjustment Rule Settings
>   *
> - * @paramhwmgr  the address of the powerplay hardware manager.
> + * @hwmgr:  the address of the powerplay hardware manager.
>   */
>  int phm_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr 
> *hwmgr)
>  {
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s prototype to shared header

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:4403:5: 
> warning: no previous prototype for ‘vega20_hwmgr_init’ [-Wmissing-prototypes]
>  4403 | int vega20_hwmgr_init(struct pp_hwmgr *hwmgr)
>  | ^
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h 
> b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 499f2520b1aa3..490371bd25201 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -831,5 +831,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>  int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
> +int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 49f8a331eb02e..6a7de8b898faf 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
> -extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:2862:5: 
> warning: no previous prototype for ‘vega12_hwmgr_init’ [-Wmissing-prototypes]
>  2862 | int vega12_hwmgr_init(struct pp_hwmgr *hwmgr)
>  | ^
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h 
> b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 393e4e76a8961..499f2520b1aa3 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -830,5 +830,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
> +int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 7999091cca16e..49f8a331eb02e 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
> -extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: 
> warning: Function parameter or member 'mode' not described in 
> 'vega10_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:157: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_fan_ctrl_set_default_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:176: 
> warning: Cannot understand  * @fn vega10_enable_fan_control_feature
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: 
> warning: Function parameter or member 'speed' not described in 
> 'vega10_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:290: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: 
> warning: Function parameter or member 'speed' not described in 
> 'vega10_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:339: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: 
> warning: Function parameter or member 'range' not described in 
> 'vega10_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:414: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_initialize'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:437: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:468: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:496: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:515: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_setup_fan_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:618: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'vega10_thermal_start_smc_fan_control'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega10_thermal.c   | 131 --
>  1 file changed, 61 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> index 952cd3d7240e3..9b46b27bd30c4 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> @@ -118,12 +118,12 @@ int vega10_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr 
> *hwmgr, uint32_t *speed)
>  }
>
>  /**
> -* Set Fan Speed Control to static mode,
> -* so that the user can decide what speed to use.
> -* @paramhwmgr  the address of the powerplay hardware manager.
> -*   mode the fan control mode, 0 default, 1 by percent, 5, by RPM
> -* @exception Should always succeed.
> -*/
> + * vega10_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode,
> + * so that the user can decide what speed to use.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @mode: the fan control mode, 0 default, 1 by percent, 5, by RPM
> + * Exception: Should always succeed.
> + */
>  int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>  {
> struct amdgpu_device *adev = hwmgr->adev;
> @@ -149,10 +149,10 @@ int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr 
> *hwmgr, uint32_t mode)
>  }
>
>  /**
> -* Reset Fan Speed Control to default mode.
> -* @paramhwmgr 

Re: [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: 
> warning: Function parameter or member 'mode' not described in 
> 'smu7_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:137: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_fan_ctrl_set_default_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: 
> warning: Function parameter or member 'speed' not described in 
> 'smu7_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:245: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: 
> warning: Function parameter or member 'speed' not described in 
> 'smu7_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:299: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: 
> warning: Function parameter or member 'low_temp' not described in 
> 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: 
> warning: Function parameter or member 'high_temp' not described in 
> 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:358: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_initialize'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:377: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:395: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:414: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:433: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'smu7_thermal_start_smc_fan_control'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/smu7_thermal.c | 103 +-
>  1 file changed, 50 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> index e3d9d969d86ac..0d38d4206848a 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> @@ -103,11 +103,11 @@ int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr 
> *hwmgr, uint32_t *speed)
>  }
>
>  /**
> -* Set Fan Speed Control to static mode, so that the user can decide what 
> speed to use.
> -* @paramhwmgr  the address of the powerplay hardware manager.
> -*   modethe fan control mode, 0 default, 1 by percent, 5, by RPM
> -* @exception Should always succeed.
> -*/
> + * smu7_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode, so 
> that the user can decide what speed to use.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @mode:   the fan control mode, 0 default, 1 by percent, 5, by RPM
> + * Exception: Should always succeed.
> + */
>  int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>  {
> if (hwmgr->fan_ctrl_is_in_default_mode) {
> @@ -130,8 +130,8 @@ int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, 
> uint32_t mode)
>
>  /**
>  * Reset Fan Speed Control to default mode.
> -* @paramhwmgr  the address of the powerplay hardware manager.
> -* @exception Should always succeed.
> +* @hwmgr:  the address of the powerplay hardware manager.
> +* Exception: Should always succeed.
>  */
>  int smu7_fan_ctrl_set_defau

Re: [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:202: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_get_mc_microcode_version'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_enable_smc_voltage_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:263: warning: 
> Function parameter or member 'hwmgr' not described in 'smu7_voltage_control'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:277: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_enable_voltage_control'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:315: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_construct_voltage_tables'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:428: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_program_static_screen_threshold_parameters'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:450: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_enable_display_gap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:474: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_program_voting_clients'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:570: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_initial_switch_from_arbf0_to_f1'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1926: warning: 
> Function parameter or member 'hwmgr' not described in 'smu7_get_evv_voltages'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: 
> Function parameter or member 'voltage' not described in 
> 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: 
> Function parameter or member 'leakage_table' not described in 
> 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: 
> Function parameter or member 'lookup_table' not described in 
> 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: 
> Function parameter or member 'leakage_table' not described in 
> 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: 
> Function parameter or member 'voltage' not described in 
> 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: 
> Function parameter or member 'leakage_table' not described in 
> 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4449: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_program_display_gap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_set_max_fan_rpm_output'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: 
> Function parameter or member 'us_max_fan_rpm' not described in 
> 'smu7_set_max_fan_rpm_output'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4707: warning: 
> Function parameter or member 'hwmgr' not described in 'smu7_get_memory_type'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4723: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_enable_acpi_power_management'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4737: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'smu7_init_power_gate_state'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c   | 166 +-
>  1 file changed, 83 insertions(+), 83 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> index 53111c6bbcc91..82676c086ce46 10

Re: [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1148:5:
>  warning: no previous prototype for ‘vega10_pp_tables_initialize’ 
> [-Wmissing-prototypes]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: "Gustavo A. R. Silva" 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> index 535404de78a20..95b988823f50f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> @@ -1145,7 +1145,7 @@ static int init_dpm_2_parameters(
> return result;
>  }
>
> -int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
> +static int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
>  {
> int result = 0;
> const ATOM_Vega10_POWERPLAYTABLE *powerplay_table;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: 
> Function parameter or member 'reg_block' not described in 
> 'atomctrl_set_mc_reg_address_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: 
> Function parameter or member 'table' not described in 
> 'atomctrl_set_mc_reg_address_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: 
> Function parameter or member 'engine_clock' not described in 
> 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: 
> Function parameter or member 'memory_clock' not described in 
> 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:239: warning: 
> Function parameter or member 'device' not described in 
> 'get_voltage_info_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:519: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_reference_clock'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: 
> Function parameter or member 'voltage_type' not described in 
> 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: 
> Function parameter or member 'voltage_mode' not described in 
> 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:640: warning: 
> Function parameter or member 'device' not described in 'get_gpio_lookup_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: 
> Function parameter or member 'pinId' not described in 
> 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: 
> Function parameter or member 'gpio_pin_assignment' not described in 
> 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: 
> Function parameter or member 'virtual_voltage_id' not described in 
> 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: 
> Function parameter or member 'voltage' not described in 
> 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1194: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_mpll_reference_clock'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1227: warning: 
> Function parameter or member 'device' not described in 
> 'asic_internal_ss_get_ss_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: 
> Function parameter or member 'clockSource' not described in 
> 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: 
> Function parameter or member 'clockSpeed' not described in 
> 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: 
> Function parameter or member 'ssEntry' not described in 
> 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: 
> Function parameter or member 'memory_clock' not described in 
> 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: 
> Function parameter or member 'ssInfo' not described in 
> 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'atomctrl_get_engine_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: 
> 

Re: [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: 
> warning: Function parameter or member 'hwmgr' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: 
> warning: Function parameter or member 'setIt' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: 
> warning: Function parameter or member 'cap' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'set_platform_caps'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: 
> warning: Function parameter or member 'powerplay_caps' not described in 
> 'set_platform_caps'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:135: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'get_powerplay_table'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'get_platform_power_management_table'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: 
> warning: Function parameter or member 'atom_ppm_table' not described in 
> 'get_platform_power_management_table'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'init_dpm_2_parameters'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: 
> warning: Function parameter or member 'powerplay_table' not described in 
> 'init_dpm_2_parameters'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'init_clock_voltage_dependency'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: 
> warning: Function parameter or member 'powerplay_table' not described in 
> 'init_clock_voltage_dependency'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'init_thermal_controller'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: 
> warning: Function parameter or member 'powerplay_table' not described in 
> 'init_thermal_controller'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121:
>  warning: Function parameter or member 'hwmgr' not described in 
> 'check_powerplay_tables'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121:
>  warning: Function parameter or member 'powerplay_table' not described in 
> 'check_powerplay_tables'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263:
>  warning: Function parameter or member 'hwmgr' not described in 
> 'make_classification_flags'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263:
>  warning: Function parameter or member 'classification' not described in 
> 'make_classification_flags'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263:
>  warning: Function parameter or member 'classification2' not described in 
> 'make_classification_flags'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370:
>  warning: Function parameter or member 'hwmgr' not described in 
> 'get_powerplay_table_entry_v1_0'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370:
>  warning: Function parameter or member 'entry_index' not described in 
> 'get_powerplay_table_entry_v1_0'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370:
>  warning: Function parameter or member 'power_state' not described in 
> 'get_powerplay_table_entry_v1_0'
>  
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370:
>  warning: Function parameter or member 'call_back_func' not described in 
> 'get_powerplay_table_entry_v1_0'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../powerplay/hwmgr/process_pptables_v1_0.c   | 81 ++-
>  1 file changed, 41 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
> index 801a565026703..741e03ad5311f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables

Re: [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:232: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'phm_start_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: 
> warning: Function parameter or member 'state' not described in 
> 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: 
> warning: Function parameter or member 'pclock_info' not described in 
> 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: 
> warning: Function parameter or member 'designation' not described in 
> 'phm_get_clock_info'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 25 ++-
>  1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> index 45dde3e74b578..25b5831a15cd2 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> @@ -223,11 +223,11 @@ int phm_register_irq_handlers(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Initializes the thermal controller subsystem.
> -*
> -* @parampHwMgr  the address of the powerplay hardware manager.
> -* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the 
> return value from the dispatcher.
> -*/
> + * phm_start_thermal_controller - Initializes the thermal controller 
> subsystem.
> + *
> + * @hwmgr:   the address of the powerplay hardware manager.
> + * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the 
> return value from the dispatcher.
> + */
>  int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
> int ret = 0;
> @@ -371,13 +371,14 @@ int phm_get_performance_level(struct pp_hwmgr *hwmgr, 
> const struct pp_hw_power_s
>
>
>  /**
> -* Gets Clock Info.
> -*
> -* @parampHwMgr  the address of the powerplay hardware manager.
> -* @parampPowerState the address of the Power State structure.
> -* @parampClockInfo the address of PP_ClockInfo structure where the 
> result will be returned.
> -* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the 
> return value from the back-end.
> -*/
> + * phm_get_clock_info
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @state: the address of the Power State structure.
> + * @pclock_info: the address of PP_ClockInfo structure where the result will 
> be returned.
> + * @designation: PHM performance level designation
> + * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the 
> return value from the back-end.
> + */
>  int phm_get_clock_info(struct pp_hwmgr *hwmgr, const struct 
> pp_hw_power_state *state, struct pp_clock_info *pclock_info,
> PHM_PerformanceLevelDesignation designation)
>  {
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In 
> function ‘iceland_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: 
> warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Huang Rui 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> index 6a0f581de999b..2da5225eafbb8 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> @@ -2090,7 +2090,6 @@ static int iceland_thermal_setup_fan_table(struct 
> pp_hwmgr *hwmgr)
> uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
> uint16_t fdo_min, slope1, slope2;
> uint32_t reference_clock;
> -   int res;
> uint64_t tmp64;
>
> if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
> PHM_PlatformCaps_MicrocodeFanControl))
> @@ -2154,7 +2153,7 @@ static int iceland_thermal_setup_fan_table(struct 
> pp_hwmgr *hwmgr)
>
> /* fan_table.FanControl_GL_Flag = 1; */
>
> -   res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, 
> (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
> +   smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t 
> *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

Should probably just return the error.  I'll fix it up.  Thanks!

Alex

> return 0;
>  }
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/powerplay/iceland: return an error if copying to smc fails

2020-11-30 Thread Alex Deucher
Rather than just silently dropping it.  Also fixes a set but
unused variable warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
index 6a0f581de999..03df35dee8ba 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
@@ -2156,7 +2156,7 @@ static int iceland_thermal_setup_fan_table(struct 
pp_hwmgr *hwmgr)
 
res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, 
(uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
-   return 0;
+   return res;
 }
 
 
-- 
2.25.4

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


Re: [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: 
> Function parameter or member 'hwmgr' not described in 
> 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: 
> Function parameter or member 'voltage_type' not described in 
> 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: 
> Function parameter or member 'voltage_mode' not described in 
> 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: 
> warning: Function parameter or member 'pin_id' not described in 
> 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: 
> warning: Function parameter or member 'gpio_pin_assignment' not described in 
> 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:232: 
> warning: Function parameter or member 'hwmgr' not described in 
> 'pp_atomfwctrl_enter_self_refresh'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c | 24 +--
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> index 615cf2c09e54e..a47a47238e2b9 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> @@ -68,11 +68,11 @@ static struct atom_voltage_objects_info_v4_1 
> *pp_atomfwctrl_get_voltage_info_tab
> return (struct atom_voltage_objects_info_v4_1 *)table_address;
>  }
>
> -/**
> -* Returns TRUE if the given voltage type is controlled by GPIO pins.
> -* voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, 
> SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
> -* voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
> -*/
> +/*
> + * Returns TRUE if the given voltage type is controlled by GPIO pins.
> + * voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, 
> SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
> + * voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
> + */
>  bool pp_atomfwctrl_is_voltage_controlled_by_gpio_v4(struct pp_hwmgr *hwmgr,
> uint8_t voltage_type, uint8_t voltage_mode)
>  {
> @@ -202,9 +202,9 @@ static bool pp_atomfwctrl_lookup_gpio_pin(
> return false;
>  }
>
> -/**
> -* Returns TRUE if the given pin id find in lookup table.
> -*/
> +/*
> + * Returns TRUE if the given pin id find in lookup table.
> + */
>  bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr,
> const uint32_t pin_id,
> struct pp_atomfwctrl_gpio_pin_assignment *gpio_pin_assignment)
> @@ -224,10 +224,10 @@ bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr 
> *hwmgr,
> return ret;
>  }
>
> -/**
> -* Enter to SelfRefresh mode.
> -* @param hwmgr
> -*/
> +/*
> + * Enter to SelfRefresh mode.
> + * @param hwmgr
> + */
>  int pp_atomfwctrl_enter_self_refresh(struct pp_hwmgr *hwmgr)
>  {
> /* 0 - no action
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5696:5: 
> warning: no previous prototype for ‘smu7_init_function_pointers’ 
> [-Wmissing-prototypes]
>  5696 | int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
>  | ^~~
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h 
> b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 0e22cba3ce3a6..393e4e76a8961 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -828,6 +828,7 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  #define PHM_ENTIRE_REGISTER_MASK 0xU
>
> +int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index ec17a3e63ea02..7999091cca16e 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -46,7 +46,6 @@ extern const struct pp_smumgr_func vega12_smu_funcs;
>  extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
> -extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  In file included from 
> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:31:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c: In function 
> ‘atomctrl_calculate_voltage_evv_on_sclk’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:702:22: 
> warning: variable ‘fPowerDPMx’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 10 +-
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> index c2fee6796bd93..2cb913ab77f26 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> @@ -699,7 +699,7 @@ int atomctrl_calculate_voltage_evv_on_sclk(
> fInt fMargin_RO_a, fMargin_RO_b, fMargin_RO_c, fMargin_fixed, 
> fMargin_FMAX_mean, fMargin_Plat_mean, fMargin_FMAX_sigma, fMargin_Plat_sigma, 
> fMargin_DC_sigma;
> fInt fLkg_FT, repeat;
> fInt fMicro_FMAX, fMicro_CR, fSigma_FMAX, fSigma_CR, fSigma_DC, 
> fDC_SCLK, fSquared_Sigma_DC, fSquared_Sigma_CR, fSquared_Sigma_FMAX;
> -   fInt fRLL_LoadLine, fPowerDPMx, fDerateTDP, fVDDC_base, fA_Term, 
> fC_Term, fB_Term, fRO_DC_margin;
> +   fInt fRLL_LoadLine, fDerateTDP, fVDDC_base, fA_Term, fC_Term, 
> fB_Term, fRO_DC_margin;
> fInt fRO_fused, fCACm_fused, fCACb_fused, fKv_m_fused, fKv_b_fused, 
> fKt_Beta_fused, fFT_Lkg_V0NORM;
> fInt fSclk_margin, fSclk, fEVV_V;
> fInt fV_min, fV_max, fT_prod, fLKG_Factor, fT_FT, fV_FT, fV_x, 
> fTDP_Power, fTDP_Power_right, fTDP_Power_left, fTDP_Current, fV_NL;
> @@ -731,36 +731,28 @@ int atomctrl_calculate_voltage_evv_on_sclk(
>
> switch (dpm_level) {
> case 1:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm1));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM1), 1000);
> break;
> case 2:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm2));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM2), 1000);
> break;
> case 3:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm3));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM3), 1000);
> break;
> case 4:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm4));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM4), 1000);
> break;
> case 5:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm5));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM5), 1000);
> break;
> case 6:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm6));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM6), 1000);
> break;
> case 7:
> -   fPowerDPMx = 
> Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm7));
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM7), 1000);
> break;
> default:
> pr_err("DPM Level not supported\n");
> -   fPowerDPMx = Convert_ULONG_ToFraction(1);
> fDerateTDP = 
> GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM0), 1000);
> }
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h: In function 
> ‘fMultiply’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: 
> warning: variable ‘Y_LessThanOne’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: 
> variable ‘X_LessThanOne’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> index 8f50a038396ce..dac29fe6cfc6f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> @@ -333,14 +333,14 @@ static fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit 
> integers (int64_t) */
>  {
> fInt Product;
> int64_t tempProduct;
> +
> +   /*The following is for a very specific common case: Non-zero number 
> with ONLY fractional portion*/
> +   /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
> bool X_LessThanOne, Y_LessThanOne;
>
> X_LessThanOne = (X.partial.real == 0 && X.partial.decimal != 0 && 
> X.full >= 0);
> Y_LessThanOne = (Y.partial.real == 0 && Y.partial.decimal != 0 && 
> Y.full >= 0);
>
> -   /*The following is for a very specific common case: Non-zero number 
> with ONLY fractional portion*/
> -   /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
> -
> if (X_LessThanOne && Y_LessThanOne) {
> Product.full = X.full * Y.full;
> return Product
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> They are used by some source files which include pp_thermal.h, but not all.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: 
> ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: 
> ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: 
> ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: 
> ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: 
> ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Evan Quan 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/inc/pp_thermal.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h 
> b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> index 3e30768f9e1cc..f7c41185097e4 100644
> --- a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> +++ b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> @@ -25,13 +25,13 @@
>
>  #include "power_state.h"
>
> -static const struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] =
> +static const struct PP_TemperatureRange __maybe_unused 
> SMU7ThermalWithDelayPolicy[] =
>  {
> {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 
> 99000},
> { 12, 12, 12, 12, 12, 12, 12, 12, 
> 12},
>  };
>
> -static const struct PP_TemperatureRange SMU7ThermalPolicy[] =
> +static const struct PP_TemperatureRange __maybe_unused SMU7ThermalPolicy[] =
>  {
> {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 
> 99000},
> { 12, 12, 12, 12, 12, 12, 12, 12, 
> 12},
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h 
> b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 1bb379498a121..0e22cba3ce3a6 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -828,5 +828,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  #define PHM_ENTIRE_REGISTER_MASK 0xU
>
> +int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 739e215ec8b7f..ec17a3e63ea02 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
> -extern int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:518:5: 
> warning: no previous prototype for ‘phm_set_min_deep_sleep_dcefclk’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:528:5: 
> warning: no previous prototype for ‘phm_set_hard_min_dcefclk_by_freq’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:538:5: 
> warning: no previous prototype for ‘phm_set_hard_min_fclk_by_freq’ 
> [-Wmissing-prototypes]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 31 ---
>  1 file changed, 31 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c 
> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> index 1f9b9facdf1f4..45dde3e74b578 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> @@ -514,34 +514,3 @@ int phm_set_active_display_count(struct pp_hwmgr *hwmgr, 
> uint32_t count)
>
> return hwmgr->hwmgr_func->set_active_display_count(hwmgr, count);
>  }
> -
> -int phm_set_min_deep_sleep_dcefclk(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -   PHM_FUNC_CHECK(hwmgr);
> -
> -   if (!hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk)
> -   return -EINVAL;
> -
> -   return hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk(hwmgr, clock);
> -}
> -
> -int phm_set_hard_min_dcefclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -   PHM_FUNC_CHECK(hwmgr);
> -
> -   if (!hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq)
> -   return -EINVAL;
> -
> -   return hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq(hwmgr, clock);
> -}
> -
> -int phm_set_hard_min_fclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -   PHM_FUNC_CHECK(hwmgr);
> -
> -   if (!hwmgr->hwmgr_func->set_hard_min_fclk_by_freq)
> -   return -EINVAL;
> -
> -   return hwmgr->hwmgr_func->set_hard_min_fclk_by_freq(hwmgr, clock);
> -}
> -
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1107: 
> warning: Function parameter or member 'mem_clock' not described in 
> 'fiji_get_mclk_frequency_ratio'
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> index fea008cc1f254..02c094a06605d 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> @@ -1090,7 +1090,7 @@ static int fiji_populate_all_graphic_levels(struct 
> pp_hwmgr *hwmgr)
>  }
>
>
> -/**
> +/*
>   * MCLK Frequency Ratio
>   * SEQ_CG_RESP  Bit[31:24] - 0x0
>   * Bit[27:24] \96 DDR3 Frequency ratio
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:38:6: 
> warning: no previous prototype for ‘smu9_is_smc_ram_running’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:112:5: 
> warning: no previous prototype for ‘smu9_send_msg_to_smc’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:140:5: 
> warning: no previous prototype for ‘smu9_send_msg_to_smc_with_parameter’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:165:10: 
> warning: no previous prototype for ‘smu9_get_argument’ [-Wmissing-prototypes]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> index 8a9aee85043ec..23e5de3c4ec16 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> @@ -22,6 +22,7 @@
>   */
>
>  #include "smumgr.h"
> +#include "smu9_smumgr.h"
>  #include "vega10_inc.h"
>  #include "soc15_common.h"
>  #include "pp_debug.h"
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: Make function called by reference static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/vegam_smumgr.c:2249:5: 
> warning: no previous prototype for ‘vegam_thermal_avfs_enable’ 
> [-Wmissing-prototypes]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> index 38a5cdcf58967..7d024d3facef0 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> @@ -2246,7 +2246,7 @@ static int vegam_update_sclk_threshold(struct pp_hwmgr 
> *hwmgr)
> return result;
>  }
>
> -int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
> +static int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
>  {
> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> int ret;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:43 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2085:5: 
> warning: no previous prototype for ‘iceland_thermal_setup_fan_table’ 
> [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In 
> function ‘iceland_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: 
> warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Huang Rui 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> index 431ad2fd38df1..6a0f581de999b 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> @@ -2082,7 +2082,7 @@ static int iceland_init_smc_table(struct pp_hwmgr 
> *hwmgr)
> return 0;
>  }
>
> -int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
> +static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  {
> struct smu7_smumgr *smu7_data = (struct smu7_smumgr 
> *)(hwmgr->smu_backend);
> SMU71_Discrete_FanTable fan_table = { FDO_MODE_HARDWARE };
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:42 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c: In function 
> ‘ci_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c:2132:6: 
> warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> index 329bf4d44bbce..c1d869b4c7a42 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> @@ -2129,7 +2129,6 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr 
> *hwmgr)
> uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
> uint16_t fdo_min, slope1, slope2;
> uint32_t reference_clock;
> -   int res;
> uint64_t tmp64;
>
> if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
> PHM_PlatformCaps_MicrocodeFanControl))
> @@ -2191,7 +2190,7 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr 
> *hwmgr)
>
> fan_table.TempSrc = 
> (uint8_t)PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, 
> CG_MULT_THERMAL_CTRL, TEMP_SEL);
>
> -   res = ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t 
> *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
> +   ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t 
> *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

Should probably just return the error here.  I'll fix it up.  Thanks!

Alex

> return 0;
>  }
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/powerplay/ci: return an error of copying to smc fails

2020-11-30 Thread Alex Deucher
Rather than just silently dropping it.  Also fixes a set but
unused variable warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
index 329bf4d44bbc..93a1c7248e26 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -2193,7 +2193,7 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr 
*hwmgr)
 
res = ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t 
*)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
-   return 0;
+   return res;
 }
 
 static int ci_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
-- 
2.25.4

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


Re: [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:42 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2145:5: 
> warning: no previous prototype for ‘polaris10_thermal_avfs_enable’ 
> [-Wmissing-prototypes]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> index 052bc88cf33c9..45214a364baa9 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> @@ -2142,7 +2142,7 @@ static int 
> polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
> return 0;
>  }
>
> -int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
> +static int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
>  {
> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res'

2020-11-30 Thread Alex Deucher
On Thu, Nov 26, 2020 at 8:42 AM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c: In 
> function ‘tonga_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2469:6: 
> warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c | 9 +++--
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> index 4bfadb49521bc..c28f3e1299701 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> @@ -2466,7 +2466,6 @@ static int tonga_thermal_setup_fan_table(struct 
> pp_hwmgr *hwmgr)
> uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
> uint16_t fdo_min, slope1, slope2;
> uint32_t reference_clock;
> -   int res;
> uint64_t tmp64;
>
> if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
> @@ -2539,11 +2538,9 @@ static int tonga_thermal_setup_fan_table(struct 
> pp_hwmgr *hwmgr)
>
> fan_table.FanControl_GL_Flag = 1;
>
> -   res = smu7_copy_bytes_to_smc(hwmgr,
> -   smu_data->smu7_data.fan_table_start,
> -   (uint8_t *)&fan_table,
> -   (uint32_t)sizeof(fan_table),
> -   SMC_RAM_END);
> +   smu7_copy_bytes_to_smc(hwmgr, smu_data->smu7_data.fan_table_start,
> +  (uint8_t *)&fan_table,
> +  (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

We should probably return the error here rather than dropping it.
I'll send out a patch.

Thanks,

Alex


> return 0;
>  }
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/powerplay: return an error of copying to smc fails

2020-11-30 Thread Alex Deucher
Rather than just silently dropping it.  Also fixes a set but
unused variable warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c 
b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
index 4bfadb49521b..04b561f5d932 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
@@ -2545,7 +2545,7 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr 
*hwmgr)
(uint32_t)sizeof(fan_table),
SMC_RAM_END);
 
-   return 0;
+   return res;
 }
 
 
-- 
2.25.4

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


Re: [PATCH 40/40] drm/amd/amdgpu/amdgpu_uvd: Add description for amdgpu_uvd_cs_msg_decode()'s 'buf_sizes' param

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:555: warning: Function parameter or 
> member 'buf_sizes' not described in 'amdgpu_uvd_cs_msg_decode'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index f8f0384a8d9ad..7c5b60e534822 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -547,6 +547,7 @@ static int amdgpu_uvd_cs_pass1(struct amdgpu_uvd_cs_ctx 
> *ctx)
>   *
>   * @adev: amdgpu_device pointer
>   * @msg: pointer to message structure
> + * @buf_sizes: placeholder to put the different buffer lengths
>   *
>   * Peek into the decode message and calculate the necessary buffer sizes.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 39/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Remove unused variable 'result'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c: In function 
> ‘fiji_populate_smc_boot_level’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1603:6: 
> warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c   | 13 ++---
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c 
> b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> index fef9d3906fccd..fea008cc1f254 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> @@ -1600,20 +1600,19 @@ static int fiji_populate_smc_uvd_level(struct 
> pp_hwmgr *hwmgr,
>  static int fiji_populate_smc_boot_level(struct pp_hwmgr *hwmgr,
> struct SMU73_Discrete_DpmTable *table)
>  {
> -   int result = 0;
> struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
>
> table->GraphicsBootLevel = 0;
> table->MemoryBootLevel = 0;
>
> /* find boot level from dpm table */
> -   result = phm_find_boot_level(&(data->dpm_table.sclk_table),
> -   data->vbios_boot_state.sclk_bootup_value,
> -   (uint32_t *)&(table->GraphicsBootLevel));
> +   phm_find_boot_level(&(data->dpm_table.sclk_table),
> +   data->vbios_boot_state.sclk_bootup_value,
> +   (uint32_t *)&(table->GraphicsBootLevel));
>
> -   result = phm_find_boot_level(&(data->dpm_table.mclk_table),
> -   data->vbios_boot_state.mclk_bootup_value,
> -   (uint32_t *)&(table->MemoryBootLevel));
> +   phm_find_boot_level(&(data->dpm_table.mclk_table),
> +   data->vbios_boot_state.mclk_bootup_value,
> +   (uint32_t *)&(table->MemoryBootLevel));
>
> table->BootVddc  = data->vbios_boot_state.vddc_bootup_value *
> VOLTAGE_SCALE;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 38/40] drm/amd/pm/swsmu/smu11/navi10_ppt: Remove unused 'struct i2c_algorithm navi10_i2c_algo'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Evan Quan 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c   | 204 --
>  1 file changed, 204 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c 
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
> index ef1a62e86a0ee..59bd7cd3ca8df 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
> @@ -2325,210 +2325,6 @@ static int navi10_run_umc_cdr_workaround(struct 
> smu_context *smu)
> return 0;
>  }
>
> -static void navi10_fill_i2c_req(SwI2cRequest_t  *req, bool write,
> - uint8_t address, uint32_t numbytes,
> - uint8_t *data)
> -{
> -   int i;
> -
> -   req->I2CcontrollerPort = 0;
> -   req->I2CSpeed = 2;
> -   req->SlaveAddress = address;
> -   req->NumCmds = numbytes;
> -
> -   for (i = 0; i < numbytes; i++) {
> -   SwI2cCmd_t *cmd =  &req->SwI2cCmds[i];
> -
> -   /* First 2 bytes are always write for lower 2b EEPROM address 
> */
> -   if (i < 2)
> -   cmd->Cmd = 1;
> -   else
> -   cmd->Cmd = write;
> -
> -
> -   /* Add RESTART for read  after address filled */
> -   cmd->CmdConfig |= (i == 2 && !write) ? CMDCONFIG_RESTART_MASK 
> : 0;
> -
> -   /* Add STOP in the end */
> -   cmd->CmdConfig |= (i == (numbytes - 1)) ? CMDCONFIG_STOP_MASK 
> : 0;
> -
> -   /* Fill with data regardless if read or write to simplify 
> code */
> -   cmd->RegisterAddr = data[i];
> -   }
> -}
> -
> -static int navi10_i2c_read_data(struct i2c_adapter *control,
> -  uint8_t address,
> -  uint8_t *data,
> -  uint32_t numbytes)
> -{
> -   uint32_t  i, ret = 0;
> -   SwI2cRequest_t req;
> -   struct amdgpu_device *adev = to_amdgpu_device(control);
> -   struct smu_table_context *smu_table = &adev->smu.smu_table;
> -   struct smu_table *table = &smu_table->driver_table;
> -
> -   if (numbytes > MAX_SW_I2C_COMMANDS) {
> -   dev_err(adev->dev, "numbytes requested %d is over max allowed 
> %d\n",
> -   numbytes, MAX_SW_I2C_COMMANDS);
> -   return -EINVAL;
> -   }
> -
> -   memset(&req, 0, sizeof(req));
> -   navi10_fill_i2c_req(&req, false, address, numbytes, data);
> -
> -   mutex_lock(&adev->smu.mutex);
> -   /* Now read data starting with that address */
> -   ret = smu_cmn_update_table(&adev->smu, SMU_TABLE_I2C_COMMANDS, 0, 
> &req,
> -  true);
> -   mutex_unlock(&adev->smu.mutex);
> -
> -   if (!ret) {
> -   SwI2cRequest_t *res = (SwI2cRequest_t *)table->cpu_addr;
> -
> -   /* Assume SMU  fills res.SwI2cCmds[i].Data with read bytes */
> -   for (i = 0; i < numbytes; i++)
> -   data[i] = res->SwI2cCmds[i].Data;
> -
> -   dev_dbg(adev->dev, "navi10_i2c_read_data, address = %x, bytes 
> = %d, data :",
> - (uint16_t)address, numbytes);
> -
> -   print_hex_dump(KERN_DEBUG, "data: ", DUMP_PREFIX_NONE,
> -  8, 1, data, numbytes, false);
> -   } else
> -   dev_err(adev->dev, "navi10_i2c_read_data - error occurred 
> :%x", ret);
> -
> -   return ret;
> -}
> -
> -static int navi10_i2c_write_data(struct i2c_adapter *control,
> -   uint8_t address,
> -   uint8_t *data,
> -   uint32_t numbytes)
> -{
> -   uint32_t ret;
> -   SwI2cRequest_t req;
> -   struct amdgpu_device *adev = to_amdgpu_device(control);
> -
> -   if (numbytes > MAX_SW_I2C_COMMANDS) {
> -   dev_err(adev->dev, "numbytes requested %d is over max allowed 
> %d\n",
> -   numbytes, MAX_SW_I2C_COMMANDS);
> -   return -EINVAL;
> -   }
> -
> -   memset(&req, 0, sizeof(req));
> -   navi10_fill_i2c_req(&req, true, address, numbytes, data);
> -
> -   mutex_lock(&adev->smu.mutex);
> -   ret = smu_cmn_update_table(&adev->smu, SMU_TABLE_I2C_COMMANDS, 0, 
> &req, true);
> -   mutex_unlock(&adev->smu.mutex);
> -
> -   if (!ret) {
> -   dev_dbg(adev->dev, "navi10_i2c_write(), address = %x, bytes = 
> %d , data: ",
> -(uint16_

Re: [PATCH 37/40] drm/amd/pm/swsmu/smu12/renoir_ppt: Demote kernel-doc formatting abuse

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c 
> b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> index 46c44f0abdfb8..d3641a8ed99c0 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
> @@ -170,7 +170,7 @@ static int renoir_init_smc_tables(struct smu_context *smu)
> return -ENOMEM;
>  }
>
> -/**
> +/*
>   * This interface just for getting uclk ultimate freq and should't introduce
>   * other likewise function result in overmuch callback.
>   */
> @@ -656,7 +656,7 @@ static int renoir_get_power(struct smu_context *smu, 
> uint32_t *value)
> return 0;
>  }
>
> -/**
> +/*
>   * This interface get dpm clock table for dc
>   */
>  static int renoir_get_dpm_clock_table(struct smu_context *smu, struct 
> dpm_clocks *clock_table)
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 36/40] drm/amd/pm/inc/smu_v11_0: Mark 'smu11_thermal_policy' as __maybe_unused

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> It's used in some, but not all source files which include 'smu_v11_0.h'.
>
> Fixes the following W=1 kernel build warning(s):
>
>  In file included from 
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c:36:
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v11_0.h:61:43: warning: 
> ‘smu11_thermal_policy’ defined but not used [-Wunused-const-variable=]
>  61 | static const struct smu_temperature_range smu11_thermal_policy[] =
>  | ^~~~
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h 
> b/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
> index eff396c7a281f..9742a02e7b16b 100644
> --- a/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
> +++ b/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
> @@ -58,7 +58,8 @@
>  #define CTF_OFFSET_HOTSPOT 5
>  #define CTF_OFFSET_MEM 5
>
> -static const struct smu_temperature_range smu11_thermal_policy[] =
> +static const
> +struct smu_temperature_range __maybe_unused smu11_thermal_policy[] =
>  {
> {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 
> 99000},
> { 12, 12, 12, 12, 12, 12, 12, 12, 
> 12},
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 35/40] drm/amd/pm/swsmu/smu11/vangogh_ppt: Make local function 'vangogh_set_default_dpm_tables()' static

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: At top level:
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:764:5: warning: 
> no previous prototype for ‘vangogh_set_default_dpm_tables’ 
> [-Wmissing-prototypes]
>  764 | int vangogh_set_default_dpm_tables(struct smu_context *smu)
>  | ^~
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Xiaojian Du 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

This code has changed a bit and I've just sent out a patch to handle
this slightly differently.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 9 +++--
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c 
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 9a2f72f21ed86..05c32be3a7496 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -400,16 +400,13 @@ static int vangogh_get_current_activity_percent(struct 
> smu_context *smu,
>enum amd_pp_sensors sensor,
>uint32_t *value)
>  {
> -   int ret = 0;
> -
> if (!value)
> return -EINVAL;
>
> switch (sensor) {
> case AMDGPU_PP_SENSOR_GPU_LOAD:
> -   ret = vangogh_get_smu_metrics_data(smu,
> - METRICS_AVERAGE_GFXACTIVITY,
> - value);
> +   vangogh_get_smu_metrics_data(smu, METRICS_AVERAGE_GFXACTIVITY,
> +value);
> break;
> default:
> dev_err(smu->adev->dev, "Invalid sensor for retrieving clock 
> activity\n");
> @@ -761,7 +758,7 @@ static int vangogh_od_edit_dpm_table(struct smu_context 
> *smu, enum PP_OD_DPM_TAB
> return ret;
>  }
>
> -int vangogh_set_default_dpm_tables(struct smu_context *smu)
> +static int vangogh_set_default_dpm_tables(struct smu_context *smu)
>  {
> struct smu_table_context *smu_table = &smu->smu_table;
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu/swsmu/vangogh: return error if fetching metrics fails

2020-11-30 Thread Alex Deucher
rather than just dropping the error.  Also fixes a set but not
used variable warning.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 3d4d27a304e9..56704181c5a9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -410,6 +410,8 @@ static int vangogh_get_current_activity_percent(struct 
smu_context *smu,
ret = vangogh_get_smu_metrics_data(smu,
  METRICS_AVERAGE_GFXACTIVITY,
  value);
+   if (ret)
+   return ret;
break;
default:
dev_err(smu->adev->dev, "Invalid sensor for retrieving clock 
activity\n");
-- 
2.25.4

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


Re: [PATCH] drm/amdkfd: keep BOs in system memory if restore failed

2020-11-30 Thread Felix Kuehling
Am 2020-11-30 um 5:48 p.m. schrieb Philip Yang:
> If vram is used up, display allocate vram evict the KFD BOs to system
> memory. KFD schedule restore work to restore BOs back to vram. If
> display BOs are pinned in vram, KFD restore work will keep retry, and
> may never success.
>
> If restore BO back to vram failed, keep the BO in system memory to
> prevent endless retry restore, and GPU mapping will update to system
> memory.
>
> Signed-off-by: Philip Yang 

Reviewed-by: Felix Kuehling 


> ---
>  .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 17 +++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index 703cd5a7b8f7..e54883ff74d2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -2042,6 +2042,8 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
> struct dma_fence **ef)
>   int ret = 0, i;
>   struct list_head duplicate_save;
>   struct amdgpu_sync sync_obj;
> + unsigned long failed_size = 0;
> + unsigned long total_size = 0;
>  
>   INIT_LIST_HEAD(&duplicate_save);
>   INIT_LIST_HEAD(&ctx.list);
> @@ -2098,10 +2100,18 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void 
> *info, struct dma_fence **ef)
>   uint32_t domain = mem->domain;
>   struct kfd_bo_va_list *bo_va_entry;
>  
> + total_size += amdgpu_bo_size(bo);
> +
>   ret = amdgpu_amdkfd_bo_validate(bo, domain, false);
>   if (ret) {
> - pr_debug("Memory eviction: Validate BOs failed. Try 
> again\n");
> - goto validate_map_fail;
> + pr_debug("Memory eviction: Validate BOs failed\n");
> + failed_size += amdgpu_bo_size(bo);
> + ret = amdgpu_amdkfd_bo_validate(bo,
> + AMDGPU_GEM_DOMAIN_GTT, false);
> + if (ret) {
> + pr_debug("Memory eviction: Try again\n");
> + goto validate_map_fail;
> + }
>   }
>   ret = amdgpu_sync_fence(&sync_obj, bo->tbo.moving);
>   if (ret) {
> @@ -2121,6 +2131,9 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
> struct dma_fence **ef)
>   }
>   }
>  
> + if (failed_size)
> + pr_debug("0x%lx/0x%lx in system\n", failed_size, total_size);
> +
>   /* Update page directories */
>   ret = process_update_pds(process_info, &sync_obj);
>   if (ret) {
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 34/40] drm/amd/amdgpu/amdgpu_acp: Fix doc-rot issues pertaining to a couple of 'handle' params

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:183: warning: Function parameter or 
> member 'handle' not described in 'acp_hw_init'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:183: warning: Excess function 
> parameter 'adev' description in 'acp_hw_init'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:412: warning: Function parameter or 
> member 'handle' not described in 'acp_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:412: warning: Excess function 
> parameter 'adev' description in 'acp_hw_fini'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> index 1400957034a12..b8655ff73a658 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> @@ -176,7 +176,7 @@ static struct device *get_mfd_cell_dev(const char 
> *device_name, int r)
>  /**
>   * acp_hw_init - start and test ACP block
>   *
> - * @adev: amdgpu_device pointer
> + * @handle: handle used to pass amdgpu_device pointer
>   *
>   */
>  static int acp_hw_init(void *handle)
> @@ -405,7 +405,7 @@ static int acp_hw_init(void *handle)
>  /**
>   * acp_hw_fini - stop the hardware block
>   *
> - * @adev: amdgpu_device pointer
> + * @handle: handle used to pass amdgpu_device pointer
>   *
>   */
>  static int acp_hw_fini(void *handle)
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 33/40] drm/amd/amdgpu/vcn_v3_0: Remove unused variable 'direct_poll' from 'vcn_v3_0_start_sriov()'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function ‘vcn_v3_0_start_sriov’:
>  drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1242:3: warning: variable 
> ‘direct_poll’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c 
> b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> index c5e0a531cabaf..e05af69651723 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
> @@ -1238,8 +1238,6 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device 
> *adev)
> direct_wt = { {0} };
> struct mmsch_v3_0_cmd_direct_read_modify_write
> direct_rd_mod_wt = { {0} };
> -   struct mmsch_v3_0_cmd_direct_polling
> -   direct_poll = { {0} };
> struct mmsch_v3_0_cmd_end end = { {0} };
> struct mmsch_v3_0_init_header header;
>
> @@ -1247,8 +1245,6 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device 
> *adev)
> MMSCH_COMMAND__DIRECT_REG_WRITE;
> direct_rd_mod_wt.cmd_header.command_type =
> MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE;
> -   direct_poll.cmd_header.command_type =
> -   MMSCH_COMMAND__DIRECT_REG_POLLING;
> end.cmd_header.command_type =
> MMSCH_COMMAND__END;
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdkfd: keep BOs in system memory if restore failed

2020-11-30 Thread Philip Yang
If vram is used up, display allocate vram evict the KFD BOs to system
memory. KFD schedule restore work to restore BOs back to vram. If
display BOs are pinned in vram, KFD restore work will keep retry, and
may never success.

If restore BO back to vram failed, keep the BO in system memory to
prevent endless retry restore, and GPU mapping will update to system
memory.

Signed-off-by: Philip Yang 
---
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 703cd5a7b8f7..e54883ff74d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -2042,6 +2042,8 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
int ret = 0, i;
struct list_head duplicate_save;
struct amdgpu_sync sync_obj;
+   unsigned long failed_size = 0;
+   unsigned long total_size = 0;
 
INIT_LIST_HEAD(&duplicate_save);
INIT_LIST_HEAD(&ctx.list);
@@ -2098,10 +2100,18 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
uint32_t domain = mem->domain;
struct kfd_bo_va_list *bo_va_entry;
 
+   total_size += amdgpu_bo_size(bo);
+
ret = amdgpu_amdkfd_bo_validate(bo, domain, false);
if (ret) {
-   pr_debug("Memory eviction: Validate BOs failed. Try 
again\n");
-   goto validate_map_fail;
+   pr_debug("Memory eviction: Validate BOs failed\n");
+   failed_size += amdgpu_bo_size(bo);
+   ret = amdgpu_amdkfd_bo_validate(bo,
+   AMDGPU_GEM_DOMAIN_GTT, false);
+   if (ret) {
+   pr_debug("Memory eviction: Try again\n");
+   goto validate_map_fail;
+   }
}
ret = amdgpu_sync_fence(&sync_obj, bo->tbo.moving);
if (ret) {
@@ -2121,6 +2131,9 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
}
}
 
+   if (failed_size)
+   pr_debug("0x%lx/0x%lx in system\n", failed_size, total_size);
+
/* Update page directories */
ret = process_update_pds(process_info, &sync_obj);
if (ret) {
-- 
2.17.1

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


Re: [PATCH 23/40] drm/amd/amdgpu/sdma_v5_0: Provide some missing and repair other function params

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:403: warning: Function parameter or 
> member 'job' not described in 'sdma_v5_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:403: warning: Function parameter or 
> member 'flags' not described in 'sdma_v5_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or 
> member 'addr' not described in 'sdma_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or 
> member 'seq' not described in 'sdma_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or 
> member 'flags' not described in 'sdma_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Excess function 
> parameter 'fence' description in 'sdma_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:967: warning: Function parameter or 
> member 'timeout' not described in 'sdma_v5_0_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Function parameter or 
> member 'value' not described in 'sdma_v5_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Excess function 
> parameter 'addr' description in 'sdma_v5_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Excess function 
> parameter 'flags' description in 'sdma_v5_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1126: warning: Function parameter or 
> member 'ring' not described in 'sdma_v5_0_ring_pad_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Function parameter or 
> member 'vmid' not described in 'sdma_v5_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Function parameter or 
> member 'pd_addr' not described in 'sdma_v5_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Excess function 
> parameter 'vm' description in 'sdma_v5_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Function parameter or 
> member 'ib' not described in 'sdma_v5_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Function parameter or 
> member 'tmz' not described in 'sdma_v5_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Excess function 
> parameter 'ring' description in 'sdma_v5_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1729: warning: Function parameter or 
> member 'ib' not described in 'sdma_v5_0_emit_fill_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1729: warning: Excess function 
> parameter 'ring' description in 'sdma_v5_0_emit_fill_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 19 +--
>  1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> index 9c72b95b74639..5180a52a79a54 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
> @@ -392,7 +392,9 @@ static void sdma_v5_0_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * sdma_v5_0_ring_emit_ib - Schedule an IB on the DMA engine
>   *
>   * @ring: amdgpu ring pointer
> + * @job: job to retrive vmid from
>   * @ib: IB object to schedule
> + * @flags: unused
>   *
>   * Schedule an IB in the DMA ring (NAVI10).
>   */
> @@ -469,7 +471,9 @@ static void sdma_v5_0_ring_emit_hdp_flush(struct 
> amdgpu_ring *ring)
>   * sdma_v5_0_ring_emit_fence - emit a fence on the DMA ring
>   *
>   * @ring: amdgpu ring pointer
> - * @fence: amdgpu fence object
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Add a DMA fence packet to the ring to write
>   * the fence seq number and DMA trap packet to generate
> @@ -959,6 +963,7 @@ static int sdma_v5_0_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * sdma_v5_0_ring_test_ib - test an IB on the DMA engine
>   *
>   * @ring: amdgpu_ring structure holding ring information
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   * Test a simple IB in the DMA ring (NAVI10).
>   * Returns 0 on success, error on failure.
> @@ -1061,10 +1066,9 @@ static void sdma_v5_0_vm_copy_pte(struct amdgpu_ib *ib,
>   *
>   * @ib: indirect buffer to fill with commands
>   * @pe: addr of the page entry
> - * @addr: dst addr to write into pe
> + * @value: dst addr to write into pe
>   * @count: number of page entries to update
>   * @incr: increase next addr by incr bytes
> - * @flags: access flags
>   *
>   * Update PTEs by writing t

Re: [PATCH 32/40] drm/amd/amdgpu/vcn_v2_0: Fix a few kernel-doc misdemeanours

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:483: warning: Excess function 
> parameter 'sw' description in 'vcn_v2_0_disable_clock_gating'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:644: warning: Excess function 
> parameter 'sw' description in 'vcn_v2_0_enable_clock_gating'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1404: warning: Function parameter or 
> member 'count' not described in 'vcn_v2_0_dec_ring_insert_nop'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or 
> member 'addr' not described in 'vcn_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or 
> member 'seq' not described in 'vcn_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or 
> member 'flags' not described in 'vcn_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Excess function 
> parameter 'fence' description in 'vcn_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1465: warning: Function parameter or 
> member 'job' not described in 'vcn_v2_0_dec_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1465: warning: Function parameter or 
> member 'flags' not described in 'vcn_v2_0_dec_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or 
> member 'addr' not described in 'vcn_v2_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or 
> member 'seq' not described in 'vcn_v2_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or 
> member 'flags' not described in 'vcn_v2_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Excess function 
> parameter 'fence' description in 'vcn_v2_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1636: warning: Function parameter or 
> member 'job' not described in 'vcn_v2_0_enc_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1636: warning: Function parameter or 
> member 'flags' not described in 'vcn_v2_0_enc_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 15 +++
>  1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c 
> b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index e285f9c9d460e..5687c5ed0fb99 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -475,7 +475,6 @@ static void vcn_v2_0_mc_resume_dpg_mode(struct 
> amdgpu_device *adev, bool indirec
>   * vcn_v2_0_disable_clock_gating - disable VCN clock gating
>   *
>   * @adev: amdgpu_device pointer
> - * @sw: enable SW clock gating
>   *
>   * Disable clock gating for VCN block
>   */
> @@ -636,7 +635,6 @@ static void vcn_v2_0_clock_gating_dpg_mode(struct 
> amdgpu_device *adev,
>   * vcn_v2_0_enable_clock_gating - enable VCN clock gating
>   *
>   * @adev: amdgpu_device pointer
> - * @sw: enable SW clock gating
>   *
>   * Enable clock gating for VCN block
>   */
> @@ -1397,6 +1395,7 @@ void vcn_v2_0_dec_ring_insert_end(struct amdgpu_ring 
> *ring)
>   * vcn_v2_0_dec_ring_insert_nop - insert a nop command
>   *
>   * @ring: amdgpu_ring pointer
> + * @count: the number of NOP packets to insert
>   *
>   * Write a nop command to the ring.
>   */
> @@ -1417,7 +1416,9 @@ void vcn_v2_0_dec_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * vcn_v2_0_dec_ring_emit_fence - emit an fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write a fence and a trap command to the ring.
>   */
> @@ -1454,7 +1455,9 @@ void vcn_v2_0_dec_ring_emit_fence(struct amdgpu_ring 
> *ring, u64 addr, u64 seq,
>   * vcn_v2_0_dec_ring_emit_ib - execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write ring commands to execute the indirect buffer
>   */
> @@ -1600,7 +1603,9 @@ static void vcn_v2_0_enc_ring_set_wptr(struct 
> amdgpu_ring *ring)
>   * vcn_v2_0_enc_ring_emit_fence - emit an enc fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write enc a fence and a trap command to the ring.
>   */
> @@ -1625,7 +1630,9 @@ void vcn_v2_0_enc_ring_insert_end(struct amdgpu_ring 
> *ring)
>   * vcn_v2_0_enc_ring_emit_ib - enc execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + *

Re: [PATCH 31/40] drm/amd/amdgpu/jpeg_v2_0: Add some missing kernel-doc descriptions

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or 
> member 'addr' not described in 'jpeg_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or 
> member 'seq' not described in 'jpeg_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or 
> member 'flags' not described in 'jpeg_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Excess function 
> parameter 'fence' description in 'jpeg_v2_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:549: warning: Function parameter or 
> member 'job' not described in 'jpeg_v2_0_dec_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:549: warning: Function parameter or 
> member 'flags' not described in 'jpeg_v2_0_dec_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c 
> b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
> index 6b80dcea80ec8..15c0224d48b06 100644
> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
> @@ -489,7 +489,9 @@ void jpeg_v2_0_dec_ring_insert_end(struct amdgpu_ring 
> *ring)
>   * jpeg_v2_0_dec_ring_emit_fence - emit an fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write a fence and a trap command to the ring.
>   */
> @@ -538,7 +540,9 @@ void jpeg_v2_0_dec_ring_emit_fence(struct amdgpu_ring 
> *ring, u64 addr, u64 seq,
>   * jpeg_v2_0_dec_ring_emit_ib - execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write ring commands to execute the indirect buffer.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 30/40] drm/amd/amdgpu/jpeg_v1_0: Add some missing function param descriptions

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or 
> member 'addr' not described in 'jpeg_v1_0_decode_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or 
> member 'seq' not described in 'jpeg_v1_0_decode_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or 
> member 'flags' not described in 'jpeg_v1_0_decode_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Excess function 
> parameter 'fence' description in 'jpeg_v1_0_decode_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:293: warning: Function parameter or 
> member 'job' not described in 'jpeg_v1_0_decode_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:293: warning: Function parameter or 
> member 'flags' not described in 'jpeg_v1_0_decode_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:518: warning: Function parameter or 
> member 'mode' not described in 'jpeg_v1_0_start'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Veerabadhran G 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c 
> b/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
> index c600b61b5f45d..c87102b238e48 100644
> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
> @@ -210,7 +210,9 @@ static void jpeg_v1_0_decode_ring_insert_end(struct 
> amdgpu_ring *ring)
>   * jpeg_v1_0_decode_ring_emit_fence - emit an fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write a fence and a trap command to the ring.
>   */
> @@ -282,7 +284,9 @@ static void jpeg_v1_0_decode_ring_emit_fence(struct 
> amdgpu_ring *ring, u64 addr,
>   * jpeg_v1_0_decode_ring_emit_ib - execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write ring commands to execute the indirect buffer.
>   */
> @@ -511,6 +515,7 @@ void jpeg_v1_0_sw_fini(void *handle)
>   * jpeg_v1_0_start - start JPEG block
>   *
>   * @adev: amdgpu_device pointer
> + * @mode: SPG or DPG mode
>   *
>   * Setup and start the JPEG block
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 29/40] drm/amd/amdgpu/vcn_v1_0: Fix a few kernel-doc misdemeanours

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:439: warning: Excess function 
> parameter 'sw' description in 'vcn_v1_0_disable_clock_gating'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:566: warning: Excess function 
> parameter 'sw' description in 'vcn_v1_0_enable_clock_gating'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or 
> member 'addr' not described in 'vcn_v1_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or 
> member 'seq' not described in 'vcn_v1_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or 
> member 'flags' not described in 'vcn_v1_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Excess function 
> parameter 'fence' description in 'vcn_v1_0_dec_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1495: warning: Function parameter or 
> member 'job' not described in 'vcn_v1_0_dec_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1495: warning: Function parameter or 
> member 'flags' not described in 'vcn_v1_0_dec_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or 
> member 'addr' not described in 'vcn_v1_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or 
> member 'seq' not described in 'vcn_v1_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or 
> member 'flags' not described in 'vcn_v1_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Excess function 
> parameter 'fence' description in 'vcn_v1_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1655: warning: Function parameter or 
> member 'job' not described in 'vcn_v1_0_enc_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1655: warning: Function parameter or 
> member 'flags' not described in 'vcn_v1_0_enc_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 14 ++
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c 
> b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
> index 86e1ef732ebec..72148f3b27d04 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
> @@ -431,7 +431,6 @@ static void vcn_v1_0_mc_resume_dpg_mode(struct 
> amdgpu_device *adev)
>   * vcn_v1_0_disable_clock_gating - disable VCN clock gating
>   *
>   * @adev: amdgpu_device pointer
> - * @sw: enable SW clock gating
>   *
>   * Disable clock gating for VCN block
>   */
> @@ -558,7 +557,6 @@ static void vcn_v1_0_disable_clock_gating(struct 
> amdgpu_device *adev)
>   * vcn_v1_0_enable_clock_gating - enable VCN clock gating
>   *
>   * @adev: amdgpu_device pointer
> - * @sw: enable SW clock gating
>   *
>   * Enable clock gating for VCN block
>   */
> @@ -1445,7 +1443,9 @@ static void vcn_v1_0_dec_ring_insert_end(struct 
> amdgpu_ring *ring)
>   * vcn_v1_0_dec_ring_emit_fence - emit an fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write a fence and a trap command to the ring.
>   */
> @@ -1484,7 +1484,9 @@ static void vcn_v1_0_dec_ring_emit_fence(struct 
> amdgpu_ring *ring, u64 addr, u64
>   * vcn_v1_0_dec_ring_emit_ib - execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write ring commands to execute the indirect buffer
>   */
> @@ -1619,7 +1621,9 @@ static void vcn_v1_0_enc_ring_set_wptr(struct 
> amdgpu_ring *ring)
>   * vcn_v1_0_enc_ring_emit_fence - emit an enc fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write enc a fence and a trap command to the ring.
>   */
> @@ -1644,7 +1648,9 @@ static void vcn_v1_0_enc_ring_insert_end(struct 
> amdgpu_ring *ring)
>   * vcn_v1_0_enc_ring_emit_ib - enc execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write enc ring commands to execute the indirect buffer
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.o

Re: [PATCH 28/40] drm/amd/amdgpu/gfx_v10_0: Make local function 'gfx_v10_0_rlc_stop()' static

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:5008:6: warning: no previous 
> prototype for ‘gfx_v10_0_rlc_stop’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index d4760f4e269a1..9eb886ae5a35e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -5005,7 +5005,7 @@ static int gfx_v10_0_init_csb(struct amdgpu_device 
> *adev)
> return 0;
>  }
>
> -void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
> +static void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
>  {
> u32 tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 27/40] drm/amd/amdgpu/uvd_v7_0: Fix a bunch of kernel-doc function documentation issues

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:219: warning: Function parameter or 
> member 'bo' not described in 'uvd_v7_0_enc_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:219: warning: Excess function 
> parameter 'adev' description in 'uvd_v7_0_enc_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:282: warning: Function parameter or 
> member 'bo' not described in 'uvd_v7_0_enc_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:282: warning: Excess function 
> parameter 'adev' description in 'uvd_v7_0_enc_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:339: warning: Function parameter or 
> member 'timeout' not described in 'uvd_v7_0_enc_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:527: warning: Function parameter or 
> member 'handle' not described in 'uvd_v7_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:527: warning: Excess function 
> parameter 'adev' description in 'uvd_v7_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:605: warning: Function parameter or 
> member 'handle' not described in 'uvd_v7_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:605: warning: Excess function 
> parameter 'adev' description in 'uvd_v7_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or 
> member 'addr' not described in 'uvd_v7_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or 
> member 'seq' not described in 'uvd_v7_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or 
> member 'flags' not described in 'uvd_v7_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Excess function 
> parameter 'fence' description in 'uvd_v7_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or 
> member 'addr' not described in 'uvd_v7_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or 
> member 'seq' not described in 'uvd_v7_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or 
> member 'flags' not described in 'uvd_v7_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Excess function 
> parameter 'fence' description in 'uvd_v7_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1293: warning: Function parameter or 
> member 'job' not described in 'uvd_v7_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1293: warning: Function parameter or 
> member 'flags' not described in 'uvd_v7_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1324: warning: Function parameter or 
> member 'job' not described in 'uvd_v7_0_enc_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1324: warning: Function parameter or 
> member 'flags' not described in 'uvd_v7_0_enc_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 21 +++--
>  1 file changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c 
> b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> index b44c8677ce8d5..9911ff80a6776 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> @@ -206,9 +206,9 @@ static int uvd_v7_0_enc_ring_test_ring(struct amdgpu_ring 
> *ring)
>  /**
>   * uvd_v7_0_enc_get_create_msg - generate a UVD ENC create msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: session handle to use
> + * @bo: amdgpu object for which we query the offset
>   * @fence: optional fence to return
>   *
>   * Open up a stream for HW test
> @@ -269,9 +269,9 @@ static int uvd_v7_0_enc_get_create_msg(struct amdgpu_ring 
> *ring, uint32_t handle
>  /**
>   * uvd_v7_0_enc_get_destroy_msg - generate a UVD ENC destroy msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: session handle to use
> + * @bo: amdgpu object for which we query the offset
>   * @fence: optional fence to return
>   *
>   * Close up a stream for HW test or if userspace failed to do so
> @@ -333,6 +333,7 @@ static int uvd_v7_0_enc_get_destroy_msg(struct 
> amdgpu_ring *ring, uint32_t handl
>   * uvd_v7_0_enc_ring_test_ib - test if UVD ENC IBs are working
>   *
>   * @ring: the engine to test on
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   */
>  static int uvd_v7_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
> @@ -519,7 +520,7 @@ static int uvd_v7_0_sw_fini(void *handle)

Re: [PATCH 26/40] drm/amd/amdgpu/uvd_v6_0: Fix a bunch of kernel-doc function documentation issues

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:211: warning: Function parameter or 
> member 'bo' not described in 'uvd_v6_0_enc_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:211: warning: Excess function 
> parameter 'adev' description in 'uvd_v6_0_enc_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:275: warning: Function parameter or 
> member 'bo' not described in 'uvd_v6_0_enc_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:275: warning: Excess function 
> parameter 'adev' description in 'uvd_v6_0_enc_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:332: warning: Function parameter or 
> member 'timeout' not described in 'uvd_v6_0_enc_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:472: warning: Function parameter or 
> member 'handle' not described in 'uvd_v6_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:472: warning: Excess function 
> parameter 'adev' description in 'uvd_v6_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:541: warning: Function parameter or 
> member 'handle' not described in 'uvd_v6_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:541: warning: Excess function 
> parameter 'adev' description in 'uvd_v6_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or 
> member 'addr' not described in 'uvd_v6_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or 
> member 'seq' not described in 'uvd_v6_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or 
> member 'flags' not described in 'uvd_v6_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Excess function 
> parameter 'fence' description in 'uvd_v6_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or 
> member 'addr' not described in 'uvd_v6_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or 
> member 'seq' not described in 'uvd_v6_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or 
> member 'flags' not described in 'uvd_v6_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Excess function 
> parameter 'fence' description in 'uvd_v6_0_enc_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:997: warning: Function parameter or 
> member 'job' not described in 'uvd_v6_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:997: warning: Function parameter or 
> member 'flags' not described in 'uvd_v6_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:1023: warning: Function parameter or 
> member 'job' not described in 'uvd_v6_0_enc_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:1023: warning: Function parameter or 
> member 'flags' not described in 'uvd_v6_0_enc_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 21 +++--
>  1 file changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c 
> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> index 666bfa4a0b8ea..69cf7edf4cc61 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> @@ -198,9 +198,9 @@ static int uvd_v6_0_enc_ring_test_ring(struct amdgpu_ring 
> *ring)
>  /**
>   * uvd_v6_0_enc_get_create_msg - generate a UVD ENC create msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: session handle to use
> + * @bo: amdgpu object for which we query the offset
>   * @fence: optional fence to return
>   *
>   * Open up a stream for HW test
> @@ -261,9 +261,9 @@ static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring 
> *ring, uint32_t handle
>  /**
>   * uvd_v6_0_enc_get_destroy_msg - generate a UVD ENC destroy msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: session handle to use
> + * @bo: amdgpu object for which we query the offset
>   * @fence: optional fence to return
>   *
>   * Close up a stream for HW test or if userspace failed to do so
> @@ -326,6 +326,7 @@ static int uvd_v6_0_enc_get_destroy_msg(struct 
> amdgpu_ring *ring,
>   * uvd_v6_0_enc_ring_test_ib - test if UVD ENC IBs are working
>   *
>   * @ring: the engine to test on
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   */
>  static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
> @@ -464,7 +465,7 @@ static int uvd_v6_0_sw_fini(void *handle)
>  /**
>   * uvd_v6_0_hw

Re: [PATCH 25/40] drm/amd/amdgpu/amdgpu_vce: Provide some missing and repair other function params

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:97: warning: Function parameter or 
> member 'size' not described in 'amdgpu_vce_sw_init'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:441: warning: Function parameter or 
> member 'bo' not described in 'amdgpu_vce_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:441: warning: Excess function 
> parameter 'adev' description in 'amdgpu_vce_get_create_msg'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:521: warning: Function parameter or 
> member 'direct' not described in 'amdgpu_vce_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:521: warning: Excess function 
> parameter 'adev' description in 'amdgpu_vce_get_destroy_msg'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:588: warning: Function parameter or 
> member 'ib_idx' not described in 'amdgpu_vce_validate_bo'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:636: warning: Function parameter or 
> member 'ib_idx' not described in 'amdgpu_vce_cs_reloc'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:636: warning: Function parameter or 
> member 'index' not described in 'amdgpu_vce_cs_reloc'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:720: warning: Function parameter or 
> member 'ib_idx' not described in 'amdgpu_vce_ring_parse_cs'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:956: warning: Function parameter or 
> member 'ib_idx' not described in 'amdgpu_vce_ring_parse_cs_vm'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1050: warning: Function parameter or 
> member 'job' not described in 'amdgpu_vce_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1050: warning: Function parameter or 
> member 'flags' not described in 'amdgpu_vce_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or 
> member 'addr' not described in 'amdgpu_vce_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or 
> member 'seq' not described in 'amdgpu_vce_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or 
> member 'flags' not described in 'amdgpu_vce_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Excess function 
> parameter 'fence' description in 'amdgpu_vce_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1122: warning: Function parameter or 
> member 'timeout' not described in 'amdgpu_vce_ring_test_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 19 ++-
>  1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index ecaa2d7483b20..1d8db318b0758 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -90,6 +90,7 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring 
> *ring, uint32_t handle,
>   * amdgpu_vce_init - allocate memory, load vce firmware
>   *
>   * @adev: amdgpu_device pointer
> + * @size: size for the new BO
>   *
>   * First step to get VCE online, allocate memory and load the firmware
>   */
> @@ -428,9 +429,9 @@ void amdgpu_vce_free_handles(struct amdgpu_device *adev, 
> struct drm_file *filp)
>  /**
>   * amdgpu_vce_get_create_msg - generate a VCE create msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: VCE session handle to use
> + * @bo: amdgpu object for which we query the offset
>   * @fence: optional fence to return
>   *
>   * Open up a stream for HW test
> @@ -509,9 +510,9 @@ static int amdgpu_vce_get_create_msg(struct amdgpu_ring 
> *ring, uint32_t handle,
>  /**
>   * amdgpu_vce_get_destroy_msg - generate a VCE destroy msg
>   *
> - * @adev: amdgpu_device pointer
>   * @ring: ring we should submit the msg to
>   * @handle: VCE session handle to use
> + * @direct: direct or delayed pool
>   * @fence: optional fence to return
>   *
>   * Close up a stream for HW test or if userspace failed to do so
> @@ -576,6 +577,7 @@ static int amdgpu_vce_get_destroy_msg(struct amdgpu_ring 
> *ring, uint32_t handle,
>   * amdgpu_vce_cs_validate_bo - make sure not to cross 4GB boundary
>   *
>   * @p: parser context
> + * @ib_idx: indirect buffer to use
>   * @lo: address of lower dword
>   * @hi: address of higher dword
>   * @size: minimum size
> @@ -625,9 +627,11 @@ static int amdgpu_vce_validate_bo(struct 
> amdgpu_cs_parser *p, uint32_t ib_idx,
>   * amdgpu_vce_cs_reloc - command submission relocation
>   *
>   * @p: parser context
> + * @ib_idx: indirect buffer to use
>   * @lo: address of lower dword
>   

Re: [PATCH 24/40] drm/amd/amdgpu/sdma_v5_2: Provide some missing and repair other function params

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:367: warning: Function parameter or 
> member 'job' not described in 'sdma_v5_2_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:367: warning: Function parameter or 
> member 'flags' not described in 'sdma_v5_2_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or 
> member 'addr' not described in 'sdma_v5_2_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or 
> member 'seq' not described in 'sdma_v5_2_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or 
> member 'flags' not described in 'sdma_v5_2_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Excess function 
> parameter 'fence' description in 'sdma_v5_2_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:924: warning: Function parameter or 
> member 'timeout' not described in 'sdma_v5_2_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Function parameter or 
> member 'value' not described in 'sdma_v5_2_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Excess function 
> parameter 'addr' description in 'sdma_v5_2_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Excess function 
> parameter 'flags' description in 'sdma_v5_2_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1083: warning: Function parameter or 
> member 'ring' not described in 'sdma_v5_2_ring_pad_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Function parameter or 
> member 'vmid' not described in 'sdma_v5_2_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Function parameter or 
> member 'pd_addr' not described in 'sdma_v5_2_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Excess function 
> parameter 'vm' description in 'sdma_v5_2_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Function parameter or 
> member 'ib' not described in 'sdma_v5_2_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Function parameter or 
> member 'tmz' not described in 'sdma_v5_2_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Excess function 
> parameter 'ring' description in 'sdma_v5_2_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1743: warning: Function parameter or 
> member 'ib' not described in 'sdma_v5_2_emit_fill_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1743: warning: Excess function 
> parameter 'ring' description in 'sdma_v5_2_emit_fill_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 19 +--
>  1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> index cb5a6f1437f81..e8736360d1a9f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> @@ -356,7 +356,9 @@ static void sdma_v5_2_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * sdma_v5_2_ring_emit_ib - Schedule an IB on the DMA engine
>   *
>   * @ring: amdgpu ring pointer
> + * @job: job to retrive vmid from
>   * @ib: IB object to schedule
> + * @flags: unused
>   *
>   * Schedule an IB in the DMA ring.
>   */
> @@ -418,7 +420,9 @@ static void sdma_v5_2_ring_emit_hdp_flush(struct 
> amdgpu_ring *ring)
>   * sdma_v5_2_ring_emit_fence - emit a fence on the DMA ring
>   *
>   * @ring: amdgpu ring pointer
> - * @fence: amdgpu fence object
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Add a DMA fence packet to the ring to write
>   * the fence seq number and DMA trap packet to generate
> @@ -916,6 +920,7 @@ static int sdma_v5_2_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * sdma_v5_2_ring_test_ib - test an IB on the DMA engine
>   *
>   * @ring: amdgpu_ring structure holding ring information
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   * Test a simple IB in the DMA ring.
>   * Returns 0 on success, error on failure.
> @@ -1017,10 +1022,9 @@ static void sdma_v5_2_vm_copy_pte(struct amdgpu_ib *ib,
>   *
>   * @ib: indirect buffer to fill with commands
>   * @pe: addr of the page entry
> - * @addr: dst addr to write into pe
> + * @value: dst addr to write into pe
>   * @count: number of page entries to update
>   * @incr: increase next addr by incr bytes
> - * @flags: access flags
>   *
>   * Update PTEs by writing them manually using

Re: [PATCH 22/40] drm/amd/amdgpu/amdgpu_uvd: Fix some function documentation headers

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:95: warning: cannot understand 
> function prototype: 'struct amdgpu_uvd_cs_ctx '
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:555: warning: Function parameter or 
> member 'adev' not described in 'amdgpu_uvd_cs_msg_decode'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1012: warning: Function parameter or 
> member 'ib_idx' not described in 'amdgpu_uvd_ring_parse_cs'
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1286: warning: Function parameter or 
> member 'timeout' not described in 'amdgpu_uvd_ring_test_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index f8bebf18ee362..f8f0384a8d9ad 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -87,7 +87,7 @@
>  #define UVD_NO_OP  0x03ff
>  #define UVD_BASE_SI0x3800
>
> -/**
> +/*
>   * amdgpu_uvd_cs_ctx - Command submission parser context
>   *
>   * Used for emulating virtual memory support on UVD 4.2.
> @@ -545,8 +545,8 @@ static int amdgpu_uvd_cs_pass1(struct amdgpu_uvd_cs_ctx 
> *ctx)
>  /**
>   * amdgpu_uvd_cs_msg_decode - handle UVD decode message
>   *
> + * @adev: amdgpu_device pointer
>   * @msg: pointer to message structure
> - * @buf_sizes: returned buffer sizes
>   *
>   * Peek into the decode message and calculate the necessary buffer sizes.
>   */
> @@ -1005,6 +1005,7 @@ static int amdgpu_uvd_cs_packets(struct 
> amdgpu_uvd_cs_ctx *ctx,
>   * amdgpu_uvd_ring_parse_cs - UVD command submission parser
>   *
>   * @parser: Command submission parser context
> + * @ib_idx: Which indirect buffer to use
>   *
>   * Parse the command stream, patch in addresses as necessary.
>   */
> @@ -1279,6 +1280,7 @@ void amdgpu_uvd_ring_end_use(struct amdgpu_ring *ring)
>   * amdgpu_uvd_ring_test_ib - test ib execution
>   *
>   * @ring: amdgpu_ring pointer
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   * Test if we can successfully execute an IB
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 21/40] drm/amd/amdgpu/sdma_v4_0: Repair a bunch of kernel-doc problems

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:848: warning: Function parameter or 
> member 'job' not described in 'sdma_v4_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:848: warning: Function parameter or 
> member 'flags' not described in 'sdma_v4_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or 
> member 'addr' not described in 'sdma_v4_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or 
> member 'seq' not described in 'sdma_v4_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or 
> member 'flags' not described in 'sdma_v4_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Excess function 
> parameter 'fence' description in 'sdma_v4_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1117: warning: Function parameter or 
> member 'ring' not described in 'sdma_v4_0_rb_cntl'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1117: warning: Function parameter or 
> member 'rb_cntl' not described in 'sdma_v4_0_rb_cntl'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1581: warning: Function parameter or 
> member 'timeout' not described in 'sdma_v4_0_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Function parameter or 
> member 'value' not described in 'sdma_v4_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Excess function 
> parameter 'addr' description in 'sdma_v4_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Excess function 
> parameter 'flags' description in 'sdma_v4_0_vm_write_pte'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1734: warning: Function parameter or 
> member 'ring' not described in 'sdma_v4_0_ring_pad_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Function parameter or 
> member 'vmid' not described in 'sdma_v4_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Function parameter or 
> member 'pd_addr' not described in 'sdma_v4_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Excess function 
> parameter 'vm' description in 'sdma_v4_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Function parameter or 
> member 'ib' not described in 'sdma_v4_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Function parameter or 
> member 'tmz' not described in 'sdma_v4_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Excess function 
> parameter 'ring' description in 'sdma_v4_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2534: warning: Function parameter or 
> member 'ib' not described in 'sdma_v4_0_emit_fill_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2534: warning: Excess function 
> parameter 'ring' description in 'sdma_v4_0_emit_fill_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 22 ++
>  1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index dc74ca2aa8926..512efb31cc9fe 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -837,7 +837,9 @@ static void sdma_v4_0_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * sdma_v4_0_ring_emit_ib - Schedule an IB on the DMA engine
>   *
>   * @ring: amdgpu ring pointer
> + * @job: job to retrive vmid from
>   * @ib: IB object to schedule
> + * @flags: unused
>   *
>   * Schedule an IB in the DMA ring (VEGA10).
>   */
> @@ -912,7 +914,9 @@ static void sdma_v4_0_ring_emit_hdp_flush(struct 
> amdgpu_ring *ring)
>   * sdma_v4_0_ring_emit_fence - emit a fence on the DMA ring
>   *
>   * @ring: amdgpu ring pointer
> - * @fence: amdgpu fence object
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Add a DMA fence packet to the ring to write
>   * the fence seq number and DMA trap packet to generate
> @@ -1110,7 +1114,7 @@ static void sdma_v4_0_enable(struct amdgpu_device 
> *adev, bool enable)
> }
>  }
>
> -/**
> +/*
>   * sdma_v4_0_rb_cntl - get parameters for rb_cntl
>   */
>  static uint32_t sdma_v4_0_rb_cntl(struct amdgpu_ring *ring, uint32_t rb_cntl)
> @@ -1573,6 +1577,7 @@ static int sdma_v4_0_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * sdma_v4_0_ring_test_ib - test an IB on the DMA engine
>   *
>   * @ring: amdgpu_ring structure holding ring information
> + * @timeout: timeout val

Re: [PATCH 20/40] drm/amd/amdgpu/uvd_v5_0: Fix a bunch of kernel-doc function documentation issues

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:153: warning: Function parameter or 
> member 'handle' not described in 'uvd_v5_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:153: warning: Excess function 
> parameter 'adev' description in 'uvd_v5_0_hw_init'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:210: warning: Function parameter or 
> member 'handle' not described in 'uvd_v5_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:210: warning: Excess function 
> parameter 'adev' description in 'uvd_v5_0_hw_fini'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or 
> member 'addr' not described in 'uvd_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or 
> member 'seq' not described in 'uvd_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or 
> member 'flags' not described in 'uvd_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Excess function 
> parameter 'fence' description in 'uvd_v5_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:529: warning: Function parameter or 
> member 'job' not described in 'uvd_v5_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:529: warning: Function parameter or 
> member 'flags' not described in 'uvd_v5_0_ring_emit_ib'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Nirmoy Das 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c 
> b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> index 6e57001f6d0ac..3a748ec58bec5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
> @@ -145,7 +145,7 @@ static int uvd_v5_0_sw_fini(void *handle)
>  /**
>   * uvd_v5_0_hw_init - start and test UVD block
>   *
> - * @adev: amdgpu_device pointer
> + * @handle: handle used to pass amdgpu_device pointer
>   *
>   * Initialize the hardware, boot up the VCPU and do some testing
>   */
> @@ -202,7 +202,7 @@ static int uvd_v5_0_hw_init(void *handle)
>  /**
>   * uvd_v5_0_hw_fini - stop the hardware block
>   *
> - * @adev: amdgpu_device pointer
> + * @handle: handle used to pass amdgpu_device pointer
>   *
>   * Stop the UVD block, mark ring as not ready any more
>   */
> @@ -454,7 +454,9 @@ static void uvd_v5_0_stop(struct amdgpu_device *adev)
>   * uvd_v5_0_ring_emit_fence - emit an fence & trap command
>   *
>   * @ring: amdgpu_ring pointer
> - * @fence: fence to emit
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Write a fence and a trap command to the ring.
>   */
> @@ -518,7 +520,9 @@ static int uvd_v5_0_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * uvd_v5_0_ring_emit_ib - execute indirect buffer
>   *
>   * @ring: amdgpu_ring pointer
> + * @job: job to retrive vmid from
>   * @ib: indirect buffer to execute
> + * @flags: unused
>   *
>   * Write ring commands to execute the indirect buffer
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 19/40] drm/amd/amdgpu/sdma_v3_0: Fix incorrect param doc-rot issue

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1651: warning: Function parameter or 
> member 'ib' not described in 'sdma_v3_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1651: warning: Excess function 
> parameter 'ring' description in 'sdma_v3_0_emit_copy_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index 43410a7bccc25..8ca7fba9c035f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -1633,7 +1633,7 @@ static void sdma_v3_0_set_irq_funcs(struct 
> amdgpu_device *adev)
>  /**
>   * sdma_v3_0_emit_copy_buffer - copy buffer using the sDMA engine
>   *
> - * @ring: amdgpu_ring structure holding ring information
> + * @ib: indirect buffer to copy to
>   * @src_offset: src GPU address
>   * @dst_offset: dst GPU address
>   * @byte_count: number of bytes to xfer
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 18/40] drm/amd/amdgpu/sdma_v3_0: Fix a bunch of kernel-doc function documentation issues

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:428: warning: Function parameter or 
> member 'job' not described in 'sdma_v3_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:428: warning: Function parameter or 
> member 'flags' not described in 'sdma_v3_0_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or 
> member 'addr' not described in 'sdma_v3_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or 
> member 'seq' not described in 'sdma_v3_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or 
> member 'flags' not described in 'sdma_v3_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Excess function 
> parameter 'fence' description in 'sdma_v3_0_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:870: warning: Function parameter or 
> member 'timeout' not described in 'sdma_v3_0_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1018: warning: Function parameter or 
> member 'ring' not described in 'sdma_v3_0_ring_pad_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Function parameter or 
> member 'vmid' not described in 'sdma_v3_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Function parameter or 
> member 'pd_addr' not described in 'sdma_v3_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Excess function 
> parameter 'vm' description in 'sdma_v3_0_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Function parameter or 
> member 'ib' not described in 'sdma_v3_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Function parameter or 
> member 'tmz' not described in 'sdma_v3_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Excess function 
> parameter 'ring' description in 'sdma_v3_0_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1668: warning: Function parameter or 
> member 'ib' not described in 'sdma_v3_0_emit_fill_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1668: warning: Excess function 
> parameter 'ring' description in 'sdma_v3_0_emit_fill_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor fixes.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 14 +++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index c59f6f6f4c091..43410a7bccc25 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -417,7 +417,9 @@ static void sdma_v3_0_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * sdma_v3_0_ring_emit_ib - Schedule an IB on the DMA engine
>   *
>   * @ring: amdgpu ring pointer
> + * @job: job to retrive vmid from
>   * @ib: IB object to schedule
> + * @flags: unused
>   *
>   * Schedule an IB in the DMA ring (VI).
>   */
> @@ -473,7 +475,9 @@ static void sdma_v3_0_ring_emit_hdp_flush(struct 
> amdgpu_ring *ring)
>   * sdma_v3_0_ring_emit_fence - emit a fence on the DMA ring
>   *
>   * @ring: amdgpu ring pointer
> - * @fence: amdgpu fence object
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Add a DMA fence packet to the ring to write
>   * the fence seq number and DMA trap packet to generate
> @@ -862,6 +866,7 @@ static int sdma_v3_0_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * sdma_v3_0_ring_test_ib - test an IB on the DMA engine
>   *
>   * @ring: amdgpu_ring structure holding ring information
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   * Test a simple IB in the DMA ring (VI).
>   * Returns 0 on success, error on failure.
> @@ -1011,6 +1016,7 @@ static void sdma_v3_0_vm_set_pte_pde(struct amdgpu_ib 
> *ib, uint64_t pe,
>  /**
>   * sdma_v3_0_ring_pad_ib - pad the IB to the required number of dw
>   *
> + * @ring: amdgpu_ring structure holding ring information
>   * @ib: indirect buffer to fill with padding
>   *
>   */
> @@ -1060,7 +1066,8 @@ static void sdma_v3_0_ring_emit_pipeline_sync(struct 
> amdgpu_ring *ring)
>   * sdma_v3_0_ring_emit_vm_flush - cik vm flush using sDMA
>   *
>   * @ring: amdgpu_ring pointer
> - * @vm: amdgpu_vm pointer
> + * @vmid: vmid number to use
> + * @pd_addr: address
>   *
>   * Update the page table base and flush the VM TLB
>   * using sDMA (VI).
> @@ -1630,6 +1637,7 @@ static void sdma_v3_0_set_irq_funcs(struct 
> amdgpu_device *adev)
>   * @src_offset: src GPU address
>   * @dst_offset: dst GPU a

Re: [PATCH 17/40] drm/amd/amdgpu/sdma_v2_4: Fix a bunch of kernel-doc function documentation issues

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:254: warning: Function parameter or 
> member 'job' not described in 'sdma_v2_4_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:254: warning: Function parameter or 
> member 'flags' not described in 'sdma_v2_4_ring_emit_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or 
> member 'addr' not described in 'sdma_v2_4_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or 
> member 'seq' not described in 'sdma_v2_4_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or 
> member 'flags' not described in 'sdma_v2_4_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Excess function 
> parameter 'fence' description in 'sdma_v2_4_ring_emit_fence'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:598: warning: Function parameter or 
> member 'timeout' not described in 'sdma_v2_4_ring_test_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:747: warning: Function parameter or 
> member 'ring' not described in 'sdma_v2_4_ring_pad_ib'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Function parameter or 
> member 'vmid' not described in 'sdma_v2_4_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Function parameter or 
> member 'pd_addr' not described in 'sdma_v2_4_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Excess function 
> parameter 'vm' description in 'sdma_v2_4_ring_emit_vm_flush'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Function parameter or 
> member 'ib' not described in 'sdma_v2_4_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Function parameter or 
> member 'tmz' not described in 'sdma_v2_4_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Excess function 
> parameter 'ring' description in 'sdma_v2_4_emit_copy_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1230: warning: Function parameter or 
> member 'ib' not described in 'sdma_v2_4_emit_fill_buffer'
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1230: warning: Excess function 
> parameter 'ring' description in 'sdma_v2_4_emit_fill_buffer'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied with minor changes.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 16 
>  1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c 
> b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> index 5f304d61999eb..22e9e4fe561d9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> @@ -243,7 +243,9 @@ static void sdma_v2_4_ring_insert_nop(struct amdgpu_ring 
> *ring, uint32_t count)
>   * sdma_v2_4_ring_emit_ib - Schedule an IB on the DMA engine
>   *
>   * @ring: amdgpu ring pointer
> + * @job: job to retrive vmid from
>   * @ib: IB object to schedule
> + * @flags: unused
>   *
>   * Schedule an IB in the DMA ring (VI).
>   */
> @@ -299,7 +301,9 @@ static void sdma_v2_4_ring_emit_hdp_flush(struct 
> amdgpu_ring *ring)
>   * sdma_v2_4_ring_emit_fence - emit a fence on the DMA ring
>   *
>   * @ring: amdgpu ring pointer
> - * @fence: amdgpu fence object
> + * @addr: address
> + * @seq: sequence number
> + * @flags: fence related flags
>   *
>   * Add a DMA fence packet to the ring to write
>   * the fence seq number and DMA trap packet to generate
> @@ -590,6 +594,7 @@ static int sdma_v2_4_ring_test_ring(struct amdgpu_ring 
> *ring)
>   * sdma_v2_4_ring_test_ib - test an IB on the DMA engine
>   *
>   * @ring: amdgpu_ring structure holding ring information
> + * @timeout: timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT
>   *
>   * Test a simple IB in the DMA ring (VI).
>   * Returns 0 on success, error on failure.
> @@ -740,6 +745,7 @@ static void sdma_v2_4_vm_set_pte_pde(struct amdgpu_ib 
> *ib, uint64_t pe,
>  /**
>   * sdma_v2_4_ring_pad_ib - pad the IB to the required number of dw
>   *
> + * @ring: amdgpu_ring structure holding ring information
>   * @ib: indirect buffer to fill with padding
>   *
>   */
> @@ -789,7 +795,8 @@ static void sdma_v2_4_ring_emit_pipeline_sync(struct 
> amdgpu_ring *ring)
>   * sdma_v2_4_ring_emit_vm_flush - cik vm flush using sDMA
>   *
>   * @ring: amdgpu_ring pointer
> - * @vm: amdgpu_vm pointer
> + * @vmid: vmid number to use
> + * @pd_addr: address
>   *
>   * Update the page table base and flush the VM TLB
>   * using sDMA (VI).
> @@ -1188,10 +1195,11 @@ static void sdma_v2_4_set_irq_funcs(struct 
> amdgpu_device *adev)
>  /**
>   * sdma_v2_4_emit_copy_buffer - copy buffer using the 

Re: [PATCH 16/40] drm/amd/amdgpu/gfx_v10_0: Remove a bunch of set but unused variables

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c: In function ‘gfx_v10_rlcg_wreg’:
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1416:18: warning: variable ‘grbm_idx’ 
> set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1415:18: warning: variable 
> ‘grbm_cntl’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1413:15: warning: variable 
> ‘scratch_reg3’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1412:15: warning: variable 
> ‘scratch_reg2’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 -
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index a6d03931f7fa4..d4760f4e269a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -1409,23 +1409,14 @@ static void gfx_v10_rlcg_wreg(struct amdgpu_device 
> *adev, u32 offset, u32 v)
>  {
> static void *scratch_reg0;
> static void *scratch_reg1;
> -   static void *scratch_reg2;
> -   static void *scratch_reg3;
> static void *spare_int;
> -   static uint32_t grbm_cntl;
> -   static uint32_t grbm_idx;
> uint32_t i = 0;
> uint32_t retries = 5;
>
> scratch_reg0 = adev->rmmio + 
> (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG0)*4;
> scratch_reg1 = adev->rmmio + 
> (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG1)*4;
> -   scratch_reg2 = adev->rmmio + 
> (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG2)*4;
> -   scratch_reg3 = adev->rmmio + 
> (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG3)*4;
> spare_int = adev->rmmio + 
> (adev->reg_offset[GC_HWIP][0][mmRLC_SPARE_INT_BASE_IDX] + mmRLC_SPARE_INT)*4;
>
> -   grbm_cntl = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_CNTL_BASE_IDX] + 
> mmGRBM_GFX_CNTL;
> -   grbm_idx = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_INDEX_BASE_IDX] + 
> mmGRBM_GFX_INDEX;
> -
> if (amdgpu_sriov_runtime(adev)) {
> pr_err("shouldn't call rlcg write register during runtime\n");
> return;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 15/40] drm/amd/amdgpu/gfx_v8_0: Functions must follow directly after their headers

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:3698: warning: Excess function 
> parameter 'adev' description in 'DEFAULT_SH_MEM_BASES'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 5e6d15f44560a..9a905531f8377 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -3687,6 +3687,7 @@ static void gfx_v8_0_setup_rb(struct amdgpu_device 
> *adev)
> mutex_unlock(&adev->grbm_idx_mutex);
>  }
>
> +#define DEFAULT_SH_MEM_BASES   (0x6000)
>  /**
>   * gfx_v8_0_init_compute_vmid - gart enable
>   *
> @@ -3695,7 +3696,6 @@ static void gfx_v8_0_setup_rb(struct amdgpu_device 
> *adev)
>   * Initialize compute vmid sh_mem registers
>   *
>   */
> -#define DEFAULT_SH_MEM_BASES   (0x6000)
>  static void gfx_v8_0_init_compute_vmid(struct amdgpu_device *adev)
>  {
> int i;
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 14/40] drm/amd/amdgpu/gfx_v9_0: Make called-by-reference only function static

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:2998:6: warning: no previous prototype 
> for ‘gfx_v9_0_rlc_stop’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 8a6c050cb6caf..eae81fc412556 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -2995,7 +2995,7 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
> }
>  }
>
> -void gfx_v9_0_rlc_stop(struct amdgpu_device *adev)
> +static void gfx_v9_0_rlc_stop(struct amdgpu_device *adev)
>  {
> WREG32_FIELD15(GC, 0, RLC_CNTL, RLC_ENABLE_F32, 0);
> gfx_v9_0_enable_gui_idle_interrupt(adev, false);
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 13/40] drm/amd/amdgpu/dce_v11_0: Supply description for function param 'async'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c:255: warning: Function parameter or 
> member 'async' not described in 'dce_v11_0_page_flip'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Luben Tuikov 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index c62c56a69fda6..1b6ff04700118 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -246,6 +246,7 @@ static void dce_v11_0_pageflip_interrupt_fini(struct 
> amdgpu_device *adev)
>   * @adev: amdgpu_device pointer
>   * @crtc_id: crtc to cleanup pageflip on
>   * @crtc_base: new address of the crtc (GPU MC address)
> + * @async: asynchronous flip
>   *
>   * Triggers the actual pageflip by updating the primary
>   * surface base address.
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] tests/amdgpu: Fix a typo

2020-11-30 Thread Luben Tuikov
Fix a typo: "TZM" --> "TMZ"

Signed-off-by: Luben Tuikov 
---
 tests/amdgpu/security_tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c
index 9b39e167..351eac82 100644
--- a/tests/amdgpu/security_tests.c
+++ b/tests/amdgpu/security_tests.c
@@ -172,7 +172,7 @@ static void amdgpu_sdma_nop(uint32_t *packet, uint32_t 
nop_count)
 }
 
 /**
- * amdgpu_bo_lcopy -- linear copy with TZM set, using sDMA
+ * amdgpu_bo_lcopy -- linear copy with TMZ set, using sDMA
  * @dev: AMDGPU device to which both buffer objects belong to
  * @dst: destination buffer object
  * @src: source buffer object
-- 
2.29.2.404.ge67fbf927d

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


Re: [PATCH 12/40] drm/amd/amdgpu/dce_v10_0: Supply description for function param 'async'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c:237: warning: Function parameter or 
> member 'async' not described in 'dce_v10_0_page_flip'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Luben Tuikov 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index da240f8fafcf8..7944781e1086b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -228,6 +228,7 @@ static void dce_v10_0_pageflip_interrupt_fini(struct 
> amdgpu_device *adev)
>   * @adev: amdgpu_device pointer
>   * @crtc_id: crtc to cleanup pageflip on
>   * @crtc_base: new address of the crtc (GPU MC address)
> + * @async: asynchronous flip
>   *
>   * Triggers the actual pageflip by updating the primary
>   * surface base address.
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 11/40] drm/amd/amdgpu/psp_v11_0: Make local function 'psp_v11_0_wait_for_bootloader()' static

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:223:5: warning: no previous prototype 
> for ‘psp_v11_0_wait_for_bootloader’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Hawking Zhang 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c 
> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index edd2d6bd1d86a..bd4248c93c49f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -220,7 +220,7 @@ static int psp_v11_0_init_microcode(struct psp_context 
> *psp)
> return err;
>  }
>
> -int psp_v11_0_wait_for_bootloader(struct psp_context *psp)
> +static int psp_v11_0_wait_for_bootloader(struct psp_context *psp)
>  {
> struct amdgpu_device *adev = psp->adev;
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 10/40] drm/amd/amdgpu/navi10_ih: Add descriptions for 'ih' and 'entry'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c:453: warning: Function parameter or 
> member 'ih' not described in 'navi10_ih_get_wptr'
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c:512: warning: Function parameter or 
> member 'ih' not described in 'navi10_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c:512: warning: Function parameter or 
> member 'entry' not described in 'navi10_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c:552: warning: Function parameter or 
> member 'ih' not described in 'navi10_ih_irq_rearm'
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c:585: warning: Function parameter or 
> member 'ih' not described in 'navi10_ih_set_rptr'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Alex Sierra 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> index 837769fcb35b7..3338052b080b6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> @@ -442,6 +442,7 @@ static void navi10_ih_irq_disable(struct amdgpu_device 
> *adev)
>   * navi10_ih_get_wptr - get the IH ring buffer wptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to fetch wptr
>   *
>   * Get the IH ring buffer wptr from either the register
>   * or the writeback memory buffer (NAVI10).  Also check for
> @@ -502,6 +503,8 @@ static u32 navi10_ih_get_wptr(struct amdgpu_device *adev,
>   * navi10_ih_decode_iv - decode an interrupt vector
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to decode
> + * @entry: IV entry to place decoded information into
>   *
>   * Decodes the interrupt vector at the current rptr
>   * position and also advance the position.
> @@ -545,6 +548,7 @@ static void navi10_ih_decode_iv(struct amdgpu_device 
> *adev,
>   * navi10_ih_irq_rearm - rearm IRQ if lost
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring to match
>   *
>   */
>  static void navi10_ih_irq_rearm(struct amdgpu_device *adev,
> @@ -578,6 +582,7 @@ static void navi10_ih_irq_rearm(struct amdgpu_device 
> *adev,
>   *
>   * @adev: amdgpu_device pointer
>   *
> + * @ih: IH ring buffer to set rptr
>   * Set the IH ring buffer rptr.
>   */
>  static void navi10_ih_set_rptr(struct amdgpu_device *adev,
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 09/40] drm/amd/amdgpu/vega10_ih: Add descriptions for 'ih' and 'entry'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c:377: warning: Function parameter or 
> member 'ih' not described in 'vega10_ih_get_wptr'
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c:440: warning: Function parameter or 
> member 'ih' not described in 'vega10_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c:440: warning: Function parameter or 
> member 'entry' not described in 'vega10_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c:480: warning: Function parameter or 
> member 'ih' not described in 'vega10_ih_irq_rearm'
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c:513: warning: Function parameter or 
> member 'ih' not described in 'vega10_ih_set_rptr'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Zhigang Luo 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> index 407c6093c2ec0..578fdee5b9758 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> @@ -366,6 +366,7 @@ static void vega10_ih_irq_disable(struct amdgpu_device 
> *adev)
>   * vega10_ih_get_wptr - get the IH ring buffer wptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to fetch wptr
>   *
>   * Get the IH ring buffer wptr from either the register
>   * or the writeback memory buffer (VEGA10).  Also check for
> @@ -430,6 +431,8 @@ static u32 vega10_ih_get_wptr(struct amdgpu_device *adev,
>   * vega10_ih_decode_iv - decode an interrupt vector
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to decode
> + * @entry: IV entry to place decoded information into
>   *
>   * Decodes the interrupt vector at the current rptr
>   * position and also advance the position.
> @@ -473,6 +476,7 @@ static void vega10_ih_decode_iv(struct amdgpu_device 
> *adev,
>   * vega10_ih_irq_rearm - rearm IRQ if lost
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring to match
>   *
>   */
>  static void vega10_ih_irq_rearm(struct amdgpu_device *adev,
> @@ -505,6 +509,7 @@ static void vega10_ih_irq_rearm(struct amdgpu_device 
> *adev,
>   * vega10_ih_set_rptr - set the IH ring buffer rptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to set rptr
>   *
>   * Set the IH ring buffer rptr.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 06/40] drm/amd/amdgpu/cz_ih: Add missing function param descriptions for 'ih' and 'entry'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/cz_ih.c:191: warning: Function parameter or 
> member 'ih' not described in 'cz_ih_get_wptr'
>  drivers/gpu/drm/amd/amdgpu/cz_ih.c:223: warning: Function parameter or 
> member 'ih' not described in 'cz_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/cz_ih.c:223: warning: Function parameter or 
> member 'entry' not described in 'cz_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/cz_ih.c:253: warning: Function parameter or 
> member 'ih' not described in 'cz_ih_set_rptr'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/cz_ih.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> index 1dca0cabc326a..da37f8a900afb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> @@ -179,6 +179,7 @@ static void cz_ih_irq_disable(struct amdgpu_device *adev)
>   * cz_ih_get_wptr - get the IH ring buffer wptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to fetch wptr
>   *
>   * Get the IH ring buffer wptr from either the register
>   * or the writeback memory buffer (VI).  Also check for
> @@ -213,6 +214,8 @@ static u32 cz_ih_get_wptr(struct amdgpu_device *adev,
>   * cz_ih_decode_iv - decode an interrupt vector
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to decode
> + * @entry: IV entry to place decoded information into
>   *
>   * Decodes the interrupt vector at the current rptr
>   * position and also advance the position.
> @@ -245,6 +248,7 @@ static void cz_ih_decode_iv(struct amdgpu_device *adev,
>   * cz_ih_set_rptr - set the IH ring buffer rptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to set rptr
>   *
>   * Set the IH ring buffer rptr.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 07/40] drm/amd/amdgpu/amdgpu_psp: Make local function 'parse_ta_bin_descriptor' static

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:2576:5: warning: no previous 
> prototype for ‘parse_ta_bin_descriptor’ [-Wmissing-prototypes]
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 74cbaf2126982..910e89dc324b8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -2573,9 +2573,9 @@ int psp_init_sos_microcode(struct psp_context *psp,
> return err;
>  }
>
> -int parse_ta_bin_descriptor(struct psp_context *psp,
> -   const struct ta_fw_bin_desc *desc,
> -   const struct ta_firmware_header_v2_0 *ta_hdr)
> +static int parse_ta_bin_descriptor(struct psp_context *psp,
> +  const struct ta_fw_bin_desc *desc,
> +  const struct ta_firmware_header_v2_0 
> *ta_hdr)
>  {
> uint8_t *ucode_start_addr  = NULL;
>
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 05/40] drm/amd/amdgpu/tonga_ih: Provide some missing descriptions for 'ih' and 'entry'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c:193: warning: Function parameter or 
> member 'ih' not described in 'tonga_ih_get_wptr'
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c:225: warning: Function parameter or 
> member 'ih' not described in 'tonga_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c:225: warning: Function parameter or 
> member 'entry' not described in 'tonga_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c:255: warning: Function parameter or 
> member 'ih' not described in 'tonga_ih_set_rptr'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> index e40140bf6699c..ce3319993b4bd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> @@ -181,6 +181,7 @@ static void tonga_ih_irq_disable(struct amdgpu_device 
> *adev)
>   * tonga_ih_get_wptr - get the IH ring buffer wptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to fetch wptr
>   *
>   * Get the IH ring buffer wptr from either the register
>   * or the writeback memory buffer (VI).  Also check for
> @@ -215,6 +216,8 @@ static u32 tonga_ih_get_wptr(struct amdgpu_device *adev,
>   * tonga_ih_decode_iv - decode an interrupt vector
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to decode
> + * @entry: IV entry to place decoded information into
>   *
>   * Decodes the interrupt vector at the current rptr
>   * position and also advance the position.
> @@ -247,6 +250,7 @@ static void tonga_ih_decode_iv(struct amdgpu_device *adev,
>   * tonga_ih_set_rptr - set the IH ring buffer rptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to set rptr
>   *
>   * Set the IH ring buffer rptr.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 04/40] drm/amd/amdgpu/iceland_ih: Add missing function param descriptions for 'ih' and 'entry'

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c:191: warning: Function parameter or 
> member 'ih' not described in 'iceland_ih_get_wptr'
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c:223: warning: Function parameter or 
> member 'ih' not described in 'iceland_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c:223: warning: Function parameter or 
> member 'entry' not described in 'iceland_ih_decode_iv'
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c:253: warning: Function parameter or 
> member 'ih' not described in 'iceland_ih_set_rptr'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> index a13dd9a51149a..37d8b6ca4dab8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> @@ -179,6 +179,7 @@ static void iceland_ih_irq_disable(struct amdgpu_device 
> *adev)
>   * iceland_ih_get_wptr - get the IH ring buffer wptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to fetch wptr
>   *
>   * Get the IH ring buffer wptr from either the register
>   * or the writeback memory buffer (VI).  Also check for
> @@ -213,6 +214,8 @@ static u32 iceland_ih_get_wptr(struct amdgpu_device *adev,
>   * iceland_ih_decode_iv - decode an interrupt vector
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to decode
> + * @entry: IV entry to place decoded information into
>   *
>   * Decodes the interrupt vector at the current rptr
>   * position and also advance the position.
> @@ -245,6 +248,7 @@ static void iceland_ih_decode_iv(struct amdgpu_device 
> *adev,
>   * iceland_ih_set_rptr - set the IH ring buffer rptr
>   *
>   * @adev: amdgpu_device pointer
> + * @ih: IH ring buffer to set rptr
>   *
>   * Set the IH ring buffer rptr.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 02/40] drm/amd/amdgpu/gmc_v10_0: Suppy some missing function doc descriptions

2020-11-30 Thread Alex Deucher
On Tue, Nov 24, 2020 at 2:44 PM Lee Jones  wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:278: warning: Function parameter or 
> member 'vmhub' not described in 'gmc_v10_0_flush_gpu_tlb'
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:278: warning: Function parameter or 
> member 'flush_type' not described in 'gmc_v10_0_flush_gpu_tlb'
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:371: warning: Function parameter or 
> member 'flush_type' not described in 'gmc_v10_0_flush_gpu_tlb_pasid'
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:371: warning: Function parameter or 
> member 'all_hub' not described in 'gmc_v10_0_flush_gpu_tlb_pasid'
>
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> Cc: Sumit Semwal 
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: linux-me...@vger.kernel.org
> Cc: linaro-mm-...@lists.linaro.org
> Signed-off-by: Lee Jones 

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> index d9399324be474..4887b0e66e975 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> @@ -270,6 +270,8 @@ static void gmc_v10_0_flush_vm_hub(struct amdgpu_device 
> *adev, uint32_t vmid,
>   *
>   * @adev: amdgpu_device pointer
>   * @vmid: vm instance to flush
> + * @vmhub: vmhub type
> + * @flush_type: the flush type
>   *
>   * Flush the TLB for the requested page table.
>   */
> @@ -362,6 +364,8 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device 
> *adev, uint32_t vmid,
>   *
>   * @adev: amdgpu_device pointer
>   * @pasid: pasid to be flush
> + * @flush_type: the flush type
> + * @all_hub: Used with PACKET3_INVALIDATE_TLBS_ALL_HUB()
>   *
>   * Flush the TLB for the requested pasid.
>   */
> --
> 2.25.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amdgpu: enable AGP aperture on gmc10.x (v2)

2020-11-30 Thread Alex Deucher
Just a small optimization for accessing system pages directly.
Was missed for gmc v10 since the feature landed for older gmcs
while we were still on the emulator or gmc10 and we use the AGP
aperture for zfb on the emulator.

v2: fix up the system aperture as well

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 10 +-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 10 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c   |  1 +
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c  | 10 +-
 drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c  |  8 
 5 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
index 456360bf58fa..2aecc6a243e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
@@ -153,16 +153,16 @@ static void gfxhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
uint64_t value;
 
if (!amdgpu_sriov_vf(adev)) {
-   /* Disable AGP. */
+   /* Program the AGP BAR */
WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 
24);
+   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
 
/* Program the system aperture low logical page number. */
WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
-adev->gmc.vram_start >> 18);
+min(adev->gmc.fb_start, adev->gmc.agp_start) >> 
18);
WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
-adev->gmc.vram_end >> 18);
+max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18);
 
/* Set default page address. */
value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
index 724bb29e9bb4..410fd3a1a388 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
@@ -152,16 +152,16 @@ static void gfxhub_v2_1_init_system_aperture_regs(struct 
amdgpu_device *adev)
 {
uint64_t value;
 
-   /* Disable AGP. */
+   /* Program the AGP BAR */
WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
-   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, 0);
-   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, 0x00FF);
+   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+   WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
 
/* Program the system aperture low logical page number. */
WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
-adev->gmc.vram_start >> 18);
+min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
WREG32_SOC15(GC, 0, mmGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
-adev->gmc.vram_end >> 18);
+max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18);
 
/* Set default page address. */
value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 4f6e44e21691..518233d71e6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -738,6 +738,7 @@ static void gmc_v10_0_vram_gtt_location(struct 
amdgpu_device *adev,
 
amdgpu_gmc_vram_location(adev, &adev->gmc, base);
amdgpu_gmc_gart_location(adev, mc);
+   amdgpu_gmc_agp_location(adev, mc);
 
/* base offset of vram pages */
adev->vm_manager.vram_base_offset = 
adev->gfxhub.funcs->get_mc_fb_offset(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c 
b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
index 4ac8ac0c56c8..57d5f8ffb764 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
@@ -195,17 +195,17 @@ static void mmhub_v2_0_init_system_aperture_regs(struct 
amdgpu_device *adev)
uint64_t value;
uint32_t tmp;
 
-   /* Disable AGP. */
+   /* Program the AGP BAR */
WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BASE, 0);
-   WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, 0);
-   WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, 0x00FF);
+   WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+   WREG32_SOC15(MMHUB, 0, mmMMMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
 
if (!amdgpu_sriov_vf(adev)) {
/* Program the system aperture low logical page number. */
WREG32_SOC15(MMHUB, 0, mmMMMC_VM_SYSTEM_APERTURE_LOW_ADDR,
-adev->gmc.vram_start >> 18);
+min(ade

[PATCH] drm/amdkfd: keep BOs in system memory if restore failed

2020-11-30 Thread Philip Yang
If vram is used up, display allocate vram evict the KFD BOs to system
memory. KFD schedule restore work to restore BOs back to vram to resume
queues. If restore BOs failed, KFD will reschedule the restore work to
try again. If display BOs are pinned in vram, KFD restore work will keep
retry, and may never success.

Set BO max restore count, if restore BO reach the max restore count,
keep the BO in system memory, and GPU mapping will update to system
memory.

Signed-off-by: Philip Yang 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 703cd5a7b8f7..4670515b3af4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -38,6 +38,7 @@
  * changes to accumulate
  */
 #define AMDGPU_USERPTR_RESTORE_DELAY_MS 1
+#define AMDGPU_MAX_BO_RESTORE_COUNT8   /* max 800ms retry restore */
 
 /* Impose limit on how much memory KFD can use */
 static struct {
@@ -2042,6 +2043,8 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
int ret = 0, i;
struct list_head duplicate_save;
struct amdgpu_sync sync_obj;
+   unsigned long failed_size = 0;
+   unsigned long total_size = 0;
 
INIT_LIST_HEAD(&duplicate_save);
INIT_LIST_HEAD(&ctx.list);
@@ -2098,10 +2101,20 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
uint32_t domain = mem->domain;
struct kfd_bo_va_list *bo_va_entry;
 
+   total_size += amdgpu_bo_size(bo);
+   if (atomic_read(&mem->invalid) > AMDGPU_MAX_BO_RESTORE_COUNT) {
+   pr_debug("Memory eviction: reach max restore count\n");
+   domain = AMDGPU_GEM_DOMAIN_GTT;
+   failed_size += amdgpu_bo_size(bo);
+   }
+
ret = amdgpu_amdkfd_bo_validate(bo, domain, false);
if (ret) {
+   atomic_inc(&mem->invalid);
pr_debug("Memory eviction: Validate BOs failed. Try 
again\n");
goto validate_map_fail;
+   } else {
+   atomic_set(&mem->invalid, 0);
}
ret = amdgpu_sync_fence(&sync_obj, bo->tbo.moving);
if (ret) {
@@ -2121,6 +2134,9 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, 
struct dma_fence **ef)
}
}
 
+   if (failed_size)
+   pr_debug("0x%lx/0x%lx restore fail\n", failed_size, total_size);
+
/* Update page directories */
ret = process_update_pds(process_info, &sync_obj);
if (ret) {
-- 
2.17.1

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


Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev

2020-11-30 Thread Zack Rusin



> On Nov 24, 2020, at 06:38, Thomas Zimmermann  wrote:
> 
> Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct
> drm_device.dev. No functional changes.
> 
> Signed-off-by: Thomas Zimmermann 
> Cc: Roland Scheidegger 
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c |  8 
> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c| 27 +-
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c |  2 +-

Reviewed-by: Zack Rusin 

z

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


Re: [PATCH] drm/amdgpu: default noretry=0 for navi1x and newer (v2)

2020-11-30 Thread Christian König

Am 30.11.20 um 20:52 schrieb Felix Kuehling:

Am 2020-11-30 um 2:25 p.m. schrieb Alex Deucher:

There are no performance advantages to setting it to 1 and
it causes stability issues in some cases.

See my later email on the other thread. There was another consideration
besides performance. It had to do with retry fault handling, which
depended on being able to reroute the interrupts to the IH1 ring, which
the security policy doesn't allow on many boards. With Christian's
recent changes to reroute retry interrupts to a software ring, this
dependency is gone and it should now be safe to enable retry on most boards.


It's not the best solution from a performance point of view, but it 
indeed seems to get things working as expected.






v2: simplify the code

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
Signed-off-by: Alex Deucher 

Reviewed-by: Felix Kuehling 


Reviewed-by: Christian König 





---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 -
  1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index fede84509dbc..b07c47cacd28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
  
  	switch (adev->asic_type) {

case CHIP_VEGA20:
-   case CHIP_NAVI10:
-   case CHIP_NAVI14:
-   case CHIP_SIENNA_CICHLID:
-   case CHIP_NAVY_FLOUNDER:
-   case CHIP_DIMGREY_CAVEFISH:
/*
 * noretry = 0 will cause kfd page fault tests fail
 * for some ASICs, so set default to 1 for these ASICs.

___
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


Re: [PATCH] drm/amdgpu: default noretry=0 for navi1x and newer (v2)

2020-11-30 Thread Felix Kuehling
Am 2020-11-30 um 2:25 p.m. schrieb Alex Deucher:
> There are no performance advantages to setting it to 1 and
> it causes stability issues in some cases.

See my later email on the other thread. There was another consideration
besides performance. It had to do with retry fault handling, which
depended on being able to reroute the interrupts to the IH1 ring, which
the security policy doesn't allow on many boards. With Christian's
recent changes to reroute retry interrupts to a software ring, this
dependency is gone and it should now be safe to enable retry on most boards.


>
> v2: simplify the code
>
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
> Signed-off-by: Alex Deucher 

Reviewed-by: Felix Kuehling 


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 -
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index fede84509dbc..b07c47cacd28 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
>  
>   switch (adev->asic_type) {
>   case CHIP_VEGA20:
> - case CHIP_NAVI10:
> - case CHIP_NAVI14:
> - case CHIP_SIENNA_CICHLID:
> - case CHIP_NAVY_FLOUNDER:
> - case CHIP_DIMGREY_CAVEFISH:
>   /*
>* noretry = 0 will cause kfd page fault tests fail
>* for some ASICs, so set default to 1 for these ASICs.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu: default noretry=0 for navi1x and newer

2020-11-30 Thread Alex Deucher
On Mon, Nov 30, 2020 at 2:25 PM Felix Kuehling  wrote:
>
> Am 2020-11-30 um 1:58 p.m. schrieb Alex Deucher:
> > There are no performance advantages to setting it to 1 and
> > it causes stability issues in some cases.
> >
> > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
> > Signed-off-by: Alex Deucher 
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 +-
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > index fede84509dbc..02b2ee9b8939 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > @@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
> >
> >   switch (adev->asic_type) {
> >   case CHIP_VEGA20:
> > - case CHIP_NAVI10:
> > - case CHIP_NAVI14:
> > - case CHIP_SIENNA_CICHLID:
> > - case CHIP_NAVY_FLOUNDER:
> > - case CHIP_DIMGREY_CAVEFISH:
> >   /*
> >* noretry = 0 will cause kfd page fault tests fail
> >* for some ASICs, so set default to 1 for these ASICs.
> > @@ -437,6 +432,11 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
> >   gmc->noretry = amdgpu_noretry;
> >   break;
> >   case CHIP_RAVEN:
> > + case CHIP_NAVI10:
> > + case CHIP_NAVI14:
> > + case CHIP_SIENNA_CICHLID:
> > + case CHIP_NAVY_FLOUNDER:
> > + case CHIP_DIMGREY_CAVEFISH:
>
> Is there any point listing those chips here explicitly, given that it's
> the default case? Anyway, the patch is

Just noticed that myself and sent a v2.

Alex

>
> Acked-by: Felix Kuehling 
>
> >   default:
> >   /* Raven currently has issues with noretry
> >* regardless of what we decide for other
>
> ___
> 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


Re: [PATCH v3] drm/amd/amdgpu: set the default value of noretry to 1 for some dGPUs

2020-11-30 Thread Felix Kuehling
Another related thought: I think the reason some chips had failing VM
fault tests with noretry=0 was due to a dependency on IH rerouting of
retry faults. This dependency has been fixed by Christian recently:

commit 849c62248ee84c1e304a9ce2f673c79e23f29bf9
Author: Christian K?nig 
Date:   Sat Oct 31 18:39:54 2020 +0100

drm/amdgpu: enabled software IH ring for Vega

Seems like we won't get the hardware IH1/2 rings on Vega20 working.

Signed-off-by: Christian K?nig 
Reviewed-by: Felix Kuehling 

 drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +++
 1 file changed, 7 insertions(+)

commit 198237744d85c4a23914de56d78fba0acf5a2803
Author: Christian K?nig 
Date:   Tue Nov 3 14:22:50 2020 +0100

drm/amdgpu: enabled software IH ring for Navi

Felix pointed out that we need this for Navi as well.

Signed-off-by: Christian K?nig 
Reviewed-by: Felix Kuehling 

 drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 7 +++
 1 file changed, 7 insertions(+)

So it should now be safe to enable retry faults on most chips. Only on
GFXv9 there can be a performance advantage to disabling retry.

Regards,
  Felix

Am 2020-11-30 um 12:35 p.m. schrieb Felix Kuehling:
> Like I stated elsewhere, I would recommend noretry=0 for Navi and later
> GPUs because there is no performance advantage from disabling retry on
> those GPUs.
>
>
> Regards,
>   Felix
>
>
> Am 2020-11-30 um 12:22 p.m. schrieb Deucher, Alexander:
>> [AMD Public Use]
>>
>>
>> We need to figure out what the root cause is then.  If we can't figure
>> it out soon, we should revert the change for navi1x and continue to
>> debug it until we can find the root cause and we can safely re-enable it.
>>
>> Alex
>> 
>> *From:* Chen, Guchun 
>> *Sent:* Sunday, November 29, 2020 2:22 AM
>> *To:* Bas Nieuwenhuizen ; Kuehling, Felix
>> 
>> *Cc:* Gui, Jack ; Zhou1, Tao ;
>> amd-gfx mailing list ; Huang, Ray
>> ; Deucher, Alexander ;
>> Zhang, Hawking 
>> *Subject:* RE: [PATCH v3] drm/amd/amdgpu: set the default value of
>> noretry to 1 for some dGPUs
>>  
>> [AMD Public Use]
>>
>> Hi Bas Nieuwenhuizen,
>>
>> I don't think direct revert is one right approach, though it's able to
>> fix your problem.  noretry=0 will cause other test failure on several
>> ASICs.
>>
>> Regards,
>> Guchun
>>
>> -Original Message-
>> From: amd-gfx  On Behalf Of Bas
>> Nieuwenhuizen
>> Sent: Sunday, November 29, 2020 8:38 AM
>> To: Kuehling, Felix 
>> Cc: Gui, Jack ; Chen, Guchun ;
>> Zhou1, Tao ; amd-gfx mailing list
>> ; Huang, Ray ;
>> Deucher, Alexander ; Zhang, Hawking
>> 
>> Subject: Re: [PATCH v3] drm/amd/amdgpu: set the default value of
>> noretry to 1 for some dGPUs
>>
>> Can we revert this patch to fix
>> https://gitlab.freedesktop.org/drm/amd/-/issues/1374 ?
>>
>> On Thu, Oct 15, 2020 at 4:30 PM Felix Kuehling
>>  wrote:
>>> Am 2020-10-14 um 11:35 p.m. schrieb Chengming Gui:
 noretry = 0 cause some dGPU's kfd page fault tests fail, so set
 noretry to 1 for these special ASICs:
 vega20/navi10/navi14/ARCTURUS

 v2: merge raven and default case due to the same setting
 v3: remove ARCTURUS

 Signed-off-by: Chengming Gui 
 Change-Id: I3be70f463a49b0cd5c56456431d6c2cb98b13872
>>> Acked-by: Felix Kuhling 
>>>
>>>
 ---
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 23
 +++
   1 file changed, 15 insertions(+), 8 deletions(-)

 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
 b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
 index 36604d751d62..f26eb4e54b12 100644
 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
 @@ -425,20 +425,27 @@ void amdgpu_gmc_noretry_set(struct
>> amdgpu_device *adev)
    struct amdgpu_gmc *gmc = &adev->gmc;

    switch (adev->asic_type) {
 - case CHIP_RAVEN:
 - /* Raven currently has issues with noretry
 -  * regardless of what we decide for other
 -  * asics, we should leave raven with
 -  * noretry = 0 until we root cause the
 -  * issues.
 + case CHIP_VEGA20:
 + case CHIP_NAVI10:
 + case CHIP_NAVI14:
 + /*
 +  * noretry = 0 will cause kfd page fault tests fail
 +  * for some ASICs, so set default to 1 for these ASICs.
     */
    if (amdgpu_noretry == -1)
 - gmc->noretry = 0;
 + gmc->noretry = 1;
    else
    gmc->noretry = amdgpu_noretry;
    break;
 + case CHIP_RAVEN:
    default:
 - /* default this to 0 for now, but we may want
 + /* Raven currently has issues with noretry
 +  * regardless of what we decide for other
 +  * asics, we should leave 

[PATCH] drm/amdgpu: default noretry=0 for navi1x and newer (v2)

2020-11-30 Thread Alex Deucher
There are no performance advantages to setting it to 1 and
it causes stability issues in some cases.

v2: simplify the code

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index fede84509dbc..b07c47cacd28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
 
switch (adev->asic_type) {
case CHIP_VEGA20:
-   case CHIP_NAVI10:
-   case CHIP_NAVI14:
-   case CHIP_SIENNA_CICHLID:
-   case CHIP_NAVY_FLOUNDER:
-   case CHIP_DIMGREY_CAVEFISH:
/*
 * noretry = 0 will cause kfd page fault tests fail
 * for some ASICs, so set default to 1 for these ASICs.
-- 
2.25.4

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


Re: [PATCH] drm/amdgpu: default noretry=0 for navi1x and newer

2020-11-30 Thread Felix Kuehling
Am 2020-11-30 um 1:58 p.m. schrieb Alex Deucher:
> There are no performance advantages to setting it to 1 and
> it causes stability issues in some cases.
>
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
> Signed-off-by: Alex Deucher 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index fede84509dbc..02b2ee9b8939 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
>  
>   switch (adev->asic_type) {
>   case CHIP_VEGA20:
> - case CHIP_NAVI10:
> - case CHIP_NAVI14:
> - case CHIP_SIENNA_CICHLID:
> - case CHIP_NAVY_FLOUNDER:
> - case CHIP_DIMGREY_CAVEFISH:
>   /*
>* noretry = 0 will cause kfd page fault tests fail
>* for some ASICs, so set default to 1 for these ASICs.
> @@ -437,6 +432,11 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
>   gmc->noretry = amdgpu_noretry;
>   break;
>   case CHIP_RAVEN:
> + case CHIP_NAVI10:
> + case CHIP_NAVI14:
> + case CHIP_SIENNA_CICHLID:
> + case CHIP_NAVY_FLOUNDER:
> + case CHIP_DIMGREY_CAVEFISH:

Is there any point listing those chips here explicitly, given that it's
the default case? Anyway, the patch is

Acked-by: Felix Kuehling 

>   default:
>   /* Raven currently has issues with noretry
>* regardless of what we decide for other

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


[PATCH] drm/amdgpu: default noretry=0 for navi1x and newer

2020-11-30 Thread Alex Deucher
There are no performance advantages to setting it to 1 and
it causes stability issues in some cases.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374
Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index fede84509dbc..02b2ee9b8939 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -422,11 +422,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
 
switch (adev->asic_type) {
case CHIP_VEGA20:
-   case CHIP_NAVI10:
-   case CHIP_NAVI14:
-   case CHIP_SIENNA_CICHLID:
-   case CHIP_NAVY_FLOUNDER:
-   case CHIP_DIMGREY_CAVEFISH:
/*
 * noretry = 0 will cause kfd page fault tests fail
 * for some ASICs, so set default to 1 for these ASICs.
@@ -437,6 +432,11 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
gmc->noretry = amdgpu_noretry;
break;
case CHIP_RAVEN:
+   case CHIP_NAVI10:
+   case CHIP_NAVI14:
+   case CHIP_SIENNA_CICHLID:
+   case CHIP_NAVY_FLOUNDER:
+   case CHIP_DIMGREY_CAVEFISH:
default:
/* Raven currently has issues with noretry
 * regardless of what we decide for other
-- 
2.25.4

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


Re: [PATCH v3] drm/amd/amdgpu: set the default value of noretry to 1 for some dGPUs

2020-11-30 Thread Felix Kuehling
Like I stated elsewhere, I would recommend noretry=0 for Navi and later
GPUs because there is no performance advantage from disabling retry on
those GPUs.


Regards,
  Felix


Am 2020-11-30 um 12:22 p.m. schrieb Deucher, Alexander:
>
> [AMD Public Use]
>
>
> We need to figure out what the root cause is then.  If we can't figure
> it out soon, we should revert the change for navi1x and continue to
> debug it until we can find the root cause and we can safely re-enable it.
>
> Alex
> 
> *From:* Chen, Guchun 
> *Sent:* Sunday, November 29, 2020 2:22 AM
> *To:* Bas Nieuwenhuizen ; Kuehling, Felix
> 
> *Cc:* Gui, Jack ; Zhou1, Tao ;
> amd-gfx mailing list ; Huang, Ray
> ; Deucher, Alexander ;
> Zhang, Hawking 
> *Subject:* RE: [PATCH v3] drm/amd/amdgpu: set the default value of
> noretry to 1 for some dGPUs
>  
> [AMD Public Use]
>
> Hi Bas Nieuwenhuizen,
>
> I don't think direct revert is one right approach, though it's able to
> fix your problem.  noretry=0 will cause other test failure on several
> ASICs.
>
> Regards,
> Guchun
>
> -Original Message-
> From: amd-gfx  On Behalf Of Bas
> Nieuwenhuizen
> Sent: Sunday, November 29, 2020 8:38 AM
> To: Kuehling, Felix 
> Cc: Gui, Jack ; Chen, Guchun ;
> Zhou1, Tao ; amd-gfx mailing list
> ; Huang, Ray ;
> Deucher, Alexander ; Zhang, Hawking
> 
> Subject: Re: [PATCH v3] drm/amd/amdgpu: set the default value of
> noretry to 1 for some dGPUs
>
> Can we revert this patch to fix
> https://gitlab.freedesktop.org/drm/amd/-/issues/1374 ?
>
> On Thu, Oct 15, 2020 at 4:30 PM Felix Kuehling
>  wrote:
> >
> > Am 2020-10-14 um 11:35 p.m. schrieb Chengming Gui:
> > > noretry = 0 cause some dGPU's kfd page fault tests fail, so set
> > > noretry to 1 for these special ASICs:
> > > vega20/navi10/navi14/ARCTURUS
> > >
> > > v2: merge raven and default case due to the same setting
> > > v3: remove ARCTURUS
> > >
> > > Signed-off-by: Chengming Gui 
> > > Change-Id: I3be70f463a49b0cd5c56456431d6c2cb98b13872
> >
> > Acked-by: Felix Kuhling 
> >
> >
> > > ---
> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 23
> > > +++
> > >  1 file changed, 15 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > > index 36604d751d62..f26eb4e54b12 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> > > @@ -425,20 +425,27 @@ void amdgpu_gmc_noretry_set(struct
> amdgpu_device *adev)
> > >   struct amdgpu_gmc *gmc = &adev->gmc;
> > >
> > >   switch (adev->asic_type) {
> > > - case CHIP_RAVEN:
> > > - /* Raven currently has issues with noretry
> > > -  * regardless of what we decide for other
> > > -  * asics, we should leave raven with
> > > -  * noretry = 0 until we root cause the
> > > -  * issues.
> > > + case CHIP_VEGA20:
> > > + case CHIP_NAVI10:
> > > + case CHIP_NAVI14:
> > > + /*
> > > +  * noretry = 0 will cause kfd page fault tests fail
> > > +  * for some ASICs, so set default to 1 for these ASICs.
> > >    */
> > >   if (amdgpu_noretry == -1)
> > > - gmc->noretry = 0;
> > > + gmc->noretry = 1;
> > >   else
> > >   gmc->noretry = amdgpu_noretry;
> > >   break;
> > > + case CHIP_RAVEN:
> > >   default:
> > > - /* default this to 0 for now, but we may want
> > > + /* Raven currently has issues with noretry
> > > +  * regardless of what we decide for other
> > > +  * asics, we should leave raven with
> > > +  * noretry = 0 until we root cause the
> > > +  * issues.
> > > +  *
> > > +  * default this to 0 for now, but we may want
> > >    * to change this in the future for certain
> > >    * GPUs as it can increase performance in
> > >    * certain cases.
> > ___
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://list/ 
> > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cgu
> > chun.chen%40amd.com%7C6d626e2a3bae4877024f08d893ff15db%7C3dd8961fe4884
> > e608e11a82d994e183d%7C0%7C0%7C637422071085800476%7CUnknown%7CTWFpbGZsb
> > 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > 7C1000&sdata=VFqegGwPCj10q3Y5BdZsVq2a%2B4Tb358mYVDaNkA9zLU%3D&
> > reserved=0
> ___
> 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


  1   2   >