Re: [PATCH] drm/panel: boe-himax8279d: use drm_panel backlight support

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

 



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@xxxxxxxxx>
> Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux