From mboxrd@z Thu Jan 1 00:00:00 1970 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,URIBL_BLOCKED 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 7F151C4338F for ; Mon, 2 Aug 2021 09:08:48 +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 3766B61057 for ; Mon, 2 Aug 2021 09:08:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3766B61057 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 9005F6E4C4; Mon, 2 Aug 2021 09:08:47 +0000 (UTC) Received: from smtpbg604.qq.com (smtpbg604.qq.com [59.36.128.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4AAD16E4C4 for ; Mon, 2 Aug 2021 09:08:44 +0000 (UTC) X-QQ-mid: bizesmtp35t1627895191ted2cdx7 Received: from [192.168.0.46] (unknown [113.89.245.207]) by esmtp6.qq.com (ESMTP) with id ; Mon, 02 Aug 2021 17:06:30 +0800 (CST) X-QQ-SSF: 00100000002000209000D00A0000000 X-QQ-FEAT: d+oHhNLBBfvcM9LTcdSB8Adj0kc5pReWnlPm33ZAog4FdJxK8MP21EuAe64Wy PtCAiOaDC3Q2UzquNOiJuPkPjbi0kzi9OYb/rUSwYCTSWsvEsOdHh2Ndj1pS2rT3lWBw8LZ TmkT0xqZusgcCNQaQyrdzWjsYyE1LG+Kt76gflTAxsSiEPnSGz+5aqBrpFhJi46QBUqkRB1 xqBoxqvT5JJeoLzyAhLY/L1a7F3BwMGx43rF/RV5BmCvD2yyDHP9JpBb5YHYOsU84vymWeD fIn0GVCxjPDsu6cgPjT6sAKMAxTUPnTON44oQub4b4oJNR/Gaakc0y9Mn+NQOntdiI2OD3v FljGh95459zmYhebqWOiLziKMKirxN8zHwbplWC1TQtFryCfXA= X-QQ-GoodBg: 0 Message-ID: <40f976d12b70919cc0fd0d7e8f6fc7fa16511cd4.camel@sipeed.com>+FA0FA08A731F7745 Subject: Re: [PATCH 3/4] drm/tiny: add simple-dbi driver From: Icenowy Zheng To: David Airlie , Daniel Vetter , Rob Herring Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 02 Aug 2021 17:06:30 +0800 In-Reply-To: <20210802063538.75583-4-icenowy@sipeed.com> 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:qybgspam4 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星期一的 14:35 +0800,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