[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMeQTsakb6A4A60HjmhjNeuUTw=wM2O78t+_LoXpEfNSi7Hicw@mail.gmail.com>
Date: Thu, 25 Feb 2016 15:09:58 +0100
From: Patrik Jakobsson <patrik.r.jakobsson@...il.com>
To: Daniel Wagner <daniel.wagner@...-carit.de>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
Hi Daniel,
A patch to fix this is already merged into drm-misc:
commit db9b60400f9253c25ae639797df2d0ff7a35d9d8
Author: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Date: Tue Feb 2 11:35:55 2016 +0530
drm/gma500: remove helper function
We were getting build warning about:
drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
from incompatible pointer type
The callback to dpms was pointing to a helper function which had a
return type of void, whereas the callback should point to a function
which has a return type of int.
On closer look it turned out that we do not need the helper function
since if we call drm_helper_connector_dpms() directly, the first check
that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
Thanks
Patrik
On Thu, Feb 18, 2016 at 3:58 PM, Daniel Wagner
<daniel.wagner@...-carit.de> wrote:
> 9a69a9ac20f7 ("drm: Make the connector dpms callback
> return a value, v2.") wants mdfld_dsi_connector_dpms to return
> a value.
>
> This fixes also a new gcc 5.2 warning:
>
> drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:39: warning: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
> .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> ^
> Signed-off-by: Daniel Wagner <daniel.wagner@...-carit.de>
> ---
> drivers/gpu/drm/gma500/mdfld_dsi_output.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> index d758f4c..407b9bb 100644
> --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> @@ -382,14 +382,14 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
> return MODE_OK;
> }
>
> -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> +static int mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> {
> if (mode == connector->dpms)
> - return;
> + return 0;
>
> /*first, execute dpms*/
>
> - drm_helper_connector_dpms(connector, mode);
> + return drm_helper_connector_dpms(connector, mode);
> }
>
> static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> @@ -404,7 +404,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
>
> /*DSI connector funcs*/
> static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
> - .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> + .dpms = mdfld_dsi_connector_dpms,
> .detect = mdfld_dsi_connector_detect,
> .fill_modes = drm_helper_probe_single_connector_modes,
> .set_property = mdfld_dsi_connector_set_property,
> --
> 2.5.0
Powered by blists - more mailing lists