[PATCH 1/2] drm/amdgpu: include uncondionally SI support in new AMD DC engine

2025-05-30 Thread Alexandre Demers
enable its usage, the user still have to set amdgpu.dc=1 as a kernel parameter. Since the code path seems to be stable (as stable as the CIK support), include support for SI in the new DC code path unconditonnally and only rely on amdgpu.dc to enable it. Signed-off-by: Alexandre Demers --- arch

drm/amdgpu: fix dce_audio.h filename definition

2025-05-30 Thread Alexandre Demers
The filename definition must have been a leftover from a previous rename operation. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.h b

[PATCH] drm/amdgpu: add missing DCE6 to dce_version_to_string()

2025-04-13 Thread Alexandre Demers
Missing DCE 6.0 6.1 and 6.4 are identified as UNKNOWN. Fix this. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/dc_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c

Re: [PATCH 0/6] drm/amdgpu and drm/radeon: a slew of small fixes

2025-04-11 Thread Alexandre Demers
I should get used to add Alex Deucher's email in CC. On Mon, Apr 7, 2025 at 10:11 PM Alexandre Demers wrote: > > This series goes from fixing typos in amdgpu and radeon to renaming functions > in DCE11.0 so it follows the convention of using a DCE/DCN version prefix for >

[PATCH 6/6] drm/amdgpu: fix typo in bios_parser.c

2025-04-10 Thread Alexandre Demers
Probably a cut and paste error from using get_integrated_info_v8's comment. This has to be get_integrated_info_v9 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/dr

[PATCH 4/6] drm/radeon: fix typo in atombios.h

2025-04-10 Thread Alexandre Demers
"aligned" not "aligend" Signed-off-by: Alexandre Demers --- drivers/gpu/drm/radeon/atombios.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 2db40789235c..c4abd1f78410 1006

[PATCH 5/6] drm/amdgpu: fix duplicated value setting in dce100_resource_construct()

2025-04-07 Thread Alexandre Demers
i2c_speed_in_khz was set twice with the same values. Looking at other DCE versions, we probably wanted to set the value for i2c_speed_in_khz_hdcp. Signed-off-by: Alexandre Demers --- .../gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c| 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/6] drm/amdgpu: fix typo in atombios.h

2025-04-07 Thread Alexandre Demers
"aligned" not "aligend" Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/include/atombios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/include/atombios.h b/drivers/gpu/drm/amd/include/atombios.h index b78360a71bc9..52bac

[PATCH 0/6] drm/amdgpu and drm/radeon: a slew of small fixes

2025-04-07 Thread Alexandre Demers
This series goes from fixing typos in amdgpu and radeon to renaming functions in DCE11.0 so it follows the convention of using a DCE/DCN version prefix for naming functions. Alexandre Demers (6): drm/amdgpu: rename function to follow naming convention in dce110 drm/amdgpu: add missing

[PATCH 1/6] drm/amdgpu: rename function to follow naming convention in dce110

2025-04-07 Thread Alexandre Demers
The prefix dce110 is used on all functions, but init_pipes() and init_hw(). Under DCN, these sames functions are prefixed. Let's keep thing coherent. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 8 1 file changed, 4 insertions(

[PATCH 2/6] drm/amdgpu: add missing parameter name in dce110_clk_src_construct() declaration

2025-04-07 Thread Alexandre Demers
While not needed per speaking, all the other parameters have names but this one. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h b

[PATCH] drm/amdgpu: still cleanup sid.h

2025-04-06 Thread Alexandre Demers
The defines, shifts and masks are already available in dce_6_0_d.h, dce_6_0_sh_mask.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 26 +- drivers/gpu/drm/amd/amdgpu/sid.h | 16 2 files changed, 13 insertions(+), 29 deletions

[PATCH 07/18] drm/amdgpu: move DCE6 away from sid.h and si_enums.h defines

2025-04-05 Thread Alexandre Demers
This cleans up DCE6. I added some minor tweaks taken from CIK to exit early Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 154 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 14 -- drivers/gpu/drm/amd/amdgpu/sid.h | 275

[PATCH 12/18] drm/amdgpu: make GFX6 easier to read

2025-04-05 Thread Alexandre Demers
Just fix the style and add a comment for reading easiness Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c

[PATCH 18/18] drm/amdgpu: continue cleaning up sid.h and si_enums.h

2025-04-05 Thread Alexandre Demers
Remove more duplicated defines and move some in sid.h for coherence with CIK. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 90 +-- drivers/gpu/drm/amd/amdgpu/sid.h | 16 - 2 files changed, 14 insertions(+), 92 deletions(-) diff

[PATCH 0/2] drm/amdgpu: better complete DCE6 and GMC6

2025-04-05 Thread Alexandre Demers
First patch moves some DCE files around so they are distributed as are other DCE files Second patch implements gmc_v6_0_set_clockgating_state(), which was mostly there, but commented out. A few tweeks were needed to make it work under amdgpu. Alexandre Demers (2): drm/amd/display/dc

[PATCH 13/18] drm/amdgpu: move si.c away from sid.h

2025-04-05 Thread Alexandre Demers
Replace defines by the ones added earlier to GFX6, SMU6 and DCE6 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 369 1 file changed, 185 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd

[PATCH 04/18] drm/amdgpu: remove PACKET3 duplicated defines from si_enums.h

2025-04-04 Thread Alexandre Demers
PACKET3 is already in sid.h, as it is done under cikd.h for CIK Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 123 -- 1 file changed, 123 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_enums.h b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: use "irq" in place of "interrupt" in DCE6/8 as in DCE10/11

2025-04-04 Thread Alexandre Demers
s DCE versions. Also, it standardizes function mapping inside a given structure where .set and .process are both set to functions with a "_irq" suffix. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1

[PATCH 1/2] drm/amd/display/dc: reclassify DCE6 resources and hw sequencer

2025-04-03 Thread Alexandre Demers
Classify DCE6 resource and sequencer as they are for other DCE versions Put dce60_resource.c and .h under amd/display/dc/resource/dce60 Put and rename dce60_hw_sequencer.c and .h under amd/display/dc/hwss/dce60 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/display/dc/dce60/Makefile

[PATCH 2/2] drm/amdgpu: fill in gmc_v6_0_set_clockgating_state()

2025-04-03 Thread Alexandre Demers
Pretty much was already there, just not ported to amdgpu. Tested-by: Alexandre Demers Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 44 +-- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0

[PATCH 0/2] drm/amdgpu: typos and standardization

2025-04-03 Thread Alexandre Demers
Typos were found in DCE, where hpd should have been used. DCE6/8: standardize the "interrupt" vs "irq" usage in function names with DCE10/11. Alexandre Demers (2): drm/amdgpu: fix typos in DCEs drm/amdgpu: use "irq" in place of "interrupt" in DCE

[PATCH 1/2] drm/amdgpu: fix typos in DCEs

2025-04-03 Thread Alexandre Demers
In DCE6, DCE8, DCE10, DCE11, "hdp" is replaced by "hpd" and replace "type" by "hpd" for a uniform parameter naming usage across DCEs. In link_factory.c, there is a missing "p" to "types" Signed-off-by: Alexandre Demers --- drivers/gpu

[PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-27 Thread Alexandre Demers
Replace defines for the ones under smu_6_0_d.h and smu_6_0_sh_mask.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 36 +-- 2 files changed, 190 insertions(+), 184 deletions(-) diff --git

[PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks

2025-03-27 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/smu/smu_6_0_d.h | 44 .../include/asic_reg/smu/smu_6_0_sh_mask.h| 190 +- 2 files changed, 230 insertions(+), 4 deletions(-) diff --git

[PATCH V3 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-27 Thread Alexandre Demers
atches 11, 13 and 15: Correct accordingly to patch 10 Alexandre Demers (18): drm/amdgpu: move GFX6 defines into gfx_v6_0.c drm/amdgpu: wire up defines, shifts and masks through SI code drm/amdgpu: use proper defines, shifts and masks in DCE6 code drm/amdgpu: remove PACKET3 duplicated def

[PATCH 15/18] drm/amdgpu: huge sid.h cleanup, drop substituted defines.

2025-03-27 Thread Alexandre Demers
Now that we are using the proper defines, cleanup useless old "substituted" defines. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/sid.h | 1219 +- 1 file changed, 9 insertions(+), 1210 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

Re: [PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks

2025-03-26 Thread Alexandre Demers
On Mon, Mar 24, 2025 at 3:03 PM Alex Deucher wrote: > > On Fri, Mar 21, 2025 at 9:48 PM Alexandre Demers > wrote: > > > > They will be used later when switching away from sid.h/si_enums.h. > > > > To prevent redefinition clashes, comment out the ones in sid.

Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c

2025-03-26 Thread Alexandre Demers
On Mon, Mar 24, 2025 at 2:21 PM Alex Deucher wrote: > > On Sat, Mar 22, 2025 at 2:48 PM Alexandre Demers > wrote: > > > > Bring things on a single line and fix spacing. > > > > Signed-off-by: Alexandre Demers > > --- > > drivers/gpu/drm/amd/amdgp

[PATCH 16/18] drm/amdgpu: keep removing sid.h dependency from si_dma.c

2025-03-23 Thread Alexandre Demers
Move and rename DMA_SEM_INCOMPLETE_TIMER_CNTL and DMA_SEM_WAIT_FAIL_TIMER_CNTL in oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/sid.h | 2 -- drivers/gpu/drm/amd/include/asic_reg

[PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7

2025-03-22 Thread Alexandre Demers
[BONAIRE|HAWAII]_GB_ADDR_CONFIG_GOLDEN are only used by GFX7. So keep them where they are needed. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cikd.h | 3 --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 5/6] drm/radeon: fix MAX_POWER_SHIFT value

2025-03-22 Thread Alexandre Demers
While I don't think it is being used anywhere, if it were used, it would be wrong. We can base this assumption on MAX_POWER_MASK, where the shift is by 16 bits. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/radeon/sid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH 5/6] drm/radeon: fix MAX_POWER_SHIFT value

2025-03-22 Thread Alexandre Demers
The title's prefix should only indicate [PATCH]. It was part of the series just sent a moment ago, but it was removed from it because it concerned drm/radeon. Alexandre On Sat, Mar 22, 2025 at 2:39 PM Alexandre Demers wrote: > > While I don't think it is being used anywhere, if

Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c

2025-03-22 Thread Alexandre Demers
This should be titled patch 5/5. There was initially another one in the lot about radeon. However, it was removed from the series and sent alone. Alexandre On Sat, Mar 22, 2025 at 2:37 PM Alexandre Demers wrote: > > Bring things on a single line and fix spacing. > > Signed-off-b

[PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA

2025-03-22 Thread Alexandre Demers
cik_sdma_is_idle() does exactly what we need, so use it. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index

[PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7

2025-03-22 Thread Alexandre Demers
gmc_v7_0_is_idle() does exactly what we need, so use it. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index

[PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c

2025-03-22 Thread Alexandre Demers
Bring things on a single line and fix spacing. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/vi.c | 8 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b

[PATCH 3/5] drm/amdgpu: small cleanup to CIK SDMA

2025-03-22 Thread Alexandre Demers
Tidy cik_sdma_hw_init() by returning directly cik_sdma_start()'s result. Keep amdgpu_cik_gpu_check_soft_reset() early declaration with others. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-)

[PATCH 0/5] Small tidy up of CIK code

2025-03-22 Thread Alexandre Demers
This series tidy up CIK code a bit. It uses some functions already available to remove redundant code in GMC7 and CIK SDMA. Some GOLDEN defines are moved into GFX7, the only place where they are used. It fixes coding style in VI and DCE8. Alexandre Demers (5): drm/amdgpu: use gmc_v7_0_is_idle

Re: [PATCH v2 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-22 Thread Alexandre Demers
I should have written "v2" in the title Alexandre On Fri., Mar. 21, 2025, 21:47 Alexandre Demers, < alexandre.f.dem...@gmail.com> wrote: > The following series is intented to remove duplicated defines, shifts and > masks or > to classify them where they belong. si_e

[PATCH 15/18] drm/amdgpu: huge sid.h cleanup, drop substituted defines.

2025-03-22 Thread Alexandre Demers
Now that we are using the proper defines, cleanup useless old "substituted" defines. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/sid.h | 1219 +- 1 file changed, 9 insertions(+), 1210 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 06/18] drm/amdgpu: use GRPH_SECONDARY_SURFACE_ADDRESS_MASK with GRPH_SECONDARY_SURFACE_ADDRESS in DCE6

2025-03-22 Thread Alexandre Demers
It seems a copy-paste error: since we are working with mmGRPH_SECONDARY_SURFACE_ADDRESS, GRPH_SECONDARY_SURFACE_ADDRESS__GRPH_SECONDARY_SURFACE_ADDRESS_MASK should be used. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 14/18] drm/amdgpu: move si_dma.c away from sid.h and si_enums.h

2025-03-21 Thread Alexandre Demers
Replace defines for the ones in oss_1_0_d.h and oss_1_0_sh_mask.h Taking the opportunity to add some comments taken from cik_sdma.c Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 108 drivers/gpu/drm/amd/amdgpu/sid.h| 36

[PATCH 17/18] drm/amdgpu: cleanup DCE6 a bit more

2025-03-21 Thread Alexandre Demers
Use shifts already available in DCE6's defines, masks and shifts. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sid.h | 8 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 08/18] drm/amdgpu: add missing DMA defines, shifts and masks

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/oss/oss_1_0_d.h | 21 +++-- .../include/asic_reg/oss/oss_1_0_sh_mask.h| 43 +++ 2 files changed, 61 insertions(+), 3 deletions(-) diff

[PATCH 09/18] drm/amdgpu: add missing GFX6 defines

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h b/drivers/gpu/drm/amd/include

[PATCH 13/18] drm/amdgpu: move si.c away from sid.h

2025-03-21 Thread Alexandre Demers
Replace defines by the ones added earlier to GFX6, SMU6 and DCE6 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 369 1 file changed, 185 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd

[PATCH 02/18] drm/amdgpu: wire up defines, shifts and masks through SI code

2025-03-21 Thread Alexandre Demers
To be able to remove as much duplicated defines, the different files containing definitions, shifts and masks must be properly included. Once done, the code will be migrated where needed to shifts and masks and proper defines, before removing useless defines in the end. Signed-off-by: Alexandre

[PATCH 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-21 Thread Alexandre Demers
ot;ix" prefix on some defines, since they are not indexes. Make sure each patch has a description. Alexandre Demers (18): drm/amdgpu: move GFX6 defines into gfx_v6_0.c drm/amdgpu: wire up defines, shifts and masks through SI code drm/amdgpu: use proper defines, shifts and masks in DCE6

[PATCH 03/18] drm/amdgpu: use proper defines, shifts and masks in DCE6 code

2025-03-21 Thread Alexandre Demers
By replacing VGA_VSTATUS_CNTL by VGA_RENDER_CONTROL__VGA_VSTATUS_CNTL_MASK, we also need to fix its usage in GMC6. Note: VGA_VSTATUS_CNTL's binary value was inverted in dce_6_0_sh_mask.h, so we need to invert its value where it was used. Signed-off-by: Alexandre Demers --- drivers/gpu/dr

[PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. To prevent redefinition clashes, comment out the ones in sid.h. They will be removed later. Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/smu/smu_6_0_d.h | 44 .../include/asic_reg/smu

[PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-21 Thread Alexandre Demers
Replace defines for the ones under smu_6_0_d.h and smu_6_0_sh_mask.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 36 +-- 2 files changed, 190 insertions(+), 184 deletions(-) diff --git

[PATCH 05/18] drm/admgpu: move si_ih.c away from sid.h defines

2025-03-21 Thread Alexandre Demers
They are properly defined under oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 94468c87122a

[PATCH 01/18] drm/amdgpu: move GFX6 defines into gfx_v6_0.c

2025-03-21 Thread Alexandre Demers
Send a few GFX6 defines where it's used in GFX6. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/driver

Re: [PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-19 Thread Alexandre Demers
On Mon, Mar 17, 2025 at 11:04 AM Alex Deucher wrote: > > On Mon, Mar 17, 2025 at 2:38 AM Alexandre Demers > wrote: > > > > Signed-off-by: Alexandre Demers > > --- > > drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- > > drivers/g

[PATCH 07/18] drm/amdgpu: move DCE6 away from sid.h and si_enums.h defines

2025-03-17 Thread Alexandre Demers
This cleans up DCE6. I added some minor tweaks taken from CIK to exit early Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 154 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 14 -- drivers/gpu/drm/amd/amdgpu/sid.h | 275

[PATCH 02/18] drm/amdgpu: wire up defines, shifts and masks through SI code

2025-03-17 Thread Alexandre Demers
To be able to remove as much duplicated defines, the different files containing definitions, shifts and masks must be properly included. Once done, the code will be migrated where needed to shifts and masks and proper defines, before removing useless defines in the end. Signed-off-by: Alexandre

[PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks

2025-03-17 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/smu/smu_6_0_d.h | 44 .../include/asic_reg/smu/smu_6_0_sh_mask.h| 190 +- 2 files changed, 230 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/include/asic_reg/smu/smu_6_0_d.h b/drivers

[PATCH 14/18] drm/amdgpu: move si_dma.c away from sid.h and si_enums.h

2025-03-17 Thread Alexandre Demers
Taking the opportunity to add some comments from cik_sdma.c Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 108 drivers/gpu/drm/amd/amdgpu/sid.h| 36 -- 2 files changed, 61 insertions(+), 83 deletions(-) diff --git a/drivers

[PATCH 13/18] drm/amdgpu: move si.c away from sid.h

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 369 1 file changed, 185 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 75d3b7471c68..3b8c65a966b9 100644 --- a/drivers

[PATCH 15/18] drm/amdgpu: huge sid.h cleanup, drop substituted defines.

2025-03-16 Thread Alexandre Demers
Now that we are using the proper defines, cleanup useless old "substituted" defines. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/sid.h | 1219 +- 1 file changed, 9 insertions(+), 1210 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 09/18] drm/amdgpu: add missing GFX6 defines

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h b/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h index c75aee25619e..a1240dd430aa 100644

[PATCH 05/18] drm/admgpu: move si_ih.c away from sid.h defines

2025-03-16 Thread Alexandre Demers
They are properly defined under oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 94468c87122a

[PATCH 16/18] drm/amdgpu: keep removing sid.h dependency from si_dma.c

2025-03-16 Thread Alexandre Demers
Move and rename DMA_SEM_INCOMPLETE_TIMER_CNTL and DMA_SEM_WAIT_FAIL_TIMER_CNTL in oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/sid.h | 2 -- drivers/gpu/drm/amd/include/asic_reg

[PATCH 04/18] drm/amdgpu: remove PACKET3 duplicated defines from si_enums.h

2025-03-16 Thread Alexandre Demers
PACKET3 is already in sid.h, as it is done under cikd.h for CIK Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 123 -- 1 file changed, 123 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_enums.h b/drivers/gpu/drm/amd/amdgpu

[PATCH 18/18] drm/amdgpu: continue cleaning up sid.h and si_enums.h

2025-03-16 Thread Alexandre Demers
Remove more duplicated defines and move some in sid.h for coherence with CIK. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 90 +-- drivers/gpu/drm/amd/amdgpu/sid.h | 16 - 2 files changed, 14 insertions(+), 92 deletions(-) diff

[PATCH 12/18] drm/amdgpu: fix GFX6 variables for sid.h cleanup

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 5f85c3b63971..f34980c79a7e 100644 --- a/drivers/gpu/drm

[PATCH 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-16 Thread Alexandre Demers
ported to DCE6, GFX6 and GMC6 defines, shifts and masks. There location was based on CIK and later. However, most of them were already available, but not used where they could be. This series is running on my PITCAIRN setup without any visible drawbacks. Alexandre Demers (18): drm/amdgpu: move

[PATCH 17/18] drm/amdgpu: cleanup DCE6 a bit more

2025-03-16 Thread Alexandre Demers
Use shifts already available in DCE6's defines, masks and shifts. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sid.h | 8 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 08/18] drm/amdgpu: add missing DMA defines, shifts and masks

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/oss/oss_1_0_d.h | 21 +++-- .../include/asic_reg/oss/oss_1_0_sh_mask.h| 43 +++ 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/include/asic_reg/oss/oss_1_0_d.h b

[PATCH 06/18] drm/amdgpu: use GRPH_SECONDARY_SURFACE_ADDRESS_MASK with GRPH_SECONDARY_SURFACE_ADDRESS in DCE6

2025-03-16 Thread Alexandre Demers
It seems a copy-paste error: since we are working with mmGRPH_SECONDARY_SURFACE_ADDRESS, GRPH_SECONDARY_SURFACE_ADDRESS__GRPH_SECONDARY_SURFACE_ADDRESS_MASK should be used. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 03/18] drm/amdgpu: use proper defines, shifts and masks in DCE6 code

2025-03-16 Thread Alexandre Demers
By replacing VGA_VSTATUS_CNTL by VGA_RENDER_CONTROL__VGA_VSTATUS_CNTL_MASK, we also need to fix its usage in GMC6. Note: VGA_VSTATUS_CNTL's binary value was inverted in dce_6_0_sh_mask.h, so we need to invert its value where it was used. Signed-off-by: Alexandre Demers --- drivers/gpu/dr

[PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 36 +-- 2 files changed, 190 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd

[PATCH 01/18] drm/amdgpu: move GFX6 defines into gfx_v6_0.c

2025-03-16 Thread Alexandre Demers
Send a few GFX6 defines where it's used in GFX6. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/driver

[PATCH v4 3/3] drm/amdgpu: finish wiring up sid.h in DCE6

2025-03-11 Thread Alexandre Demers
For coherence with DCE8 et DCE10, add or move some values under sid.h and remove duplicated from si_enums.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 63 ++- drivers/gpu/drm/amd/amdgpu/si_enums.h | 6 --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v4 0/3] Uniformize defines between DCE6, DCE8 and DCE10

2025-03-09 Thread Alexandre Demers
On Sun, Mar 9, 2025 at 12:49 PM Alexandre Demers wrote: > > Keep a uniform way of where and how variables are defined between > DCE6, DCE8 and DCE10. It is easier to understand the code, their > similarities and their modifications. > > Since sid.h is being wired up in dce_

[PATCH v4 1/3] drm/amdgpu: prepare DCE6 uniformisation with DCE8 and DCE10

2025-03-09 Thread Alexandre Demers
d from sid.h and properly linked in where needed. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/si.c | 68 +++--- drivers/gpu/drm/amd/amdgpu/sid.h | 336 +- 3 files changed, 43 insertions(+), 371

[PATCH v4 2/3] drm/amdgpu: fix SI's GB_ADDR_CONFIG_GOLDEN values and wire up sid.h in GFX6

2025-03-09 Thread Alexandre Demers
under gfx_v6_0.c where they are used (as it is done under cik) Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 15 +-- drivers/gpu/drm/amd/amdgpu/si_enums.h | 6 -- drivers/gpu/drm/amd/amdgpu/sid.h | 4 3 files changed, 13 insertions(+), 12 dele

Re: SI DMA: clarification on naming convention

2025-03-09 Thread Alexandre Demers
On Sun, Mar 9, 2025 at 12:47 PM Alex Deucher wrote: > > On Sat, Mar 8, 2025 at 3:39 AM Alexandre Demers > wrote: > > > > Hi, > > > > While working on cleaning up sid.h, si_enums.h and some other SI > > related files, I've been scratching my head a

Re: [PATCH v3 1/4] drm/amdgpu: add or move defines for DCE6 in sid.h

2025-03-09 Thread Alexandre Demers
On Sat, Mar 8, 2025 at 7:32 PM Alexandre Demers wrote: > > On Thu, Mar 6, 2025 at 10:19 AM Alex Deucher wrote: > > > > On Wed, Mar 5, 2025 at 9:08 PM Alexandre Demers > > wrote: > > > > > > For coherence with DCE8 et DCE10, add or move some val

[PATCH v4 0/3] Uniformize defines between DCE6, DCE8 and DCE10

2025-03-09 Thread Alexandre Demers
. Alexandre Demers (3): drm/amdgpu: fix warning and errors caused by duplicated defines in sid.h drm/amdgpu: move and fix X_GB_ADDR_CONFIG_GOLDEN values drm/amdgpu: add or move defines for DCE6 in sid.h drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 73 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c

Re: [PATCH v3 1/4] drm/amdgpu: add or move defines for DCE6 in sid.h

2025-03-08 Thread Alexandre Demers
On Thu, Mar 6, 2025 at 10:19 AM Alex Deucher wrote: > > On Wed, Mar 5, 2025 at 9:08 PM Alexandre Demers > wrote: > > > > For coherence with DCE8 et DCE10, add or move some values under sid.h. > > > > Signed-off-by: Alexandre Demers > > This change doesn&#

SI DMA: clarification on naming convention

2025-03-08 Thread Alexandre Demers
ed with CIK, isn't SI DMA also a "system DMA"? Could we use the same naming convention and talk about sDMA, name defines values, shifts and masks? Could si_dma.c/.h be renamed to si_sdma.c/.h? Was the naming difference introduced to CIK so different that the naming covention needed to be modified? Thanks, Alexandre Demers

Re: [PATCH v3 4/4] drm/amdgpu: fix warning and errors caused by duplicated defines in sid.h

2025-03-06 Thread Alexandre Demers
On Thu, Mar 6, 2025 at 10:17 AM Alex Deucher wrote: > > On Wed, Mar 5, 2025 at 8:57 PM Alexandre Demers > wrote: > > > > Let's finish the cleanup in sid.h to calm down things after wiring it into > > dce_v6_0.c. > > > > This is a bigger cleanup. >

[PATCH v3 4/4] drm/amdgpu: fix warning and errors caused by duplicated defines in sid.h

2025-03-05 Thread Alexandre Demers
.h and properly linked in where needed. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 12 +- drivers/gpu/drm/amd/amdgpu/si.c | 68 +++--- drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 - drivers/gpu/drm/amd/amdgpu/sid.h | 336 +-

[PATCH v3 2/4] drm/amdgpu: add defines for pin_offsets in DCE8

2025-03-05 Thread Alexandre Demers
Define pin_offsets values in the same way it is done in DCE8 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cikd.h | 9 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH v3 3/4] drm/amdgpu: move and fix X_GB_ADDR_CONFIG_GOLDEN values

2025-03-05 Thread Alexandre Demers
under gfx_v6_0.c where they are used (as it is done under cik) Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 15 +-- drivers/gpu/drm/amd/amdgpu/si_enums.h | 4 drivers/gpu/drm/amd/amdgpu/sid.h | 4 3 files changed, 13 insertions(+

[PATCH v3 0/4] Uniformize defines between DCE6, DCE8 and DCE10

2025-03-05 Thread Alexandre Demers
Keep a uniform way of where and how variables are defined between DCE6, DCE8 and DCE10. It is easier to understand the code, their similarities and their modifications. Since sid.h is being wired up in dce_v6_0.c, duplicated defines need to be cleaned up. Alexandre Demers (5): drm/amdgpu: add

[PATCH v3 1/4] drm/amdgpu: add or move defines for DCE6 in sid.h

2025-03-05 Thread Alexandre Demers
For coherence with DCE8 et DCE10, add or move some values under sid.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 63 ++- drivers/gpu/drm/amd/amdgpu/si_enums.h | 7 --- drivers/gpu/drm/amd/amdgpu/sid.h | 29 +--- 3 files

Re: [PATCH v2 0/2] Uniformize defines between DCE6, DCE8 and DCE10

2025-03-05 Thread Alexandre Demers
same under both radeon and amdgpu, so I would be inclined to think they are the good ones. However, gfx_v6_0.c uses the si_enums.h definitions. Alex, what do you think of it? On Sat, Mar 1, 2025 at 4:35 PM Alexandre Demers wrote: > > On Fri, Feb 28, 2025 at 9:31 PM Alexandre Deme

Re: [PATCH v2 0/2] Uniformize defines between DCE6, DCE8 and DCE10

2025-03-01 Thread Alexandre Demers
On Fri, Feb 28, 2025 at 9:31 PM Alexandre Demers wrote: > > Keep a uniform way of where and how variables are defined between > DCE6, DCE8 and DCE10. It is easier to understand the code, their > similarities and their modifications. > > Alexandre Demers (2): > drm/amdgpu

[PATCH v2 0/2] drm/amdgpu: add empty functions

2025-03-01 Thread Alexandre Demers
Third set of split patchset. Add to DCE6 dce_v6_0_soft_reset() dce_v6_0_set_crtc_vline_interrupt_state() to DCE6 Alexandre Demers (2): drm/amdgpu: add dce_v6_0_soft_reset() to DCE6 drm/amdgpu: complete dce_v6_0_set_crtc_vline_interrupt_state() in DCE6 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c

[PATCH v2 1/2] drm/amdgpu: add dce_v6_0_soft_reset() to DCE6

2025-02-28 Thread Alexandre Demers
DCE6 was missing soft reset, but it was easily identifiable under radeon. This should be it, pretty much as it is done under DCE8 and DCE10. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 53 ++- 1 file changed, 51 insertions(+), 2 deletions

[PATCH v2 2/2] drm/amdgpu: complete dce_v6_0_set_crtc_vline_interrupt_state() in DCE6

2025-02-28 Thread Alexandre Demers
dce_v6_0_set_crtc_vline_interrupt_state() was empty without any info to inform the user. Based on DCE8 and DCE10 code. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH v2 2/2] dmr/amdgpu: fix style in DCE6

2025-02-28 Thread Alexandre Demers
A few returns not where they should be. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index 78402e7444db

[PATCH v2 2/2] drm/amdgpu: add defines for pin_offsets in DCE8

2025-02-28 Thread Alexandre Demers
Define pin_offsets values in the same way it is done in DCE8 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/cikd.h | 9 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH v2 1/2] drm/amdgpu: add or move defines for DCE6 in sid.h

2025-02-28 Thread Alexandre Demers
For coherence with DCE8 et DCE10, add or move some values under sid.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 63 ++- drivers/gpu/drm/amd/amdgpu/si_enums.h | 7 --- drivers/gpu/drm/amd/amdgpu/sid.h | 29 +--- 3 files

[PATCH v2 0/2] Uniformize defines between DCE6, DCE8 and DCE10

2025-02-28 Thread Alexandre Demers
Keep a uniform way of where and how variables are defined between DCE6, DCE8 and DCE10. It is easier to understand the code, their similarities and their modifications. Alexandre Demers (2): drm/amdgpu: add or move defines for DCE6 in sid.h drm/amdgpu: add defines for pin_offsets in DCE8

[PATCH v2 1/2] drm/amdgpu: add some comments in DCE6

2025-02-28 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index eb7de9122d99..78402e7444db 100644 --- a/drivers

[PATCH v2 0/2] drm/amdgpu: fix style and comments in DCE6

2025-02-28 Thread Alexandre Demers
While going throught DCE6 code, I took on myself to add some comments and to fix style in a few places. Alexandre Demers (2): drm/amdgpu: add some comments in DCE6 dmr/amdgpu: fix style in DCE6 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 32 ++- 1 file changed, 21

  1   2   >