[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2c8949f5-0721-0a87-bfda-c483ebda9856@amd.com>
Date: Tue, 24 Apr 2018 10:21:56 -0400
From: Harry Wentland <harry.wentland@....com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
linux-kernel@...r.kernel.org
Cc: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
Michel Dänzer <michel.daenzer@....com>,
Dave Airlie <airlied@...hat.com>,
Samuel Li <Samuel.Li@....com>,
Himanshu Jha <himanshujha199640@...il.com>,
Jani Nikula <jani.nikula@...el.com>,
Lukas Wunner <lukas@...ner.de>,
Keith Packard <keithp@...thp.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Monk Liu <Monk.Liu@....com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Peter Rosin <peda@...ntia.se>,
Andrey Grodzovsky <andrey.grodzovsky@....com>,
Tony Cheng <Tony.Cheng@....com>,
"Leo (Sunpeng) Li" <sunpeng.li@....com>,
Shirish S <shirish.s@....com>,
"Jerry (Fangzhi) Zuo" <Jerry.Zuo@....com>,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm/admgpu: fix mode_valid's return type
On 2018-04-24 09:14 AM, Luc Van Oostenryck wrote:
> The method struct drm_connector_helper_funcs::mode_valid is defined
> as returning an 'enum drm_mode_status' but the driver implementation
> for this method uses an 'int' for it.
>
> Fix this by using 'enum drm_mode_status' in the driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
amd-gfx mailing list should be sufficient for changes like these.
Reviewed-by: Harry Wentland <harry.wentland@....com>
Harry
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 8 ++++----
> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +-
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> index 96501ff0e..8e66851eb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> @@ -691,7 +691,7 @@ static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector)
> return ret;
> }
>
> -static int amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector);
> @@ -843,7 +843,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector)
> return ret;
> }
>
> -static int amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> struct drm_device *dev = connector->dev;
> @@ -1172,7 +1172,7 @@ static void amdgpu_connector_dvi_force(struct drm_connector *connector)
> amdgpu_connector->use_digital = true;
> }
>
> -static int amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> struct drm_device *dev = connector->dev;
> @@ -1448,7 +1448,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
> return ret;
> }
>
> -static int amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index b51f05dc9..476c9b987 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -329,7 +329,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)
> return 0;
> }
>
> -static int dce_virtual_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status dce_virtual_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> return MODE_OK;
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 4e2f379ce..d7e52c4f6 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2855,7 +2855,7 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
> create_eml_sink(aconnector);
> }
>
> -int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
> +enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> int result = MODE_ERROR;
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
> index b68400c11..cb7e20cb3 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
> @@ -246,7 +246,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
> struct dc_link *link,
> int link_index);
>
> -int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
> +enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode);
>
> void dm_restore_drm_connector_state(struct drm_device *dev,
>
Powered by blists - more mailing lists