From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [PATCH 2/3] drm/panel: jh057n00900: Move mipi_dsi_dcs_set_display_off to disable() Date: Fri, 26 Jul 2019 12:15:13 +0200 Message-ID: <20190726101513.GA15658@ravnborg.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Guido =?iso-8859-1?Q?G=FCnther?= Cc: Purism Kernel Team , Thierry Reding , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Hi Guido. On Fri, Jul 26, 2019 at 11:21:42AM +0200, Guido Günther wrote: > This makes it symmetric with the panel init happening in enable(). > > Signed-off-by: Guido Günther > --- > drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c > index c6b4bfd79fde..cc89831e30a6 100644 > --- a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c > +++ b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c > @@ -158,19 +158,23 @@ static int jh057n_enable(struct drm_panel *panel) > static int jh057n_disable(struct drm_panel *panel) > { > struct jh057n *ctx = panel_to_jh057n(panel); > + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); > + int ret; > + > + ret = backlight_disable(ctx->backlight); > + if (ret < 0) > + return ret; We most likely do not want to skip mipi_dsi_dcs_set_display_off() just because we fail to disable backlight. Most other panels disable backlight without a check for the return value. Sam