Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/amd/display/dc/core amdgpu: F...



details:   https://anonhg.NetBSD.org/src/rev/926d2f36f24c
branches:  trunk
changeset: 1028583:926d2f36f24c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:22:40 2021 +0000

description:
amdgpu: Fix bogus enum.

Cherry-picked from:

commit a110f3750bf8b93764f13bd1402c7cba03d15d61
Author: Arnd Bergmann <arnd%arndb.de@localhost>
Date:   Mon Oct 26 22:00:30 2020 +0100

    drm/amdgpu: fix incorrect enum type

    core_link_write_dpcd() returns enum dc_status, not ddc_result:

    display/dc/core/dc_link_dp.c: In function 'dp_set_panel_mode':
    display/dc/core/dc_link_dp.c:4237:11: warning: implicit conversion from 'enu
m dc_status' to 'enum ddc_result'
    [-Wenum-conversion]

    Avoid the warning by using the correct enum in the caller.

    Fixes: 0b226322434c ("drm/amd/display: Synchronous DisplayPort Link Training")
    Signed-off-by: Arnd Bergmann <arnd%arndb.de@localhost>
    Signed-off-by: Alex Deucher <alexander.deucher%amd.com@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_dp.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 8c382cbef02c -r 926d2f36f24c sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_dp.c
--- a/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_dp.c    Sun Dec 19 11:22:31 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_link_dp.c    Sun Dec 19 11:22:40 2021 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: amdgpu_dc_link_dp.c,v 1.4 2021/12/19 10:59:36 riastradh Exp $  */
+/*     $NetBSD: amdgpu_dc_link_dp.c,v 1.5 2021/12/19 11:22:40 riastradh Exp $  */
 
 /* Copyright 2015 Advanced Micro Devices, Inc. */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_link_dp.c,v 1.4 2021/12/19 10:59:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dc_link_dp.c,v 1.5 2021/12/19 11:22:40 riastradh Exp $");
 
 #include "dm_services.h"
 #include "dc.h"
@@ -4010,7 +4010,7 @@
 
                if (edp_config_set.bits.PANEL_MODE_EDP
                        != panel_mode_edp) {
-                       enum ddc_result result = DDC_RESULT_UNKNOWN;
+                       enum dc_status result = DC_ERROR_UNEXPECTED;
 
                        edp_config_set.bits.PANEL_MODE_EDP =
                        panel_mode_edp;
@@ -4020,7 +4020,7 @@
                                &edp_config_set.raw,
                                sizeof(edp_config_set.raw));
 
-                       ASSERT(result == DDC_RESULT_SUCESSFULL);
+                       ASSERT(result == DC_OK);
                }
        }
        DC_LOG_DETECTION_DP_CAPS("Link: %d eDP panel mode supported: %d "



Home | Main Index | Thread Index | Old Index