From patchwork Wed Jan 15 12:45:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11334255 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8F7914B7 for ; Wed, 15 Jan 2020 12:46:11 +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 D073A20728 for ; Wed, 15 Jan 2020 12:46:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D073A20728 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be 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 8D4BE6E9B3; Wed, 15 Jan 2020 12:46:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by gabe.freedesktop.org (Postfix) with ESMTPS id BB84C6E9B0 for ; Wed, 15 Jan 2020 12:46:00 +0000 (UTC) Received: from ramsan ([84.195.182.253]) by baptiste.telenet-ops.be with bizsmtp id qclq210045USYZQ01clqd9; Wed, 15 Jan 2020 13:45:57 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iri3S-0003yz-3C; Wed, 15 Jan 2020 13:45:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iri3S-00012Z-1m; Wed, 15 Jan 2020 13:45:50 +0100 From: Geert Uytterhoeven To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , David Lechner , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 1/5] dt-bindings: display: sitronix, st7735r: Convert to DT schema Date: Wed, 15 Jan 2020 13:45:44 +0100 Message-Id: <20200115124548.3951-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115124548.3951-1-geert+renesas@glider.be> References: <20200115124548.3951-1-geert+renesas@glider.be> 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: devicetree@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chris Brandt , Kieran Bingham , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Convert the DT binding documentation for Sitronix ST7735R displays to DT schema. Add a reference to the Adafruit 1.8" LCD while at it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg --- v2: - New. --- .../bindings/display/sitronix,st7735r.txt | 35 ---------- .../bindings/display/sitronix,st7735r.yaml | 65 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 66 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/sitronix,st7735r.txt create mode 100644 Documentation/devicetree/bindings/display/sitronix,st7735r.yaml diff --git a/Documentation/devicetree/bindings/display/sitronix,st7735r.txt b/Documentation/devicetree/bindings/display/sitronix,st7735r.txt deleted file mode 100644 index cd5c7186890a2be7..0000000000000000 --- a/Documentation/devicetree/bindings/display/sitronix,st7735r.txt +++ /dev/null @@ -1,35 +0,0 @@ -Sitronix ST7735R display panels - -This binding is for display panels using a Sitronix ST7735R controller in SPI -mode. - -Required properties: -- compatible: "jianda,jd-t18003-t01", "sitronix,st7735r" -- dc-gpios: Display data/command selection (D/CX) -- reset-gpios: Reset signal (RSTX) - -The node for this driver must be a child node of a SPI controller, hence -all mandatory properties described in ../spi/spi-bus.txt must be specified. - -Optional properties: -- rotation: panel rotation in degrees counter clockwise (0,90,180,270) -- backlight: phandle of the backlight device attached to the panel - -Example: - - backlight: backlight { - compatible = "gpio-backlight"; - gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; - }; - - ... - - display@0{ - compatible = "jianda,jd-t18003-t01", "sitronix,st7735r"; - reg = <0>; - spi-max-frequency = <32000000>; - dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>; - rotation = <270>; - backlight = &backlight; - }; diff --git a/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml new file mode 100644 index 0000000000000000..21bccc91f74255e1 --- /dev/null +++ b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/sitronix,st7735r.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sitronix ST7735R Display Panels Device Tree Bindings + +maintainers: + - David Lechner + +description: + This binding is for display panels using a Sitronix ST7735R controller in + SPI mode. + +allOf: + - $ref: panel/panel-common.yaml# + +properties: + compatible: + oneOf: + - description: + Adafruit 1.8" 160x128 Color TFT LCD (Product ID 358 or 618) + items: + - enum: + - jianda,jd-t18003-t01 + - const: sitronix,st7735r + + spi-max-frequency: + maximum: 32000000 + + dc-gpios: + maxItems: 1 + description: Display data/command selection (D/CX) + +required: + - compatible + - reg + - dc-gpios + - reset-gpios + +examples: + - | + #include + + backlight: backlight { + compatible = "gpio-backlight"; + gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; + }; + + spi { + #address-cells = <1>; + #size-cells = <0>; + + display@0{ + compatible = "jianda,jd-t18003-t01", "sitronix,st7735r"; + reg = <0>; + spi-max-frequency = <32000000>; + dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>; + rotation = <270>; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index ea8262509bdd21ac..3007f83bd504194a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5382,7 +5382,7 @@ M: David Lechner T: git git://anongit.freedesktop.org/drm/drm-misc S: Maintained F: drivers/gpu/drm/tiny/st7735r.c -F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt +F: Documentation/devicetree/bindings/display/sitronix,st7735r.yaml DRM DRIVER FOR SONY ACX424AKP PANELS M: Linus Walleij From patchwork Wed Jan 15 12:45:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11334261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 858441398 for ; Wed, 15 Jan 2020 12:46:15 +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 6E6E024680 for ; Wed, 15 Jan 2020 12:46:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E6E024680 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be 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 082716E9B1; Wed, 15 Jan 2020 12:46:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by gabe.freedesktop.org (Postfix) with ESMTPS id D0FDF6E9B7 for ; Wed, 15 Jan 2020 12:46:00 +0000 (UTC) Received: from ramsan ([84.195.182.253]) by laurent.telenet-ops.be with bizsmtp id qclq2100K5USYZQ01clqWY; Wed, 15 Jan 2020 13:45:58 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iri3S-0003z3-3l; Wed, 15 Jan 2020 13:45:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iri3S-00012b-2R; Wed, 15 Jan 2020 13:45:50 +0100 From: Geert Uytterhoeven To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , David Lechner , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 2/5] dt-bindings: display: sitronix, st7735r: Add Okaya RH128128T Date: Wed, 15 Jan 2020 13:45:45 +0100 Message-Id: <20200115124548.3951-3-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115124548.3951-1-geert+renesas@glider.be> References: <20200115124548.3951-1-geert+renesas@glider.be> 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: devicetree@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chris Brandt , Kieran Bingham , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document support for the Okaya RH128128T display, which is a 128x128 1.44" TFT display driven by a Sitronix ST7715R TFT Controller/Driver. It can be found on e.g. the Renesas YRSK-LCD-PMOD extension board, which comes with various Renesas development kits (e.g. Renesas Starter Kit+ for RZ/A1H[1]). ST7715R and ST7735R are very similar. Their major difference is that the former is restricted to displays of up to 132x132 pixels, while the latter supports displays up to 132x162 pixels. [1] https://renesasrulz.com/the_vault/f/archive-forum/4981/upgrading-to-the-renesas-rz-a1h Signed-off-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg --- v2: - Rebase on top of DT schema conversion, - Add YRSK-LCD-PMOD reference and links. --- .../devicetree/bindings/display/sitronix,st7735r.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml index 21bccc91f74255e1..8892d79e6e100b79 100644 --- a/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml +++ b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml @@ -10,8 +10,8 @@ maintainers: - David Lechner description: - This binding is for display panels using a Sitronix ST7735R controller in - SPI mode. + This binding is for display panels using a Sitronix ST7715R or ST7735R + controller in SPI mode. allOf: - $ref: panel/panel-common.yaml# @@ -25,6 +25,12 @@ properties: - enum: - jianda,jd-t18003-t01 - const: sitronix,st7735r + - description: + Okaya 1.44" 128x128 Color TFT LCD (E.g. Renesas YRSK-LCD-PMOD) + items: + - enum: + - okaya,rh128128t + - const: sitronix,st7715r spi-max-frequency: maximum: 32000000 From patchwork Wed Jan 15 12:45:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11334257 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE7B91398 for ; Wed, 15 Jan 2020 12:46:13 +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 C6B592467A for ; Wed, 15 Jan 2020 12:46:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6B592467A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be 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 1B6196E9B7; Wed, 15 Jan 2020 12:46:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by gabe.freedesktop.org (Postfix) with ESMTPS id AC5AF6E9AE for ; Wed, 15 Jan 2020 12:46:00 +0000 (UTC) Received: from ramsan ([84.195.182.253]) by baptiste.telenet-ops.be with bizsmtp id qclq210075USYZQ01clqdC; Wed, 15 Jan 2020 13:45:57 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iri3S-0003z5-4W; Wed, 15 Jan 2020 13:45:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iri3S-00012d-3B; Wed, 15 Jan 2020 13:45:50 +0100 From: Geert Uytterhoeven To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , David Lechner , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 3/5] drm/mipi_dbi: Add support for display offsets Date: Wed, 15 Jan 2020 13:45:46 +0100 Message-Id: <20200115124548.3951-4-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115124548.3951-1-geert+renesas@glider.be> References: <20200115124548.3951-1-geert+renesas@glider.be> 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: devicetree@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chris Brandt , Kieran Bingham , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" If the resolution of the TFT display is smaller than the maximum resolution supported by the display controller, the display may be connected to the driver output arrays with a horizontal and/or vertical offset, leading to a shifted image. Add support for specifying these offsets. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg Acked-by: Noralf Trønnes --- v2: - Add Reviewed-by. --- drivers/gpu/drm/drm_mipi_dbi.c | 30 ++++++++++++++++++++---------- include/drm/drm_mipi_dbi.h | 12 ++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 16bff1be4b8ac622..27fe81a53c88e338 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -238,6 +238,23 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, } EXPORT_SYMBOL(mipi_dbi_buf_copy); +static void mipi_dbi_set_window_address(struct mipi_dbi_dev *dbidev, + unsigned int xs, unsigned int xe, + unsigned int ys, unsigned int ye) +{ + struct mipi_dbi *dbi = &dbidev->dbi; + + xs += dbidev->left_offset; + xe += dbidev->left_offset; + ys += dbidev->top_offset; + ye += dbidev->top_offset; + + mipi_dbi_command(dbi, MIPI_DCS_SET_COLUMN_ADDRESS, (xs >> 8) & 0xff, + xs & 0xff, (xe >> 8) & 0xff, xe & 0xff); + mipi_dbi_command(dbi, MIPI_DCS_SET_PAGE_ADDRESS, (ys >> 8) & 0xff, + ys & 0xff, (ye >> 8) & 0xff, ye & 0xff); +} + static void mipi_dbi_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect) { struct drm_gem_object *gem = drm_gem_fb_get_obj(fb, 0); @@ -271,12 +288,8 @@ static void mipi_dbi_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect) tr = cma_obj->vaddr; } - mipi_dbi_command(dbi, MIPI_DCS_SET_COLUMN_ADDRESS, - (rect->x1 >> 8) & 0xff, rect->x1 & 0xff, - ((rect->x2 - 1) >> 8) & 0xff, (rect->x2 - 1) & 0xff); - mipi_dbi_command(dbi, MIPI_DCS_SET_PAGE_ADDRESS, - (rect->y1 >> 8) & 0xff, rect->y1 & 0xff, - ((rect->y2 - 1) >> 8) & 0xff, (rect->y2 - 1) & 0xff); + mipi_dbi_set_window_address(dbidev, rect->x1, rect->x2 - 1, rect->y1, + rect->y2 - 1); ret = mipi_dbi_command_buf(dbi, MIPI_DCS_WRITE_MEMORY_START, tr, width * height * 2); @@ -366,10 +379,7 @@ static void mipi_dbi_blank(struct mipi_dbi_dev *dbidev) memset(dbidev->tx_buf, 0, len); - mipi_dbi_command(dbi, MIPI_DCS_SET_COLUMN_ADDRESS, 0, 0, - ((width - 1) >> 8) & 0xFF, (width - 1) & 0xFF); - mipi_dbi_command(dbi, MIPI_DCS_SET_PAGE_ADDRESS, 0, 0, - ((height - 1) >> 8) & 0xFF, (height - 1) & 0xFF); + mipi_dbi_set_window_address(dbidev, 0, width - 1, 0, height - 1); mipi_dbi_command_buf(dbi, MIPI_DCS_WRITE_MEMORY_START, (u8 *)dbidev->tx_buf, len); diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 67c66f5ee591e80f..33f325f5af2b921f 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -109,6 +109,18 @@ struct mipi_dbi_dev { */ unsigned int rotation; + /** + * @left_offset: Horizontal offset of the display relative to the + * controller's driver array + */ + unsigned int left_offset; + + /** + * @top_offset: Vertical offset of the display relative to the + * controller's driver array + */ + unsigned int top_offset; + /** * @backlight: backlight device (optional) */ From patchwork Wed Jan 15 12:45:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11334247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 826771398 for ; Wed, 15 Jan 2020 12:46:03 +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 6AF06222C3 for ; Wed, 15 Jan 2020 12:46:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AF06222C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be 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 9985A6E9AE; Wed, 15 Jan 2020 12:46:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by gabe.freedesktop.org (Postfix) with ESMTPS id C27F06E9B1 for ; Wed, 15 Jan 2020 12:46:00 +0000 (UTC) Received: from ramsan ([84.195.182.253]) by baptiste.telenet-ops.be with bizsmtp id qclq210065USYZQ01clqdB; Wed, 15 Jan 2020 13:45:57 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iri3S-0003z7-5D; Wed, 15 Jan 2020 13:45:50 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iri3S-00012h-3r; Wed, 15 Jan 2020 13:45:50 +0100 From: Geert Uytterhoeven To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , David Lechner , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Rob Herring , Mark Rutland Subject: [PATCH v2 4/5] drm: tiny: st7735r: Prepare for adding support for more displays Date: Wed, 15 Jan 2020 13:45:47 +0100 Message-Id: <20200115124548.3951-5-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115124548.3951-1-geert+renesas@glider.be> References: <20200115124548.3951-1-geert+renesas@glider.be> 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: devicetree@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chris Brandt , Kieran Bingham , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently the st7735r driver supports only a single display panel. Prepare for adding support for other display panels by factoring out the display-specific parameters in struct st7735r_cfg. For now, the following parameters can be configured: - Display resolution, - Horizontal/vertical display offsets, - Read-write versus read-only controllers, - RGB versus BGR color component ordering. Rename jd_t18003_t01_pipe_enable() and jd_t18003_t01_pipe_funcs() to st7735r_pipe_enable() resp. st7735r_pipe_funcs(), as they are not really specific to the Jianda JD-T18003-T01 display anymore. Signed-off-by: Geert Uytterhoeven --- v2: - Split off from "drm: tiny: st7735r: Add support for Okaya RH128128T", - Replace st7735r_priv.rgb by a pointer to struct st7735r_cfg, - Change prefix of jd_t18003_t01_pipe_enable() and jd_t18003_t01_pipe_funcs(). --- drivers/gpu/drm/tiny/st7735r.c | 67 +++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index 3f4487c716848cf8..a838f237c8d82e3d 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -3,6 +3,7 @@ * DRM driver for Sitronix ST7735R panels * * Copyright 2017 David Lechner + * Copyright (C) 2019 Glider bvba */ #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include #include