From patchwork Mon Feb 24 23:20:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 211641 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT 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 558E1C11D32 for ; Mon, 24 Feb 2020 23:21:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26E5B20732 for ; Mon, 24 Feb 2020 23:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728530AbgBXXVt (ORCPT ); Mon, 24 Feb 2020 18:21:49 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59940 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728506AbgBXXVj (ORCPT ); Mon, 24 Feb 2020 18:21:39 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 539202939B9 Received: by earth.universe (Postfix, from userid 1000) id 029AC3C0C95; Tue, 25 Feb 2020 00:21:31 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Laurent Pinchart , Tomi Valkeinen Cc: Tony Lindgren , Merlijn Wajer , "H. Nikolaus Schaller" , Rob Herring , linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Sebastian Reichel Subject: [PATCHv2 18/56] drm/omap: panel-dsi-cm: use common MIPI DCS 1.3 defines Date: Tue, 25 Feb 2020 00:20:48 +0100 Message-Id: <20200224232126.3385250-19-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200224232126.3385250-1-sebastian.reichel@collabora.com> References: <20200224232126.3385250-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Drop local definition of common MIPI DCS 1.3 defines. Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 9a2ccec27f7e..92c9dc211aeb 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -28,8 +28,6 @@ #include "../dss/omapdss.h" #define DCS_READ_NUM_ERRORS 0x05 -#define DCS_BRIGHTNESS 0x51 -#define DCS_CTRL_DISPLAY 0x53 #define DCS_GET_ID1 0xda #define DCS_GET_ID2 0xdb #define DCS_GET_ID3 0xdc @@ -333,8 +331,10 @@ static int dsicm_bl_update_status(struct backlight_device *dev) src->ops->dsi.bus_lock(src); r = dsicm_wake_up(ddata); - if (!r) - r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level); + if (!r) { + r = dsicm_dcs_write_1(ddata, + MIPI_DCS_SET_DISPLAY_BRIGHTNESS, level); + } src->ops->dsi.bus_unlock(src); } @@ -597,11 +597,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata) if (r) goto err; - r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); + r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, 0xff); if (r) goto err; - r = dsicm_dcs_write_1(ddata, DCS_CTRL_DISPLAY, + r = dsicm_dcs_write_1(ddata, MIPI_DCS_WRITE_CONTROL_DISPLAY, (1<<2) | (1<<5)); /* BL | BCTRL */ if (r) goto err;