From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8A78C76191 for ; Fri, 26 Jul 2019 10:15:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8869D22C97 for ; Fri, 26 Jul 2019 10:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbfGZKPR (ORCPT ); Fri, 26 Jul 2019 06:15:17 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:57675 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfGZKPQ (ORCPT ); Fri, 26 Jul 2019 06:15:16 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 7F69B2003C; Fri, 26 Jul 2019 12:15:14 +0200 (CEST) Date: Fri, 26 Jul 2019 12:15:13 +0200 From: Sam Ravnborg 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 Subject: Re: [PATCH 2/3] drm/panel: jh057n00900: Move mipi_dsi_dcs_set_display_off to disable() Message-ID: <20190726101513.GA15658@ravnborg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=8nJEP1OIZ-IA:10 a=ze386MxoAAAA:8 a=5NzjFCevEPO7GEHoP-oA:9 a=wPNLvfGTeEIA:10 a=iBZjaW-pnkserzjvUTHh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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