Re: [PATCH] drm/panel: panasonic-vvx10f034n00: Fix wuxga_nt_panel_disable() return value

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

 



Hi Sean,

On 01/16/2018 11:22 PM, Sean Paul wrote:
> Return value for mipi_dsi_shutdown_peripheral() is unchecked.
> Check it and return any errors if they come up. Even if
> mipi_dsi_shutdown_peripheral() fails, continue attempting to
> disable.
> 
> Cc: Philippe Cornu <philippe.cornu@xxxxxx>
> Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
> ---
>   drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> index 7f915f706fa6..91dc5a6b14f9 100644
> --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> @@ -72,11 +72,12 @@ static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
>   static int wuxga_nt_panel_disable(struct drm_panel *panel)
>   {
>   	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
> +	int ret;
>   
>   	if (!wuxga_nt->enabled)
>   		return 0;
>   
> -	mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
> +	ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
>   
>   	if (wuxga_nt->backlight) {
>   		wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
> @@ -86,7 +87,7 @@ static int wuxga_nt_panel_disable(struct drm_panel *panel)
>   
>   	wuxga_nt->enabled = false;
>   
> -	return 0;
> +	return ret;
>   }
>   
>   static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
> 

Many thanks for the patch.

I agree it is better to continue attempting to disable if 
mipi_dsi_shutdown_peripheral() fails.

Looking more in details in this driver:
* backlight_update_status() may also use a ret value...
* wuxga_nt_panel_on() should simply do "return 
mipi_dsi_turn_on_peripheral(dsi);"
... but it is not really part of your patch (and mine initially), maybe 
TODOs for later : )


Reviewed-by: Philippe Cornu <philippe.cornu@xxxxxx>

Philippe :-)
_______________________________________________
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