* [PATCH 0/5] Small tidy up of CIK code
@ 2025-03-22 18:37 Alexandre Demers
2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw)
To: amd-gfx
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() since it is available under GMC7
drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA
drm/amdgpu: small cleanup to CIK SDMA
drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7
drm/amdgpu: fix style in dce_v8_0.c and in vi.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 18 ++++--------------
drivers/gpu/drm/amd/amdgpu/cikd.h | 3 ---
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 10 +++-------
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 3 +++
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 9 +--------
drivers/gpu/drm/amd/amdgpu/vi.c | 8 ++++++++
6 files changed, 18 insertions(+), 31 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers @ 2025-03-22 18:37 ` Alexandre Demers 2025-03-24 18:23 ` Alex Deucher 2025-03-22 18:37 ` [PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA Alexandre Demers ` (3 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw) To: amd-gfx gmc_v7_0_is_idle() does exactly what we need, so use it. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> --- 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 b6016f11956e..1a8df3caedb1 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c @@ -1156,17 +1156,10 @@ static bool gmc_v7_0_is_idle(void *handle) static int gmc_v7_0_wait_for_idle(struct amdgpu_ip_block *ip_block) { unsigned int i; - u32 tmp; struct amdgpu_device *adev = ip_block->adev; for (i = 0; i < adev->usec_timeout; i++) { - /* read MC_STATUS */ - tmp = RREG32(mmSRBM_STATUS) & (SRBM_STATUS__MCB_BUSY_MASK | - SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | - SRBM_STATUS__MCC_BUSY_MASK | - SRBM_STATUS__MCD_BUSY_MASK | - SRBM_STATUS__VMC_BUSY_MASK); - if (!tmp) + if (gmc_v7_0_is_idle(adev)) return 0; udelay(1); } -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers @ 2025-03-24 18:23 ` Alex Deucher 0 siblings, 0 replies; 11+ messages in thread From: Alex Deucher @ 2025-03-24 18:23 UTC (permalink / raw) To: Alexandre Demers; +Cc: amd-gfx Applied 1-4 with some minor fixes. Alex On Sat, Mar 22, 2025 at 3:03 PM Alexandre Demers <alexandre.f.demers@gmail.com> wrote: > > gmc_v7_0_is_idle() does exactly what we need, so use it. > > Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> > --- > 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 b6016f11956e..1a8df3caedb1 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c > @@ -1156,17 +1156,10 @@ static bool gmc_v7_0_is_idle(void *handle) > static int gmc_v7_0_wait_for_idle(struct amdgpu_ip_block *ip_block) > { > unsigned int i; > - u32 tmp; > struct amdgpu_device *adev = ip_block->adev; > > for (i = 0; i < adev->usec_timeout; i++) { > - /* read MC_STATUS */ > - tmp = RREG32(mmSRBM_STATUS) & (SRBM_STATUS__MCB_BUSY_MASK | > - SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | > - SRBM_STATUS__MCC_BUSY_MASK | > - SRBM_STATUS__MCD_BUSY_MASK | > - SRBM_STATUS__VMC_BUSY_MASK); > - if (!tmp) > + if (gmc_v7_0_is_idle(adev)) > return 0; > udelay(1); > } > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers 2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers @ 2025-03-22 18:37 ` Alexandre Demers 2025-03-22 18:37 ` [PATCH 3/5] drm/amdgpu: small cleanup to " Alexandre Demers ` (2 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw) To: amd-gfx cik_sdma_is_idle() does exactly what we need, so use it. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> --- 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 ede1a028d48d..e7c06ce7ffae 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c @@ -1038,14 +1038,10 @@ static bool cik_sdma_is_idle(void *handle) static int cik_sdma_wait_for_idle(struct amdgpu_ip_block *ip_block) { unsigned i; - u32 tmp; struct amdgpu_device *adev = ip_block->adev; for (i = 0; i < adev->usec_timeout; i++) { - tmp = RREG32(mmSRBM_STATUS2) & (SRBM_STATUS2__SDMA_BUSY_MASK | - SRBM_STATUS2__SDMA1_BUSY_MASK); - - if (!tmp) + if (cik_sdma_is_idle(adev)) return 0; udelay(1); } -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] drm/amdgpu: small cleanup to CIK SDMA 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers 2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers 2025-03-22 18:37 ` [PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA Alexandre Demers @ 2025-03-22 18:37 ` Alexandre Demers 2025-03-22 18:37 ` [PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 Alexandre Demers 2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers 4 siblings, 0 replies; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw) To: amd-gfx 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 <alexandre.f.demers@gmail.com> --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index e7c06ce7ffae..4289f437bef6 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c @@ -56,6 +56,8 @@ static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev); static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev); static int cik_sdma_soft_reset(struct amdgpu_ip_block *ip_block); +u32 amdgpu_cik_gpu_check_soft_reset(struct amdgpu_device *adev); + MODULE_FIRMWARE("amdgpu/bonaire_sdma.bin"); MODULE_FIRMWARE("amdgpu/bonaire_sdma1.bin"); MODULE_FIRMWARE("amdgpu/hawaii_sdma.bin"); @@ -67,9 +69,6 @@ MODULE_FIRMWARE("amdgpu/kabini_sdma1.bin"); MODULE_FIRMWARE("amdgpu/mullins_sdma.bin"); MODULE_FIRMWARE("amdgpu/mullins_sdma1.bin"); -u32 amdgpu_cik_gpu_check_soft_reset(struct amdgpu_device *adev); - - static void cik_sdma_free_microcode(struct amdgpu_device *adev) { int i; @@ -991,14 +990,9 @@ static int cik_sdma_sw_fini(struct amdgpu_ip_block *ip_block) static int cik_sdma_hw_init(struct amdgpu_ip_block *ip_block) { - int r; struct amdgpu_device *adev = ip_block->adev; - r = cik_sdma_start(adev); - if (r) - return r; - - return r; + return cik_sdma_start(adev); } static int cik_sdma_hw_fini(struct amdgpu_ip_block *ip_block) -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers ` (2 preceding siblings ...) 2025-03-22 18:37 ` [PATCH 3/5] drm/amdgpu: small cleanup to " Alexandre Demers @ 2025-03-22 18:37 ` Alexandre Demers 2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers 4 siblings, 0 replies; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw) To: amd-gfx [BONAIRE|HAWAII]_GB_ADDR_CONFIG_GOLDEN are only used by GFX7. So keep them where they are needed. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> --- 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/drivers/gpu/drm/amd/amdgpu/cikd.h b/drivers/gpu/drm/amd/amdgpu/cikd.h index 279288365940..8aca4f2734f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/cikd.h +++ b/drivers/gpu/drm/amd/amdgpu/cikd.h @@ -60,9 +60,6 @@ #define AUD5_REGISTER_OFFSET (0x179d - 0x1780) #define AUD6_REGISTER_OFFSET (0x17a4 - 0x1780) -#define BONAIRE_GB_ADDR_CONFIG_GOLDEN 0x12010001 -#define HAWAII_GB_ADDR_CONFIG_GOLDEN 0x12011003 - #define PIPEID(x) ((x) << 0) #define MEID(x) ((x) << 2) #define VMID(x) ((x) << 4) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 824d5913103b..adc49c2036db 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -55,6 +55,9 @@ #define GFX7_NUM_GFX_RINGS 1 #define GFX7_MEC_HPD_SIZE 2048 +#define BONAIRE_GB_ADDR_CONFIG_GOLDEN 0x12010001 +#define HAWAII_GB_ADDR_CONFIG_GOLDEN 0x12011003 + static void gfx_v7_0_set_ring_funcs(struct amdgpu_device *adev); static void gfx_v7_0_set_irq_funcs(struct amdgpu_device *adev); static void gfx_v7_0_set_gds_init(struct amdgpu_device *adev); -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers ` (3 preceding siblings ...) 2025-03-22 18:37 ` [PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 Alexandre Demers @ 2025-03-22 18:37 ` Alexandre Demers 2025-03-22 18:46 ` Alexandre Demers 2025-03-24 18:20 ` Alex Deucher 4 siblings, 2 replies; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:37 UTC (permalink / raw) To: amd-gfx Bring things on a single line and fix spacing. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> --- 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/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index f008615343c3..533851beb27c 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -3233,8 +3233,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { .set_powergating_state = dce_v8_0_set_powergating_state, }; -static void -dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, +static void dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { @@ -3330,8 +3329,7 @@ static void dce_v8_0_ext_commit(struct drm_encoder *encoder) } -static void -dce_v8_0_ext_mode_set(struct drm_encoder *encoder, +static void dce_v8_0_ext_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { @@ -3343,8 +3341,7 @@ static void dce_v8_0_ext_disable(struct drm_encoder *encoder) } -static void -dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) +static void dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) { } @@ -3407,7 +3404,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, amdgpu_encoder->devices |= supported_device; return; } - } /* add a new one */ diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index a83505815d39..bcabcf27c3d0 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -61,19 +61,27 @@ #include "vid.h" #include "vi.h" + #include "gmc_v8_0.h" #include "gmc_v7_0.h" + #include "gfx_v8_0.h" + #include "sdma_v2_4.h" #include "sdma_v3_0.h" + #include "dce_v10_0.h" #include "dce_v11_0.h" + #include "iceland_ih.h" #include "tonga_ih.h" #include "cz_ih.h" + #include "uvd_v5_0.h" #include "uvd_v6_0.h" + #include "vce_v3_0.h" + #if defined(CONFIG_DRM_AMD_ACP) #include "amdgpu_acp.h" #endif -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c 2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers @ 2025-03-22 18:46 ` Alexandre Demers 2025-03-24 18:20 ` Alex Deucher 1 sibling, 0 replies; 11+ messages in thread From: Alexandre Demers @ 2025-03-22 18:46 UTC (permalink / raw) To: amd-gfx 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 <alexandre.f.demers@gmail.com> wrote: > > Bring things on a single line and fix spacing. > > Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> > --- > 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/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > index f008615343c3..533851beb27c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > @@ -3233,8 +3233,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { > .set_powergating_state = dce_v8_0_set_powergating_state, > }; > > -static void > -dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > +static void dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > { > @@ -3330,8 +3329,7 @@ static void dce_v8_0_ext_commit(struct drm_encoder *encoder) > > } > > -static void > -dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > +static void dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > { > @@ -3343,8 +3341,7 @@ static void dce_v8_0_ext_disable(struct drm_encoder *encoder) > > } > > -static void > -dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > +static void dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > { > > } > @@ -3407,7 +3404,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, > amdgpu_encoder->devices |= supported_device; > return; > } > - > } > > /* add a new one */ > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > index a83505815d39..bcabcf27c3d0 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -61,19 +61,27 @@ > > #include "vid.h" > #include "vi.h" > + > #include "gmc_v8_0.h" > #include "gmc_v7_0.h" > + > #include "gfx_v8_0.h" > + > #include "sdma_v2_4.h" > #include "sdma_v3_0.h" > + > #include "dce_v10_0.h" > #include "dce_v11_0.h" > + > #include "iceland_ih.h" > #include "tonga_ih.h" > #include "cz_ih.h" > + > #include "uvd_v5_0.h" > #include "uvd_v6_0.h" > + > #include "vce_v3_0.h" > + > #if defined(CONFIG_DRM_AMD_ACP) > #include "amdgpu_acp.h" > #endif > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c 2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers 2025-03-22 18:46 ` Alexandre Demers @ 2025-03-24 18:20 ` Alex Deucher 2025-03-27 4:16 ` Alexandre Demers 1 sibling, 1 reply; 11+ messages in thread From: Alex Deucher @ 2025-03-24 18:20 UTC (permalink / raw) To: Alexandre Demers; +Cc: amd-gfx On Sat, Mar 22, 2025 at 2:48 PM Alexandre Demers <alexandre.f.demers@gmail.com> wrote: > > Bring things on a single line and fix spacing. > > Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> > --- > 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/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > index f008615343c3..533851beb27c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > @@ -3233,8 +3233,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { > .set_powergating_state = dce_v8_0_set_powergating_state, > }; > > -static void > -dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > +static void dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > { > @@ -3330,8 +3329,7 @@ static void dce_v8_0_ext_commit(struct drm_encoder *encoder) > > } > > -static void > -dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > +static void dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > { > @@ -3343,8 +3341,7 @@ static void dce_v8_0_ext_disable(struct drm_encoder *encoder) > > } > > -static void > -dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > +static void dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > { > > } > @@ -3407,7 +3404,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, > amdgpu_encoder->devices |= supported_device; > return; > } > - > } > > /* add a new one */ > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > index a83505815d39..bcabcf27c3d0 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -61,19 +61,27 @@ > > #include "vid.h" > #include "vi.h" > + > #include "gmc_v8_0.h" > #include "gmc_v7_0.h" > + > #include "gfx_v8_0.h" > + > #include "sdma_v2_4.h" > #include "sdma_v3_0.h" > + > #include "dce_v10_0.h" > #include "dce_v11_0.h" > + > #include "iceland_ih.h" > #include "tonga_ih.h" > #include "cz_ih.h" > + > #include "uvd_v5_0.h" > #include "uvd_v6_0.h" > + > #include "vce_v3_0.h" > + > #if defined(CONFIG_DRM_AMD_ACP)> #include "amdgpu_acp.h" > #endif What is the reason for these changes? Unless this actually fixes some style warning, I'd drop this change. Alex > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c 2025-03-24 18:20 ` Alex Deucher @ 2025-03-27 4:16 ` Alexandre Demers 2025-03-27 15:21 ` Alex Deucher 0 siblings, 1 reply; 11+ messages in thread From: Alexandre Demers @ 2025-03-27 4:16 UTC (permalink / raw) To: Alex Deucher; +Cc: amd-gfx On Mon, Mar 24, 2025 at 2:21 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > On Sat, Mar 22, 2025 at 2:48 PM Alexandre Demers > <alexandre.f.demers@gmail.com> wrote: > > > > Bring things on a single line and fix spacing. > > > > Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> > > --- > > 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/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > index f008615343c3..533851beb27c 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > @@ -3233,8 +3233,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { > > .set_powergating_state = dce_v8_0_set_powergating_state, > > }; > > > > -static void > > -dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > > +static void dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > > struct drm_display_mode *mode, > > struct drm_display_mode *adjusted_mode) > > { > > @@ -3330,8 +3329,7 @@ static void dce_v8_0_ext_commit(struct drm_encoder *encoder) > > > > } > > > > -static void > > -dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > > +static void dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > > struct drm_display_mode *mode, > > struct drm_display_mode *adjusted_mode) > > { > > @@ -3343,8 +3341,7 @@ static void dce_v8_0_ext_disable(struct drm_encoder *encoder) > > > > } > > > > -static void > > -dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > > +static void dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > > { > > > > } > > @@ -3407,7 +3404,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, > > amdgpu_encoder->devices |= supported_device; > > return; > > } > > - > > } > > > > /* add a new one */ > > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > > index a83505815d39..bcabcf27c3d0 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > > @@ -61,19 +61,27 @@ > > > > #include "vid.h" > > #include "vi.h" > > + > > #include "gmc_v8_0.h" > > #include "gmc_v7_0.h" > > + > > #include "gfx_v8_0.h" > > + > > #include "sdma_v2_4.h" > > #include "sdma_v3_0.h" > > + > > #include "dce_v10_0.h" > > #include "dce_v11_0.h" > > + > > #include "iceland_ih.h" > > #include "tonga_ih.h" > > #include "cz_ih.h" > > + > > #include "uvd_v5_0.h" > > #include "uvd_v6_0.h" > > + > > #include "vce_v3_0.h" > > + > > #if defined(CONFIG_DRM_AMD_ACP)> #include "amdgpu_acp.h" > > #endif > > What is the reason for these changes? Unless this actually fixes some > style warning, I'd drop this change. > > Alex > Readability. Nothing more, nothing less. I'm leaving this up to you to decide if you want it in or not. Alexandre > > > -- > > 2.49.0 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c 2025-03-27 4:16 ` Alexandre Demers @ 2025-03-27 15:21 ` Alex Deucher 0 siblings, 0 replies; 11+ messages in thread From: Alex Deucher @ 2025-03-27 15:21 UTC (permalink / raw) To: Alexandre Demers; +Cc: amd-gfx On Thu, Mar 27, 2025 at 12:16 AM Alexandre Demers <alexandre.f.demers@gmail.com> wrote: > > On Mon, Mar 24, 2025 at 2:21 PM Alex Deucher <alexdeucher@gmail.com> wrote: > > > > On Sat, Mar 22, 2025 at 2:48 PM Alexandre Demers > > <alexandre.f.demers@gmail.com> wrote: > > > > > > Bring things on a single line and fix spacing. > > > > > > Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> > > > --- > > > 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/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > > index f008615343c3..533851beb27c 100644 > > > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > > > @@ -3233,8 +3233,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { > > > .set_powergating_state = dce_v8_0_set_powergating_state, > > > }; > > > > > > -static void > > > -dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > > > +static void dce_v8_0_encoder_mode_set(struct drm_encoder *encoder, > > > struct drm_display_mode *mode, > > > struct drm_display_mode *adjusted_mode) > > > { > > > @@ -3330,8 +3329,7 @@ static void dce_v8_0_ext_commit(struct drm_encoder *encoder) > > > > > > } > > > > > > -static void > > > -dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > > > +static void dce_v8_0_ext_mode_set(struct drm_encoder *encoder, > > > struct drm_display_mode *mode, > > > struct drm_display_mode *adjusted_mode) > > > { > > > @@ -3343,8 +3341,7 @@ static void dce_v8_0_ext_disable(struct drm_encoder *encoder) > > > > > > } > > > > > > -static void > > > -dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > > > +static void dce_v8_0_ext_dpms(struct drm_encoder *encoder, int mode) > > > { > > > > > > } > > > @@ -3407,7 +3404,6 @@ static void dce_v8_0_encoder_add(struct amdgpu_device *adev, > > > amdgpu_encoder->devices |= supported_device; > > > return; > > > } > > > - > > > } > > > > > > /* add a new one */ > > > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > > > index a83505815d39..bcabcf27c3d0 100644 > > > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > > > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > > > @@ -61,19 +61,27 @@ > > > > > > #include "vid.h" > > > #include "vi.h" > > > + > > > #include "gmc_v8_0.h" > > > #include "gmc_v7_0.h" > > > + > > > #include "gfx_v8_0.h" > > > + > > > #include "sdma_v2_4.h" > > > #include "sdma_v3_0.h" > > > + > > > #include "dce_v10_0.h" > > > #include "dce_v11_0.h" > > > + > > > #include "iceland_ih.h" > > > #include "tonga_ih.h" > > > #include "cz_ih.h" > > > + > > > #include "uvd_v5_0.h" > > > #include "uvd_v6_0.h" > > > + > > > #include "vce_v3_0.h" > > > + > > > #if defined(CONFIG_DRM_AMD_ACP)> #include "amdgpu_acp.h" > > > #endif > > > > What is the reason for these changes? Unless this actually fixes some > > style warning, I'd drop this change. > > > > Alex > > > Readability. Nothing more, nothing less. I'm leaving this up to you to > decide if you want it in or not. Can you drop this hunk when you send your next respin? Alex > Alexandre > > > > > -- > > > 2.49.0 > > > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-03-27 15:21 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers 2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers 2025-03-24 18:23 ` Alex Deucher 2025-03-22 18:37 ` [PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA Alexandre Demers 2025-03-22 18:37 ` [PATCH 3/5] drm/amdgpu: small cleanup to " Alexandre Demers 2025-03-22 18:37 ` [PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 Alexandre Demers 2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers 2025-03-22 18:46 ` Alexandre Demers 2025-03-24 18:20 ` Alex Deucher 2025-03-27 4:16 ` Alexandre Demers 2025-03-27 15:21 ` Alex Deucher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox