mirror_ubuntu-kernels/drivers/gpu/drm/amd/display/dc
Nathan Chancellor 5ab5e4e60a drm/amd/display: Add a conversion function for transmitter and phy_id enums
Clang warns:

../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2520:42:
error: implicit conversion from enumeration type 'enum transmitter' to
different enumeration type 'enum physical_phy_id'
[-Werror,-Wenum-conversion]
        psr_context->smuPhyId = link->link_enc->transmitter;
                              ~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~
1 error generated.

As the comment above this assignment states, this is intentional. To
match previous warnings of this nature, add a conversion function that
explicitly converts between the enums and warns when there is a
mismatch.

See commit 828cfa2909 ("drm/amdgpu: Fix amdgpu ras to ta enums
conversion") and commit d9ec5cfd5a ("drm/amd/display: Use switch table
for dc_to_smu_clock_type") for previous examples of this.

v2: use PHYLD_UNKNOWN for the default case.

Fixes: e0d08a40a6 ("drm/amd/display: Add debugfs entry for reading psr state")
Link: https://github.com/ClangBuiltLinux/linux/issues/758
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-10-30 11:07:13 -04:00
..
basics drm/amd: drop use of drmp.h in os_types.h 2019-06-10 22:59:45 +02:00
bios drm/amd/display: Use swap() where appropriate 2019-10-10 19:39:06 -05:00
calcs drm/amd/display: Implement voltage limitation for dali 2019-09-16 10:06:48 -05:00
clk_mgr drm/amd/display: Make clk mgr the only dto update point 2019-10-25 16:50:09 -04:00
core drm/amd/display: Add a conversion function for transmitter and phy_id enums 2019-10-30 11:07:13 -04:00
dce drm/amd/display: remove gcc warning Wunused-but-set-variable 2019-10-28 11:19:00 -04:00
dce80 drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x 2019-10-25 16:50:09 -04:00
dce100 drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x 2019-10-25 16:50:09 -04:00
dce110 drm/amd/display: take signal type from link 2019-10-25 16:50:09 -04:00
dce112 drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x 2019-10-25 16:50:09 -04:00
dce120 drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x 2019-10-25 16:50:09 -04:00
dcn10 drm/amd/display: move wm ranges reporting to end of init hw 2019-10-25 16:50:09 -04:00
dcn20 drm/amd/display: Change Navi14's DWB flag to 1 2019-10-25 16:50:10 -04:00
dcn21 drm/amd/display: fix hubbub deadline programing 2019-10-25 16:50:09 -04:00
dml drm/amd/display: Apply vactive dram clock change workaround to dcn2 DMLv2 2019-10-25 16:50:09 -04:00
dsc drm/amd/display: Remove set but not used variable 'source_bpp' 2019-10-07 15:10:34 -05:00
gpio drm/amd/display: remove hw access from dc_destroy 2019-09-13 18:02:52 -05:00
hdcp drm/amd/display: remove redundant null pointer check before kfree 2019-10-30 11:07:13 -04:00
inc drm/amd/display: move wm ranges reporting to end of init hw 2019-10-25 16:50:09 -04:00
irq drm/amd/display: Add Renoir irq_services (v2) 2019-08-29 15:52:33 -05:00
virtual drm/amd/display: reset hdmi tmds rate and data scramble on pipe reset 2019-08-15 10:52:59 -05:00
dc_bios_types.h drm/amd/display: make firmware info only load once during dc_bios create 2019-08-15 10:53:36 -05:00
dc_ddc_types.h drm/amd/display: Proper return of result when aux engine acquire fails 2019-10-25 16:50:09 -04:00
dc_dp_types.h drm/amd/display: Synchronous DisplayPort Link Training 2019-08-15 10:53:30 -05:00
dc_dsc.h drm/amd/display: Isolate DSC module from driver dependencies 2019-09-13 18:03:13 -05:00
dc_helper.c drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dc_hw_types.h drm/amd/display: Added pixel dynamic expansion control. 2019-10-10 19:24:26 -05:00
dc_link.h drm/amd/display: exit PSR during detection 2019-10-10 19:33:07 -05:00
dc_stream.h drm/amd/display: Added pixel dynamic expansion control. 2019-10-10 19:24:26 -05:00
dc_types.h drm/amd/display: Update hdcp display config 2019-10-03 09:10:58 -05:00
dc.h drm/amd/display: 3.2.56 2019-10-25 16:50:09 -04:00
dm_cp_psp.h drm/amd/display: Update hdcp display config 2019-10-03 09:10:58 -05:00
dm_event_log.h drm/amd/display: Add customizable tracing event 2018-11-30 12:02:49 -05:00
dm_helpers.h drm/amd/display: Don't allocate payloads if link lost 2019-09-13 17:55:01 -05:00
dm_pp_smu.h drm/amd/display: fix number of dcn21 dpm clock levels 2019-10-25 16:50:08 -04:00
dm_services_types.h drm/amd/display: PPLIB Hookup 2019-03-05 15:09:32 -05:00
dm_services.h drm/amd/display: refactor dump_clk_registers 2019-07-18 14:18:09 -05:00
irq_types.h drm/amd/display: Add Vline1 interrupt source to InterruptManager 2019-01-28 11:44:10 -05:00
Makefile drm/amd/display: Add HDCP module 2019-10-03 09:10:58 -05:00
os_types.h drm/amd: drop use of drmp.h in os_types.h 2019-06-10 22:59:45 +02:00