From patchwork Mon Oct 9 18:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 15112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2054875vqo; Mon, 9 Oct 2023 11:38:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwyKghBVTVmNCWczz83TJoO3hObcKOro5nMwdTiLqoJDX/rrLJy4kmPIfTHqPmrEAcYusC X-Received: by 2002:a17:90a:e651:b0:268:1be1:745a with SMTP id ep17-20020a17090ae65100b002681be1745amr12191110pjb.29.1696876691513; Mon, 09 Oct 2023 11:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696876691; cv=none; d=google.com; s=arc-20160816; b=uyaw+WT5/chjaVx3TcF7aWUXB4xZ6dYg2C/gyt+EJ4wyoD0jNgKnX0yusMjec83cJ1 SzwSxQG5hBPyBgN9uoS7Kk2KMlSXj68nPXcmqi0hmWAfKmNETpYElY8URZJO1pWHymxj G1SlXvgqi+LiM5oVd+Mbl8mpzfUgbxCKVPG9ToRPnzgdqfyHvvYt7e4eYgIWeTED6HAm RsOieQow432lHFHRgmUTgH2eww6+iq/nr+/nXZ8RbFwGPRuQRJbCoGdYR78oMUoqk+Pj ThzVUIwuN5Ln8Oaxk8Xb9icS0ob6Ry1Wxrl8ScxnzmWWI8KY1Fr6t/jqia3RlVanUK8l YGkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zsxGVSfsuhfbNcHVttLtmT7ohtovb+UILcIo39l8Suw=; fh=9WTs8UaqsghgLTwwP0kReBdN3SICd9q3Y5wySTptRG4=; b=sPEkV/Oh0NlJBiIuJYUlM7YhNmxDe5RINnMmFvGOn7GmsfrRpLo2QaGXFN7YSTo9nv MyfTZcRg0KU8Z6mNRRRLzGL6I57XmlnkqFo7qp8L+lYTu/FIxWA24+AfBJtSLyXsr5UO CLsgnXStHB2OxSdqRkXcerbD0RgsCOTTO+jkcfeuPEL+n7mr1Ty4Y6O0puJNJEeueoeb Je2S0lh2wpUYNA0WTjeHNmIR5BU22buBVkd62NlnXMM4bd9llTz449iyfcDtT5weJqAS 0beIlo8yRu0XYdBLedqDmfT84TW1uLx4CkQtekd4o3Dzd2yoHyamBgLj3uogAvzPM1ey NmHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PBguWiFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id mh3-20020a17090b4ac300b002683f507990si13220668pjb.109.2023.10.09.11.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 11:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PBguWiFf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5CD768038FAC; Mon, 9 Oct 2023 11:38:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378251AbjJIShU (ORCPT + 18 others); Mon, 9 Oct 2023 14:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378179AbjJIShH (ORCPT ); Mon, 9 Oct 2023 14:37:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68B97B4 for ; Mon, 9 Oct 2023 11:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696876575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zsxGVSfsuhfbNcHVttLtmT7ohtovb+UILcIo39l8Suw=; b=PBguWiFfo11m5Uvdaj1ek/U+8vkwsxUyoe7j3JmIgVXo1s+g7EZKM3XDL/Tg1Oeisd7rhp t+jIkeYeRcJHsOHikPPVbxjEuLcSAZsxnFaigC0hRygt8cgdl32KSIBuyvRHQ6ml0dj3r+ 2D6L82WPKTFRpyJTpchOOySCCx5qcQY= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-125-MlxH1A66P5mrVkk2jFTfpw-1; Mon, 09 Oct 2023 14:35:59 -0400 X-MC-Unique: MlxH1A66P5mrVkk2jFTfpw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-30e4943ca7fso3409588f8f.3 for ; Mon, 09 Oct 2023 11:35:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696876558; x=1697481358; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zsxGVSfsuhfbNcHVttLtmT7ohtovb+UILcIo39l8Suw=; b=weqXS5jAb5v1IV7tpO0DI5JPJ0gz6hOYSUrTY0DRiGoyGwAQVA+Fo3i8CYUPB+52s8 GupBm1P0GhBizi13kwoUD1H3+12ZFPkb5L2PZLqIPf5pE0pP9UDUOZSWT/Kf12S3r2cF Hv4pJUabWUch2GU5GCjmy39x74NW7wci0HzXPg8gtrqfkQS8DKNzdkH8AchiCVWxDWqL qQIgP/2XqequtpB2KxxHPPaYnXdhBvZbQ77lkkpQ145VfhWSNGy70d6gR2wQ70RR3YoK zKLZw26+kQmBbx9jw+JRwb75eSGSgDGJGBA1g6o8hJEhwDY0xWUO+dIx79Sd5FYcUY1z mJcA== X-Gm-Message-State: AOJu0YwA9hutW+KsvO0wps5q4q5QRpNgAl72Kf2o7OLPQD8Bll3+DdJg EZ1x2WVNzV811ZLqV494SfMhqGH7sZ0epmSEt2vNW9KUK8AcPbKunoqhTtnQhjA9X0VoDthkfyI Dmkwr5nUS4sbYi0LiUecq4NqT8abxWzDq1acMdNX9Wp8LLwCq1qgKDTxklY9Is6vT3m7xgvf67M TTPlmUVw8= X-Received: by 2002:a5d:46cf:0:b0:31f:8e7c:6ebe with SMTP id g15-20020a5d46cf000000b0031f8e7c6ebemr13528790wrs.5.1696876558013; Mon, 09 Oct 2023 11:35:58 -0700 (PDT) X-Received: by 2002:a5d:46cf:0:b0:31f:8e7c:6ebe with SMTP id g15-20020a5d46cf000000b0031f8e7c6ebemr13528764wrs.5.1696876557507; Mon, 09 Oct 2023 11:35:57 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id f16-20020adfdb50000000b0031ff89af0e4sm10318981wrj.99.2023.10.09.11.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 11:35:57 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Maxime Ripard , Thomas Zimmermann , Geert Uytterhoeven , Javier Martinez Canillas , Conor Dooley , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Maarten Lankhorst , Rob Herring , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pwm@vger.kernel.org Subject: [PATCH 0/8] drm/solomon: Add support for the SSD132x controller family Date: Mon, 9 Oct 2023 20:34:14 +0200 Message-ID: <20231009183522.543918-1-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 11:38:09 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779304174139726860 X-GMAIL-MSGID: 1779304174139726860 Hello, This patch-set adds support for the family of SSD132x Solomon controllers, such as the SSD1322, SSD1325 and SSD1327 chips. These are used for 16 Gray Scale Dot Matrix OLED panels. The patches were tested on a Waveshare SSD1327 display using glmark2-drm, fbcon, fbtests and the retroarch emulator. Patch #1 renames the ssd130x driver to ssd13xx since it will support both the SSD130x and SSD132x Solomon families and at least the SSD133x family in the future. Patch #2 also renames the data structures and functions prefixes with the ssd13xx name. Patch #3 drops the .page_height field from the device info with a constant because it's only needed by the SSD130x family and not the SSD132x family. Patch #4 changes the driver to use drm_format_info_min_pitch() instead of open coding the same calculation. Patch #5 adds a per controller family functions table to have logic that could be shared by both SSD130x and SSD132x callbacks. Patch #6 renames some SSD130X_* commands that are shared by both families and patch #7 adds the support for the SSD132x controller family. Finally patch #8 adds a DT binding schema for the SSD132x device nodes. Best regards, Javier Javier Martinez Canillas (8): drm/solomon: Rename ssd130x driver to ssd13xx drm/ssd13xx: Rename data structures and functions prefixes drm/ssd13xx: Replace .page_height field in device info with a constant drm/ssd13xx: Use drm_format_info_min_pitch() to calculate the dest_pitch drm/ssd13xx: Add a per controller family functions table drm/ssd13xx: Rename commands that are shared across chip families drm/ssd13xx: Add support for the SSD132x OLED controller family dt-bindings: display: Add SSD132x OLED controllers .../bindings/display/solomon,ssd132x.yaml | 116 ++ MAINTAINERS | 6 +- drivers/gpu/drm/solomon/Kconfig | 28 +- drivers/gpu/drm/solomon/Makefile | 6 +- drivers/gpu/drm/solomon/ssd130x-i2c.c | 112 -- drivers/gpu/drm/solomon/ssd130x.c | 1260 -------------- drivers/gpu/drm/solomon/ssd13xx-i2c.c | 126 ++ .../solomon/{ssd130x-spi.c => ssd13xx-spi.c} | 104 +- drivers/gpu/drm/solomon/ssd13xx.c | 1508 +++++++++++++++++ .../gpu/drm/solomon/{ssd130x.h => ssd13xx.h} | 63 +- 10 files changed, 1876 insertions(+), 1453 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd132x.yaml delete mode 100644 drivers/gpu/drm/solomon/ssd130x-i2c.c delete mode 100644 drivers/gpu/drm/solomon/ssd130x.c create mode 100644 drivers/gpu/drm/solomon/ssd13xx-i2c.c rename drivers/gpu/drm/solomon/{ssd130x-spi.c => ssd13xx-spi.c} (54%) create mode 100644 drivers/gpu/drm/solomon/ssd13xx.c rename drivers/gpu/drm/solomon/{ssd130x.h => ssd13xx.h} (51%)