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=-13.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, INVALID_MSGID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 57EFBC4338F for ; Tue, 3 Aug 2021 01:26:07 +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 A327A604D7 for ; Tue, 3 Aug 2021 01:26:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A327A604D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sipeed.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 95F1D6E114; Tue, 3 Aug 2021 01:26:05 +0000 (UTC) Received: from smtpbg587.qq.com (smtpbg126.qq.com [106.55.201.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 353AC6E114 for ; Tue, 3 Aug 2021 01:26:03 +0000 (UTC) X-QQ-mid: bizesmtp50t1627953952t9i7a2ym Received: from [192.168.0.46] (unknown [14.154.30.9]) by esmtp6.qq.com (ESMTP) with id ; Tue, 03 Aug 2021 09:25:51 +0800 (CST) X-QQ-SSF: 0010000000200030B000B00A0000000 X-QQ-FEAT: jE/Jgvobnf/7CpswWjZ9lsqV+/yBULhPXv+Xyl67CU2ZYnZ7Y0lYrgypNoqYB Q2LSJOhSqUbThgala5oyyLkHGCLQVJBNrp1cCjtIAsxc8cc9sGGBtRfWCz9c9Fjo5HBYg7r Lg1vhaC/db9Q7yqeWZyELrxR9ExHuOX1b7liCWtdC2+XHlhiClc6P364HVOnOiAyXeejEZ1 JdZxtteU2EDNyHfxnmfGSPB0ZG7AtsJ5TB82FqUcF4RY815nJ2e7BGN5LYIa1N5B06sT63l KgrtYkNE9gTAVw8ZaizVOOezdL9bdIfgMiVLeoKef2gFqn0wxFRn/FojR7xyckhNSNCmniW ZfXmxUvmVp3UQUfAz/M0jdEGrdrQA== X-QQ-GoodBg: 0 Message-ID: +0FC33BC26BE5318F Subject: Re: [PATCH 3/4] drm/tiny: add simple-dbi driver From: Icenowy Zheng To: Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 03 Aug 2021 09:25:51 +0800 In-Reply-To: References: <20210802063538.75583-1-icenowy@sipeed.com> <20210802063538.75583-4-icenowy@sipeed.com> Organization: Sipeed Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:sipeed.com:qybgspam:qybgspam2 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 在 2021-08-02星期一的 17:08 +0200,Thomas Zimmermann写道: > Hi > > Am 02.08.21 um 08:35 schrieb Icenowy Zheng: > > Add a driver for generic MIPI DBI panels initialized with MIPI DCS > > commands. > > > > Currently a ST7789V-based panel is added to it. This panel has its > > configuration pre-programmed into the controller, so no vendor- > > specific > > configuration is needed. > > > > Signed-off-by: Icenowy Zheng > > --- > >   drivers/gpu/drm/tiny/Kconfig      |  12 ++ > >   drivers/gpu/drm/tiny/Makefile     |   1 + > >   drivers/gpu/drm/tiny/simple-dbi.c | 244 > > ++++++++++++++++++++++++++++++ > >   3 files changed, 257 insertions(+) > >   create mode 100644 drivers/gpu/drm/tiny/simple-dbi.c > > > > diff --git a/drivers/gpu/drm/tiny/Kconfig > > b/drivers/gpu/drm/tiny/Kconfig > > index d31be274a2bd..6cfc57b68a46 100644 > > --- a/drivers/gpu/drm/tiny/Kconfig > > +++ b/drivers/gpu/drm/tiny/Kconfig > > @@ -144,6 +144,18 @@ config TINYDRM_REPAPER > >   > >           If M is selected the module will be called repaper. > >   > > +config TINYDRM_SIMPLE_DBI > > +       tristate "DRM support for generic MIPI DBI panels" > > +       depends on DRM && SPI > > +       select DRM_KMS_HELPER > > +       select DRM_KMS_CMA_HELPER > > +       select DRM_MIPI_DBI > > +       help > > +         DRM driver for generic DBI panels that are MIPI DCS > > compatible > > +         and needs no vendor-specific setup commands. > > + > > +         If M is selected the module will be called simple-dbi. > > + > >   config TINYDRM_ST7586 > >         tristate "DRM support for Sitronix ST7586 display panels" > >         depends on DRM && SPI > > diff --git a/drivers/gpu/drm/tiny/Makefile > > b/drivers/gpu/drm/tiny/Makefile > > index e09942895c77..2553de651aa3 100644 > > --- a/drivers/gpu/drm/tiny/Makefile > > +++ b/drivers/gpu/drm/tiny/Makefile > > @@ -13,3 +13,4 @@ obj-$(CONFIG_TINYDRM_MI0283QT)                += > > mi0283qt.o > >   obj-$(CONFIG_TINYDRM_REPAPER)         += repaper.o > >   obj-$(CONFIG_TINYDRM_ST7586)          += st7586.o > >   obj-$(CONFIG_TINYDRM_ST7735R)         += st7735r.o > > +obj-$(CONFIG_TINYDRM_SIMPLE_DBI)       += simple-dbi.o > > diff --git a/drivers/gpu/drm/tiny/simple-dbi.c > > b/drivers/gpu/drm/tiny/simple-dbi.c > > new file mode 100644 > > index 000000000000..2b207e43d500 > > --- /dev/null > > +++ b/drivers/gpu/drm/tiny/simple-dbi.c > > @@ -0,0 +1,244 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * DRM driver for display panels with configuration preset and > > needs only > > + * standard MIPI DCS commands to bring up. > > + * > > + * Copyright (C) 2021 Sipeed > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include