2022-02-22 15:04:51

by Maíra Canal

[permalink] [raw]
Subject: [PATCH 00/10] Fix multiple compilation warnings

This patchset intends to deal with a couple of warnings in the AMD graphic
drivers. All warnings were generated with Clang and W=1 flag.

Maíra Canal (10):
drm/amdgpu: Change amdgpu_ras_block_late_init_default function scope
drm/amdgpu: Remove tmp unused variable
drm/amdgpu: Remove unused get_umc_v8_7_channel_index function
drm/amd/display: Remove unused temp variable
drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk
function
drm/amd/display: Remove vupdate_int_entry definition
drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variable
drm/amd/display: Remove unused variable
drm/amd/display: Add missing prototypes to dcn201_init
drm/amd/display: Turn global functions into static functions

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +---
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +---
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 7 -------
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
.../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 3 ++-
.../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 2 +-
.../amd/display/dc/clk_mgr/dcn316/dcn316_smu.c | 18 +-----------------
.../gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
.../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ---
.../drm/amd/display/dc/dcn201/dcn201_init.c | 1 +
.../display/dc/irq/dcn20/irq_service_dcn20.c | 2 +-
.../display/dc/irq/dcn201/irq_service_dcn201.c | 5 -----
.../display/dc/irq/dcn21/irq_service_dcn21.c | 14 --------------
.../display/dc/irq/dcn30/irq_service_dcn30.c | 2 +-
.../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 5 +----
17 files changed, 15 insertions(+), 65 deletions(-)

--
2.35.1


2022-02-22 15:25:01

by Maíra Canal

[permalink] [raw]
Subject: [PATCH 05/10] drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk function

Remove dcn316_smu_set_voltage_via_phyclk function, which is not used in the
codebase.

This was pointed by clang with the following warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_smu.c:171:5:
warning: no previous prototype for function
'dcn316_smu_set_voltage_via_phyclk' [-Wmissing-prototypes]
int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int
requested_phyclk_khz)
^

Signed-off-by: Maíra Canal <[email protected]>
---
.../amd/display/dc/clk_mgr/dcn316/dcn316_smu.c | 16 ----------------
1 file changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
index b7f9e1b34c11..fd6497fd2dc5 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
@@ -168,22 +168,6 @@ int dcn316_smu_set_dispclk(struct clk_mgr_internal *clk_mgr, int requested_dispc
return actual_dispclk_set_mhz * 1000;
}

-int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int requested_phyclk_khz)
-{
- int actual_phypclk_set_mhz = -1;
-
- if (!clk_mgr->smu_present && requested_phyclk_khz)
- return requested_phyclk_khz;
-
- /* Unit of SMU msg parameter is Mhz */
- actual_phypclk_set_mhz = dcn316_smu_send_msg_with_param(
- clk_mgr,
- VBIOSSMC_MSG_SetPhyclkVoltageByFreq,
- khz_to_mhz_ceil(requested_phyclk_khz));
-
- return actual_phypclk_set_mhz * 1000;
-}
-
int dcn316_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int requested_dcfclk_khz)
{
int actual_dcfclk_set_mhz = -1;
--
2.35.1

2022-02-22 15:49:56

by Maíra Canal

[permalink] [raw]
Subject: [PATCH 06/10] drm/amd/display: Remove vupdate_int_entry definition

Remove the vupdate_int_entry definition and utilization to avoid the
following warning by Clang:

drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(0),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:404:2:
note: previous initialization is here
vupdate_int_entry(0),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:411:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(1),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:405:2:
note: previous initialization is here
vupdate_int_entry(1),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:412:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(2),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:406:2:
note: previous initialization is here
vupdate_int_entry(2),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:413:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(3),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:407:2:
note: previous initialization is here
vupdate_int_entry(3),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:414:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(4),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:408:2:
note: previous initialization is here
vupdate_int_entry(4),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:415:2:
warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
vupdate_no_lock_int_entry(5),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
note: expanded from macro 'vupdate_no_lock_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:409:2:
note: previous initialization is here
vupdate_int_entry(5),
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
note: expanded from macro 'vupdate_int_entry'
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
^~
6 warnings generated.

fixes: 688f97ed ("drm/amd/display: Add vupdate_no_lock interrupts for
DCN2.1")

Signed-off-by: Maíra Canal <[email protected]>
---
.../amd/display/dc/irq/dcn21/irq_service_dcn21.c | 14 --------------
1 file changed, 14 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
index 0f15bcada4e9..717977aec6d0 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
@@ -265,14 +265,6 @@ static const struct irq_source_info_funcs vline0_irq_info_funcs = {
.funcs = &pflip_irq_info_funcs\
}

-#define vupdate_int_entry(reg_num)\
- [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
- IRQ_REG_ENTRY(OTG, reg_num,\
- OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\
- OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\
- .funcs = &vblank_irq_info_funcs\
- }
-
/* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic
* of DCE's DC_IRQ_SOURCE_VUPDATEx.
*/
@@ -401,12 +393,6 @@ irq_source_info_dcn21[DAL_IRQ_SOURCES_NUMBER] = {
dc_underflow_int_entry(6),
[DC_IRQ_SOURCE_DMCU_SCP] = dummy_irq_entry(),
[DC_IRQ_SOURCE_VBIOS_SW] = dummy_irq_entry(),
- vupdate_int_entry(0),
- vupdate_int_entry(1),
- vupdate_int_entry(2),
- vupdate_int_entry(3),
- vupdate_int_entry(4),
- vupdate_int_entry(5),
vupdate_no_lock_int_entry(0),
vupdate_no_lock_int_entry(1),
vupdate_no_lock_int_entry(2),
--
2.35.1

2022-02-22 17:04:48

by Maíra Canal

[permalink] [raw]
Subject: [PATCH 09/10] drm/amd/display: Add missing prototypes to dcn201_init

Include the header with the prototype to silence the following clang
warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_init.c:127:6:
warning: no previous prototype for function 'dcn201_hw_sequencer_construct'
[-Wmissing-prototypes]
void dcn201_hw_sequencer_construct(struct dc *dc)
^

Signed-off-by: Maíra Canal <[email protected]>
---
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
index f1f89f93603f..1826dd7f3da1 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
@@ -27,6 +27,7 @@
#include "dcn10/dcn10_hw_sequencer.h"
#include "dcn20/dcn20_hwseq.h"
#include "dcn201_hwseq.h"
+#include "dcn201_init.h"

static const struct hw_sequencer_funcs dcn201_funcs = {
.program_gamut_remap = dcn10_program_gamut_remap,
--
2.35.1

2022-02-22 17:59:29

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 05/10] drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk function

Applied. Thanks!

Alex

On Tue, Feb 22, 2022 at 8:18 AM Maíra Canal <[email protected]> wrote:
>
> Remove dcn316_smu_set_voltage_via_phyclk function, which is not used in the
> codebase.
>
> This was pointed by clang with the following warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_smu.c:171:5:
> warning: no previous prototype for function
> 'dcn316_smu_set_voltage_via_phyclk' [-Wmissing-prototypes]
> int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int
> requested_phyclk_khz)
> ^
>
> Signed-off-by: Maíra Canal <[email protected]>
> ---
> .../amd/display/dc/clk_mgr/dcn316/dcn316_smu.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
> index b7f9e1b34c11..fd6497fd2dc5 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
> @@ -168,22 +168,6 @@ int dcn316_smu_set_dispclk(struct clk_mgr_internal *clk_mgr, int requested_dispc
> return actual_dispclk_set_mhz * 1000;
> }
>
> -int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int requested_phyclk_khz)
> -{
> - int actual_phypclk_set_mhz = -1;
> -
> - if (!clk_mgr->smu_present && requested_phyclk_khz)
> - return requested_phyclk_khz;
> -
> - /* Unit of SMU msg parameter is Mhz */
> - actual_phypclk_set_mhz = dcn316_smu_send_msg_with_param(
> - clk_mgr,
> - VBIOSSMC_MSG_SetPhyclkVoltageByFreq,
> - khz_to_mhz_ceil(requested_phyclk_khz));
> -
> - return actual_phypclk_set_mhz * 1000;
> -}
> -
> int dcn316_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int requested_dcfclk_khz)
> {
> int actual_dcfclk_set_mhz = -1;
> --
> 2.35.1
>

2022-02-22 18:33:31

by Maíra Canal

[permalink] [raw]
Subject: [PATCH 07/10] drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variable

Remove the unused struct irq_source_info_funcs
dmub_outbox_irq_info_funcs from the file, which was declared but never
hooked up.

This was pointed by clang with the following warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:141:43:
warning: unused variable 'dmub_outbox_irq_info_funcs'
[-Wunused-const-variable]
static const struct irq_source_info_funcs dmub_outbox_irq_info_funcs = {
^

Signed-off-by: Maíra Canal <[email protected]>
---
.../gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c b/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
index aa708b61142f..45f99351a0ab 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c
@@ -138,11 +138,6 @@ static const struct irq_source_info_funcs vupdate_no_lock_irq_info_funcs = {
.ack = NULL
};

-static const struct irq_source_info_funcs dmub_outbox_irq_info_funcs = {
- .set = NULL,
- .ack = NULL
-};
-
#undef BASE_INNER
#define BASE_INNER(seg) DMU_BASE__INST0_SEG ## seg

--
2.35.1

2022-02-22 20:36:15

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 06/10] drm/amd/display: Remove vupdate_int_entry definition

Applied. Thanks!

Alex

On Tue, Feb 22, 2022 at 8:18 AM Maíra Canal <[email protected]> wrote:
>
> Remove the vupdate_int_entry definition and utilization to avoid the
> following warning by Clang:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(0),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:404:2:
> note: previous initialization is here
> vupdate_int_entry(0),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:411:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(1),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:405:2:
> note: previous initialization is here
> vupdate_int_entry(1),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:412:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(2),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:406:2:
> note: previous initialization is here
> vupdate_int_entry(2),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:413:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(3),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:407:2:
> note: previous initialization is here
> vupdate_int_entry(3),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:414:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(4),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:408:2:
> note: previous initialization is here
> vupdate_int_entry(4),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:415:2:
> warning: initializer overrides prior initialization of this subobject
> [-Winitializer-overrides]
> vupdate_no_lock_int_entry(5),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:
> note: expanded from macro 'vupdate_no_lock_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:409:2:
> note: previous initialization is here
> vupdate_int_entry(5),
> ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:
> note: expanded from macro 'vupdate_int_entry'
> [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> ^~
> 6 warnings generated.
>
> fixes: 688f97ed ("drm/amd/display: Add vupdate_no_lock interrupts for
> DCN2.1")
>
> Signed-off-by: Maíra Canal <[email protected]>
> ---
> .../amd/display/dc/irq/dcn21/irq_service_dcn21.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
> index 0f15bcada4e9..717977aec6d0 100644
> --- a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
> +++ b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
> @@ -265,14 +265,6 @@ static const struct irq_source_info_funcs vline0_irq_info_funcs = {
> .funcs = &pflip_irq_info_funcs\
> }
>
> -#define vupdate_int_entry(reg_num)\
> - [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
> - IRQ_REG_ENTRY(OTG, reg_num,\
> - OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\
> - OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\
> - .funcs = &vblank_irq_info_funcs\
> - }
> -
> /* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic
> * of DCE's DC_IRQ_SOURCE_VUPDATEx.
> */
> @@ -401,12 +393,6 @@ irq_source_info_dcn21[DAL_IRQ_SOURCES_NUMBER] = {
> dc_underflow_int_entry(6),
> [DC_IRQ_SOURCE_DMCU_SCP] = dummy_irq_entry(),
> [DC_IRQ_SOURCE_VBIOS_SW] = dummy_irq_entry(),
> - vupdate_int_entry(0),
> - vupdate_int_entry(1),
> - vupdate_int_entry(2),
> - vupdate_int_entry(3),
> - vupdate_int_entry(4),
> - vupdate_int_entry(5),
> vupdate_no_lock_int_entry(0),
> vupdate_no_lock_int_entry(1),
> vupdate_no_lock_int_entry(2),
> --
> 2.35.1
>

2022-02-22 23:50:32

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 09/10] drm/amd/display: Add missing prototypes to dcn201_init

Applied. Thanks!

On Tue, Feb 22, 2022 at 8:18 AM Maíra Canal <[email protected]> wrote:
>
> Include the header with the prototype to silence the following clang
> warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_init.c:127:6:
> warning: no previous prototype for function 'dcn201_hw_sequencer_construct'
> [-Wmissing-prototypes]
> void dcn201_hw_sequencer_construct(struct dc *dc)
> ^
>
> Signed-off-by: Maíra Canal <[email protected]>
> ---
> drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
> index f1f89f93603f..1826dd7f3da1 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c
> @@ -27,6 +27,7 @@
> #include "dcn10/dcn10_hw_sequencer.h"
> #include "dcn20/dcn20_hwseq.h"
> #include "dcn201_hwseq.h"
> +#include "dcn201_init.h"
>
> static const struct hw_sequencer_funcs dcn201_funcs = {
> .program_gamut_remap = dcn10_program_gamut_remap,
> --
> 2.35.1
>