Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751459AbeAPQvi (ORCPT + 1 other); Tue, 16 Jan 2018 11:51:38 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:60289 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbeAPQvg (ORCPT ); Tue, 16 Jan 2018 11:51:36 -0500 Subject: Re: [PATCH v16 02/10] drm/tinydrm: Convert tinydrm_enable/disable_backlight to backlight_enable/disable 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: <41c568a24dd843adbc8416d78406dd16c9960791.1516098341.git.meghana.madhyastha@gmail.com> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: Date: Tue, 16 Jan 2018 17:51:33 +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: <41c568a24dd843adbc8416d78406dd16c9960791.1516098341.git.meghana.madhyastha@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Den 16.01.2018 11.32, skrev Meghana Madhyastha: > Remove tinydrm_enable/disable_backlight and let the callers call the > more generic backlight_enable/disable helpers > > Signed-off-by: Meghana Madhyastha This patch needs to be rebased on some recent changes to mipi-dbi. Reviewed-by: Noralf Trønnes > --- > drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 55 -------------------------- > drivers/gpu/drm/tinydrm/mipi-dbi.c | 4 +- > include/drm/tinydrm/tinydrm-helpers.h | 2 - > 3 files changed, 2 insertions(+), 59 deletions(-) > > diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c > index bf96072d1..7326e1758 100644 > --- a/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c > +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c > @@ -276,61 +276,6 @@ struct backlight_device *tinydrm_of_find_backlight(struct device *dev) > } > EXPORT_SYMBOL(tinydrm_of_find_backlight); > > -/** > - * tinydrm_enable_backlight - Enable backlight helper > - * @backlight: Backlight device > - * > - * Returns: > - * Zero on success, negative error code on failure. > - */ > -int tinydrm_enable_backlight(struct backlight_device *backlight) > -{ > - unsigned int old_state; > - int ret; > - > - if (!backlight) > - return 0; > - > - old_state = backlight->props.state; > - backlight->props.state &= ~BL_CORE_FBBLANK; > - DRM_DEBUG_KMS("Backlight state: 0x%x -> 0x%x\n", old_state, > - backlight->props.state); > - > - ret = backlight_update_status(backlight); > - if (ret) > - DRM_ERROR("Failed to enable backlight %d\n", ret); > - > - return ret; > -} > -EXPORT_SYMBOL(tinydrm_enable_backlight); > - > -/** > - * tinydrm_disable_backlight - Disable backlight helper > - * @backlight: Backlight device > - * > - * Returns: > - * Zero on success, negative error code on failure. > - */ > -int tinydrm_disable_backlight(struct backlight_device *backlight) > -{ > - unsigned int old_state; > - int ret; > - > - if (!backlight) > - return 0; > - > - old_state = backlight->props.state; > - backlight->props.state |= BL_CORE_FBBLANK; > - DRM_DEBUG_KMS("Backlight state: 0x%x -> 0x%x\n", old_state, > - backlight->props.state); > - ret = backlight_update_status(backlight); > - if (ret) > - DRM_ERROR("Failed to disable backlight %d\n", ret); > - > - return ret; > -} > -EXPORT_SYMBOL(tinydrm_disable_backlight); > - > #if IS_ENABLED(CONFIG_SPI) > > /** > diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c > index aa6b6ce56..8c2cb1cf2 100644 > --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c > +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c > @@ -291,7 +291,7 @@ void mipi_dbi_pipe_enable(struct drm_simple_display_pipe *pipe, > if (fb) > fb->funcs->dirty(fb, NULL, 0, 0, NULL, 0); > > - tinydrm_enable_backlight(mipi->backlight); > + backlight_enable(mipi->backlight); > } > EXPORT_SYMBOL(mipi_dbi_pipe_enable); > > @@ -330,7 +330,7 @@ void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe) > mipi->enabled = false; > > if (mipi->backlight) > - tinydrm_disable_backlight(mipi->backlight); > + backlight_disable(mipi->backlight); > else > mipi_dbi_blank(mipi); > } > diff --git a/include/drm/tinydrm/tinydrm-helpers.h b/include/drm/tinydrm/tinydrm-helpers.h > index d554ded60..f54fae03e 100644 > --- a/include/drm/tinydrm/tinydrm-helpers.h > +++ b/include/drm/tinydrm/tinydrm-helpers.h > @@ -47,8 +47,6 @@ void tinydrm_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb, > struct drm_clip_rect *clip); > > struct backlight_device *tinydrm_of_find_backlight(struct device *dev); > -int tinydrm_enable_backlight(struct backlight_device *backlight); > -int tinydrm_disable_backlight(struct backlight_device *backlight); > > size_t tinydrm_spi_max_transfer_size(struct spi_device *spi, size_t max_len); > bool tinydrm_spi_bpw_supported(struct spi_device *spi, u8 bpw);