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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3AE48C433EF for ; Fri, 10 Jun 2022 19:28:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBBF61125B0; Fri, 10 Jun 2022 19:28:38 +0000 (UTC) Received: from mailrelay3-1.pub.mailoutpod1-cph3.one.com (mailrelay3-1.pub.mailoutpod1-cph3.one.com [46.30.210.184]) by gabe.freedesktop.org (Postfix) with ESMTPS id 415811125B0 for ; Fri, 10 Jun 2022 19:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-transfer-encoding:content-type:mime-version:references: message-id:subject:cc:to:from:date:from; bh=yUY/DnIxjDue7wT95qIOB79riamGBEfZ96J6K/Td21w=; b=WbYF3yEuHjKi421BzbyY2CD+QL/rWS7WXaQK5nlcZ3rX7m3U8DyTwQpk2Hn1OnP++6xy9XuFn0+FD 9lrwb5CXeUCBjzcAg0JP1v3IMKHFgCsRFX7pYJnvjsVgNTvvVq77Qf6/W2PXd+PAO96H1krFVBHlZX RBQI/ukV7QE0XLMoak0abtoDLSct+W4Dt9l5+hgll4cYy9D9DSclmBDJpRziJ4jPX8eIn79YjFH+Ax 5GGRUEOrXPCxSa6Eo3yA5fCx96ENO2KDERmSdvviG9R83akUVq29lXMPpQa9bMD44ah23fG+Nv/tVA bLRxmanpnfL5AT05H/t93fBtDo+EJXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-transfer-encoding:content-type:mime-version:references: message-id:subject:cc:to:from:date:from; bh=yUY/DnIxjDue7wT95qIOB79riamGBEfZ96J6K/Td21w=; b=cp4Qer+Ca5vbaOZQ2RKoX1pcPPkX4ULqp1SNlb/2ByHWnkr93naQB1aJUJWVov1t5gilzSpvlUC9W BbJJXzEAg== X-HalOne-Cookie: 37fa42ebdd97f57a6e422a39d60d3a92bdb63160 X-HalOne-ID: 84985802-e8f3-11ec-be77-d0431ea8bb03 Received: from mailproxy4.cst.dirpod4-cph3.one.com (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) by mailrelay3.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 84985802-e8f3-11ec-be77-d0431ea8bb03; Fri, 10 Jun 2022 19:28:34 +0000 (UTC) Date: Fri, 10 Jun 2022 21:28:32 +0200 From: Sam Ravnborg To: Stephen Kitt Subject: Re: [PATCH 2/3] drm/panel: panel-dsi-cm: Use backlight helpers Message-ID: References: <20220607182026.1121992-1-steve@sk2.org> <20220607182026.1121992-3-steve@sk2.org> <20220609215236.ojxw6l2vkf652hgu@mercury.elektranox.org> <20220610194720.485cf7be@heffalump.sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220610194720.485cf7be@heffalump.sk2.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Thierry Reding , Sebastian Reichel , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Stephen. On Fri, Jun 10, 2022 at 07:47:20PM +0200, Stephen Kitt wrote: > Hi Sebastian, > > On Thu, 9 Jun 2022 23:52:36 +0200, Sebastian Reichel > wrote: > > On Tue, Jun 07, 2022 at 08:20:25PM +0200, Stephen Kitt wrote: > > > diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c > > > b/drivers/gpu/drm/panel/panel-dsi-cm.c index b58cb064975f..aa36dc6cedd3 > > > 100644 --- a/drivers/gpu/drm/panel/panel-dsi-cm.c > > > +++ b/drivers/gpu/drm/panel/panel-dsi-cm.c > > > @@ -86,16 +86,10 @@ static void dsicm_bl_power(struct panel_drv_data > > > *ddata, bool enable) return; > > > > > > if (enable) { > > > - backlight->props.fb_blank = FB_BLANK_UNBLANK; > > > - backlight->props.state = ~(BL_CORE_FBBLANK | > > > BL_CORE_SUSPENDED); > > > - backlight->props.power = FB_BLANK_UNBLANK; > > > + backlight_enable(backlight); > > > } else { > > > - backlight->props.fb_blank = FB_BLANK_NORMAL; > > > - backlight->props.power = FB_BLANK_POWERDOWN; > > > - backlight->props.state |= BL_CORE_FBBLANK | > > > BL_CORE_SUSPENDED; > > > + backlight_disable(backlight); > > > } > > > > The brackets can be removed now. Otherwise: > > > > > Reviewed-by: Sebastian Reichel > > Thanks, I’ll wait a little more to see if there are any other reviews of the > patches and then push a v2 with that fix. It would be very nice if you could kill all uses of FB_BLANK in the drivers/gpu/drm/panel/* drivers, and post them as one series. This is long overdue to introduce the backlight helpers. The three you posted is already a nice step forward, and there may be more panel drivers I have missed. Sam 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A914AC43334 for ; Fri, 10 Jun 2022 19:28:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347427AbiFJT2w (ORCPT ); Fri, 10 Jun 2022 15:28:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350550AbiFJT2j (ORCPT ); Fri, 10 Jun 2022 15:28:39 -0400 Received: from mailrelay3-1.pub.mailoutpod1-cph3.one.com (mailrelay3-1.pub.mailoutpod1-cph3.one.com [46.30.210.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E5BE1C78F9 for ; Fri, 10 Jun 2022 12:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-transfer-encoding:content-type:mime-version:references: message-id:subject:cc:to:from:date:from; bh=yUY/DnIxjDue7wT95qIOB79riamGBEfZ96J6K/Td21w=; b=WbYF3yEuHjKi421BzbyY2CD+QL/rWS7WXaQK5nlcZ3rX7m3U8DyTwQpk2Hn1OnP++6xy9XuFn0+FD 9lrwb5CXeUCBjzcAg0JP1v3IMKHFgCsRFX7pYJnvjsVgNTvvVq77Qf6/W2PXd+PAO96H1krFVBHlZX RBQI/ukV7QE0XLMoak0abtoDLSct+W4Dt9l5+hgll4cYy9D9DSclmBDJpRziJ4jPX8eIn79YjFH+Ax 5GGRUEOrXPCxSa6Eo3yA5fCx96ENO2KDERmSdvviG9R83akUVq29lXMPpQa9bMD44ah23fG+Nv/tVA bLRxmanpnfL5AT05H/t93fBtDo+EJXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-transfer-encoding:content-type:mime-version:references: message-id:subject:cc:to:from:date:from; bh=yUY/DnIxjDue7wT95qIOB79riamGBEfZ96J6K/Td21w=; b=cp4Qer+Ca5vbaOZQ2RKoX1pcPPkX4ULqp1SNlb/2ByHWnkr93naQB1aJUJWVov1t5gilzSpvlUC9W BbJJXzEAg== X-HalOne-Cookie: 37fa42ebdd97f57a6e422a39d60d3a92bdb63160 X-HalOne-ID: 84985802-e8f3-11ec-be77-d0431ea8bb03 Received: from mailproxy4.cst.dirpod4-cph3.one.com (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) by mailrelay3.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 84985802-e8f3-11ec-be77-d0431ea8bb03; Fri, 10 Jun 2022 19:28:34 +0000 (UTC) Date: Fri, 10 Jun 2022 21:28:32 +0200 From: Sam Ravnborg To: Stephen Kitt Cc: Sebastian Reichel , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thierry Reding Subject: Re: [PATCH 2/3] drm/panel: panel-dsi-cm: Use backlight helpers Message-ID: References: <20220607182026.1121992-1-steve@sk2.org> <20220607182026.1121992-3-steve@sk2.org> <20220609215236.ojxw6l2vkf652hgu@mercury.elektranox.org> <20220610194720.485cf7be@heffalump.sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220610194720.485cf7be@heffalump.sk2.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen. On Fri, Jun 10, 2022 at 07:47:20PM +0200, Stephen Kitt wrote: > Hi Sebastian, > > On Thu, 9 Jun 2022 23:52:36 +0200, Sebastian Reichel > wrote: > > On Tue, Jun 07, 2022 at 08:20:25PM +0200, Stephen Kitt wrote: > > > diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c > > > b/drivers/gpu/drm/panel/panel-dsi-cm.c index b58cb064975f..aa36dc6cedd3 > > > 100644 --- a/drivers/gpu/drm/panel/panel-dsi-cm.c > > > +++ b/drivers/gpu/drm/panel/panel-dsi-cm.c > > > @@ -86,16 +86,10 @@ static void dsicm_bl_power(struct panel_drv_data > > > *ddata, bool enable) return; > > > > > > if (enable) { > > > - backlight->props.fb_blank = FB_BLANK_UNBLANK; > > > - backlight->props.state = ~(BL_CORE_FBBLANK | > > > BL_CORE_SUSPENDED); > > > - backlight->props.power = FB_BLANK_UNBLANK; > > > + backlight_enable(backlight); > > > } else { > > > - backlight->props.fb_blank = FB_BLANK_NORMAL; > > > - backlight->props.power = FB_BLANK_POWERDOWN; > > > - backlight->props.state |= BL_CORE_FBBLANK | > > > BL_CORE_SUSPENDED; > > > + backlight_disable(backlight); > > > } > > > > The brackets can be removed now. Otherwise: > > > > > Reviewed-by: Sebastian Reichel > > Thanks, I’ll wait a little more to see if there are any other reviews of the > patches and then push a v2 with that fix. It would be very nice if you could kill all uses of FB_BLANK in the drivers/gpu/drm/panel/* drivers, and post them as one series. This is long overdue to introduce the backlight helpers. The three you posted is already a nice step forward, and there may be more panel drivers I have missed. Sam