AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: "Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"David Galiffi" <david.galiffi@amd.com>,
	"Jun Lei" <Jun.Lei@amd.com>
Cc: Aric Cyr <aric.cyr@amd.com>, Martin Tsai <martin.tsai@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	Wenjing Liu <wenjing.liu@amd.com>,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	Hersen Wu <hersenxs.wu@amd.com>,
	dri-devel@lists.freedesktop.org,
	abdoulaye berthe <abdoulaye.berthe@amd.com>,
	David Galiffi <David.Galiffi@amd.com>,
	jinlong zhang <jinlong.zhang@amd.com>
Subject: [PATCH 2/5] drm/amdgpu: fix incorrect enum type
Date: Mon, 26 Oct 2020 22:00:30 +0100	[thread overview]
Message-ID: <20201026210039.3884312-2-arnd@kernel.org> (raw)
In-Reply-To: <20201026210039.3884312-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

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 'enum 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>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index ff1e9963ec7a..98464886341f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -4230,7 +4230,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
 
 		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;
@@ -4240,7 +4240,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
 				&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 "
-- 
2.27.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-10-26 21:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 21:00 [PATCH 1/5] drm/amdgpu: fix enum mismatches Arnd Bergmann
2020-10-26 21:00 ` Arnd Bergmann [this message]
2020-10-30  3:44   ` [PATCH 2/5] drm/amdgpu: fix incorrect enum type Alex Deucher
2020-10-26 21:00 ` [PATCH 3/5] drm/amdgpu: fix enum odm_combine_mode mismatch Arnd Bergmann
2020-10-26 21:00 ` [PATCH 4/5] drm/amdgpu: fix build_coefficients() argument Arnd Bergmann
2020-10-30  3:53   ` Alex Deucher
2020-10-30 17:04     ` Harry Wentland
2020-10-30 17:45       ` Alex Deucher
2020-10-26 21:00 ` [PATCH 5/5] drm/amdgpu: disable -Woverride-init warning Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026210039.3884312-2-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=Jun.Lei@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=abdoulaye.berthe@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aric.cyr@amd.com \
    --cc=arnd@arndb.de \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=david.galiffi@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=jinlong.zhang@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.tsai@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=wenjing.liu@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox