dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jerry Han <jerry.han.hq@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/panel: boe-himax8279d: use drm_panel backlight support
Date: Thu, 12 Dec 2019 10:54:16 +0100	[thread overview]
Message-ID: <20191212095416.GB32429@ravnborg.org> (raw)
In-Reply-To: <20191212022614.14728-1-jerry.han.hq@gmail.com>

Hi Jerry.

On Thu, Dec 12, 2019 at 10:26:14AM +0800, Jerry Han wrote:
> Use the backlight support in drm_panel to simplify the driver
> 
> Signed-off-by: Jerry Han <jerry.han.hq@gmail.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  drivers/gpu/drm/panel/panel-boe-himax8279d.c | 17 +++--------------
>  1 file changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> index 65ea6f673cdb..3a6ee2069158 100644
> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> @@ -6,7 +6,6 @@
>   *
>   */
>  
> -#include <linux/backlight.h>
>  #include <linux/delay.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> @@ -47,7 +46,6 @@ struct panel_info {
>  	struct mipi_dsi_device *link;
>  	const struct panel_desc *desc;
>  
> -	struct backlight_device *backlight;
>  	struct gpio_desc *enable_gpio;
>  	struct gpio_desc *pp33_gpio;
>  	struct gpio_desc *pp18_gpio;
> @@ -93,8 +91,6 @@ static int boe_panel_disable(struct drm_panel *panel)
>  	if (!pinfo->enabled)
>  		return 0;
>  
> -	backlight_disable(pinfo->backlight);
> -
>  	err = mipi_dsi_dcs_set_display_off(pinfo->link);
>  	if (err < 0) {
>  		DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
> @@ -218,13 +214,6 @@ static int boe_panel_enable(struct drm_panel *panel)
>  		return ret;
>  	}
>  
> -	ret = backlight_enable(pinfo->backlight);
> -	if (ret) {
> -		DRM_DEV_ERROR(panel->drm->dev,
> -			      "Failed to enable backlight %d\n", ret);
> -		return ret;
> -	}
> -
>  	pinfo->enabled = true;
>  
>  	return 0;
> @@ -899,9 +888,9 @@ static int panel_add(struct panel_info *pinfo)
>  		return ret;
>  	}
>  
> -	pinfo->backlight = devm_of_find_backlight(dev);
> -	if (IS_ERR(pinfo->backlight))
> -		return PTR_ERR(pinfo->backlight);
> +	ret = drm_panel_of_backlight(&pinfo->base);
> +	if (ret)
> +		return ret;
>  
>  	drm_panel_init(&pinfo->base, dev, &panel_funcs,
>  		       DRM_MODE_CONNECTOR_DSI);

The patch looks good.
But we still need the original patch fixed so it can build.

Please resend a v11 that can build.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-12-12  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12  2:26 [PATCH] drm/panel: boe-himax8279d: use drm_panel backlight support Jerry Han
2019-12-12  9:54 ` Sam Ravnborg [this message]

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=20191212095416.GB32429@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jerry.han.hq@gmail.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