Received: by 10.223.176.46 with SMTP id f43csp4226895wra; Tue, 23 Jan 2018 06:20:26 -0800 (PST) X-Google-Smtp-Source: AH8x224LvDYdjn9+vSZXWYw85o5+6uWY3Nz7U6e0kIB8ZjlXcA8VBo/72tMBpOAlripgPJp0jYcG X-Received: by 10.99.99.4 with SMTP id x4mr9345774pgb.453.1516717226179; Tue, 23 Jan 2018 06:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516717226; cv=none; d=google.com; s=arc-20160816; b=GdApJBMAdVujjsa0DZPx+TS7nHyxfK4YqjiV60fz6Ri29+0JrN2nUI9sBVKoDUq9v0 8ENC5qi/zBQvb7/RUV0AuV9QGrk1JkjLgTMLl7BZ/UGi+nDseHhIw/P918PA1zmQCd8Y pRauN/G6K4c/ypconHIIUpRVBHlPVmToVR5dlBp8dL5ZPNm/Jhr5qfR57/Y0kAfA36Bc GjU6vxHImLbymwyQVHrvPSur4KYNFd1niwiSYbHSBSVE2Ac5rQj+fXuaVYD7fdhhmU0F 66pBiUz6DSDdRIhkHnmCSFVT/3cvPUJfxM+o7waWx/wC1AWafRnxVLAR1X5geG3rgMTU 3YUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=D3TFCvclT76w0K6TUuAto8fnKI9Ri9t/fEuY8qu+mjA=; b=JpCXGm15oiDGWuPTwMBiR3xNjiVxMltYSQ2OrM0MR8mR0DFfTNEgeATFQnzx5+TE5y KtRGVS4DiTocZ/qrC1LJjrZNrlI22zXQgJRjlP/ofeLJnRLnrj20bm92qAVqpkoPi3cs gOhIBWjV2S5edsWdPrLAsY+deCfqlo26FxpBd58sx9EdWpFSsoRNKTtVS/yS3l81g3UD VzbgKeGZ3L55a2hdWmthHBdB8/r8IOV+r4MwzkRw17M7U9JqNp/eOQHnv+gao9chK7W7 XhOifA2IWdlhEppODac4G3B/OYtD5ZRaH02GACBCsDM4Td/AH9gyeY7soi6zQ6jEVVO3 AZ0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si1516167pfj.303.2018.01.23.06.20.11; Tue, 23 Jan 2018 06:20:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751863AbeAWOTq (ORCPT + 99 others); Tue, 23 Jan 2018 09:19:46 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:50463 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbeAWOTp (ORCPT ); Tue, 23 Jan 2018 09:19:45 -0500 Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:62780 helo=[192.168.10.157]) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1edzQN-0000oC-KF; Tue, 23 Jan 2018 15:19:43 +0100 Subject: Re: [PATCH v18 07/10] drm/panel: Use backlight_enable/disable helpers To: Meghana Madhyastha , Lee Jones , Daniel Thompson , Jingoo Han , Thierry Reding , Tomi Valkeinen , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <16256478-1d3d-7c61-dd39-984c03e59d61@tronnes.org> Date: Tue, 23 Jan 2018 15:19:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 22.01.2018 15.54, skrev Meghana Madhyastha: > Use backlight_enable/disable helpers instead of changing > the property and calling backlight_update_status for cleaner > and simpler code and also to avoid repetitions. > > Signed-off-by: Meghana Madhyastha > --- Reviewed-by: Noralf Trønnes > drivers/gpu/drm/panel/panel-innolux-p079zca.c | 6 ++---- > drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 6 ++---- > drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 10 ++-------- > drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 10 ++-------- > 4 files changed, 8 insertions(+), 24 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c > index 6ba93449f..4c1b29eec 100644 > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c > @@ -45,8 +45,7 @@ static int innolux_panel_disable(struct drm_panel *panel) > if (!innolux->enabled) > return 0; > > - innolux->backlight->props.power = FB_BLANK_POWERDOWN; > - backlight_update_status(innolux->backlight); > + backlight_disable(innolux->backlight); > > err = mipi_dsi_dcs_set_display_off(innolux->link); > if (err < 0) > @@ -151,8 +150,7 @@ static int innolux_panel_enable(struct drm_panel *panel) > if (innolux->enabled) > return 0; > > - innolux->backlight->props.power = FB_BLANK_UNBLANK; > - ret = backlight_update_status(innolux->backlight); > + ret = backlight_enable(innolux->backlight); > if (ret) { > DRM_DEV_ERROR(panel->drm->dev, > "Failed to enable backlight %d\n", ret); > diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > index 5b2340ef7..0a94ab79a 100644 > --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > @@ -192,8 +192,7 @@ static int jdi_panel_disable(struct drm_panel *panel) > if (!jdi->enabled) > return 0; > > - jdi->backlight->props.power = FB_BLANK_POWERDOWN; > - backlight_update_status(jdi->backlight); > + backlight_disable(jdi->backlight); > > jdi->enabled = false; > > @@ -289,8 +288,7 @@ static int jdi_panel_enable(struct drm_panel *panel) > if (jdi->enabled) > return 0; > > - jdi->backlight->props.power = FB_BLANK_UNBLANK; > - backlight_update_status(jdi->backlight); > + backlight_enable(jdi->backlight); > > jdi->enabled = true; > > diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c > index 3cce3ca19..072c0fc79 100644 > --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c > +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c > @@ -96,10 +96,7 @@ static int sharp_panel_disable(struct drm_panel *panel) > if (!sharp->enabled) > return 0; > > - if (sharp->backlight) { > - sharp->backlight->props.power = FB_BLANK_POWERDOWN; > - backlight_update_status(sharp->backlight); > - } > + backlight_disable(sharp->backlight); > > sharp->enabled = false; > > @@ -263,10 +260,7 @@ static int sharp_panel_enable(struct drm_panel *panel) > if (sharp->enabled) > return 0; > > - if (sharp->backlight) { > - sharp->backlight->props.power = FB_BLANK_UNBLANK; > - backlight_update_status(sharp->backlight); > - } > + backlight_enable(sharp->backlight); > > sharp->enabled = true; > > diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c > index 3aeb0bda4..8a5137963 100644 > --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c > +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c > @@ -117,10 +117,7 @@ static int sharp_nt_panel_disable(struct drm_panel *panel) > if (!sharp_nt->enabled) > return 0; > > - if (sharp_nt->backlight) { > - sharp_nt->backlight->props.power = FB_BLANK_POWERDOWN; > - backlight_update_status(sharp_nt->backlight); > - } > + backlight_disable(sharp_nt->backlight); > > sharp_nt->enabled = false; > > @@ -203,10 +200,7 @@ static int sharp_nt_panel_enable(struct drm_panel *panel) > if (sharp_nt->enabled) > return 0; > > - if (sharp_nt->backlight) { > - sharp_nt->backlight->props.power = FB_BLANK_UNBLANK; > - backlight_update_status(sharp_nt->backlight); > - } > + backlight_enable(sharp_nt->backlight); > > sharp_nt->enabled = true; >