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, 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 51B44C43603 for ; Thu, 12 Dec 2019 09:54:21 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2D37E214AF for ; Thu, 12 Dec 2019 09:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D37E214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 590FD6E063; Thu, 12 Dec 2019 09:54:20 +0000 (UTC) Received: from asavdk3.altibox.net (asavdk3.altibox.net [109.247.116.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 733046E063 for ; Thu, 12 Dec 2019 09:54:19 +0000 (UTC) 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 C54872007F; Thu, 12 Dec 2019 10:54:17 +0100 (CET) Date: Thu, 12 Dec 2019 10:54:16 +0100 From: Sam Ravnborg To: Jerry Han Subject: Re: [PATCH] drm/panel: boe-himax8279d: use drm_panel backlight support Message-ID: <20191212095416.GB32429@ravnborg.org> References: <20191212022614.14728-1-jerry.han.hq@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191212022614.14728-1-jerry.han.hq@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=7gkXJVJtAAAA:8 a=9elUfqcO1cmAmzWN_H0A:9 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=26CFN5KYESCqVWovzqLp:22 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: dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Jerry. On Thu, Dec 12, 2019 at 10:26:14AM +0800, Jerry Han wrote: > Use the backlight support in drm_panel to simplify the driver > > Signed-off-by: Jerry Han > Reviewed-by: Sam Ravnborg > --- > drivers/gpu/drm/panel/panel-boe-himax8279d.c | 17 +++-------------- > 1 file changed, 3 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > index 65ea6f673cdb..3a6ee2069158 100644 > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > @@ -6,7 +6,6 @@ > * > */ > > -#include > #include > #include > #include > @@ -47,7 +46,6 @@ struct panel_info { > struct mipi_dsi_device *link; > const struct panel_desc *desc; > > - struct backlight_device *backlight; > struct gpio_desc *enable_gpio; > struct gpio_desc *pp33_gpio; > struct gpio_desc *pp18_gpio; > @@ -93,8 +91,6 @@ static int boe_panel_disable(struct drm_panel *panel) > if (!pinfo->enabled) > return 0; > > - backlight_disable(pinfo->backlight); > - > err = mipi_dsi_dcs_set_display_off(pinfo->link); > if (err < 0) { > DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", > @@ -218,13 +214,6 @@ static int boe_panel_enable(struct drm_panel *panel) > return ret; > } > > - ret = backlight_enable(pinfo->backlight); > - if (ret) { > - DRM_DEV_ERROR(panel->drm->dev, > - "Failed to enable backlight %d\n", ret); > - return ret; > - } > - > pinfo->enabled = true; > > return 0; > @@ -899,9 +888,9 @@ static int panel_add(struct panel_info *pinfo) > return ret; > } > > - pinfo->backlight = devm_of_find_backlight(dev); > - if (IS_ERR(pinfo->backlight)) > - return PTR_ERR(pinfo->backlight); > + ret = drm_panel_of_backlight(&pinfo->base); > + if (ret) > + return ret; > > drm_panel_init(&pinfo->base, dev, &panel_funcs, > DRM_MODE_CONNECTOR_DSI); The patch looks good. But we still need the original patch fixed so it can build. Please resend a v11 that can build. Sam _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel