From patchwork Thu Aug 1 13:52:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 11070713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 569E113A4 for ; Thu, 1 Aug 2019 13:53:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45459285EE for ; Thu, 1 Aug 2019 13:53:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39C1F286A8; Thu, 1 Aug 2019 13:53:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 993B3285EE for ; Thu, 1 Aug 2019 13:53:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99AE36E60E; Thu, 1 Aug 2019 13:53:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 50C686E60E for ; Thu, 1 Aug 2019 13:53:06 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:56446 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1htBVw-0000ZK-2L; Thu, 01 Aug 2019 15:53:04 +0200 From: =?utf-8?q?Noralf_Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/4] drm/mipi-dbi: Support panel drivers Date: Thu, 1 Aug 2019 15:52:45 +0200 Message-Id: <20190801135249.28803-1-noralf@tronnes.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org; s=ds201810; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From; bh=UQ5S3H7fpq7P8ZdgdgUkPjAzA4suHj+O1q/tnEsWZ/Y=; b=UszfrFpD1QqXh21XidjusIMLdUtPfHY0ENpofVrGJqP5IUFa8nPaRkC2LNs0gd3k06Fviij1q5fUws2X56ccsx9ash998tds6IOcODj7Cfqhc9Hk2aWstMZdclzXIBnuLAqAy41ChgvYYQhkbH0g4e3zExE7N4fo3Rb6Ohmd8FsnOK/rboNe6uy1AWC1HXXSXZaksT7JBQtcuN0hvwleO+ecURwLnQh/9eKMa6XQsDpdVDd01UCcPGI0PxsasTXbbtmj/NMiWMVnJIOkH/9uKoo10+TXcNDcpfumGRZmzCUaB6wnX2JJkoS+sO9HMlmxd9P9c6DciIXvcawbQhNiBw==; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.vetter@ffwll.ch, emil.l.velikov@gmail.com, josef@lusticky.cz, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, sam@ravnborg.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series adds drm_panel support to drm_mipi_dbi. This avoids having 2 drivers for the same controller, one per interface DPI/DBI. Some display controllers like the ILI9341 support both interfaces and some displays/panels make both these interfaces available. Some info about why MIPI DBI is special: MIPI DSI (Display Serial Interface) and MIPI DPI (Display Pixel Interface) needs specialiced hardware and thus they have interface drivers for this. MIPI DBI (Display Bus Interface) on the other hand reuses existing busses like SPI/8080/6800 and in the case of SPI just reuses the exising SPI subsystem. All the panels I have seen that have onboard RAM and can receive pixels over DBI needs to initialize the controller as well. This means that both the panel driver and the interface driver needs access to the same bus device. Changes since RFC[1]: - Instead of starting with Josef's driver[2], I've started with moving the existing ili9341 driver into drm/panel and then move over mi0283qt as well since it has a ili9341 controller. Josef can then add support for his panel to this driver. His panel can support both interface modes. - Emil mentioned that the DRM driver name is ABI so I've honoured that. - The DRM driver structure is now defined in the driver using a macro instead of doing it in drm_mipi_dbi. This is necessary for file open to take a ref on the driver module. Another thing: Looking at drm_panel.c I couldn't find anything that pins the panel driver module while the panel is attached to the connector. Shouldn't struct drm_panel_funcs have a module owner field? Noralf. [1] https://patchwork.freedesktop.org/series/64398/ [2] https://patchwork.freedesktop.org/patch/316528/ Noralf Trønnes (4): drm/mipi-dbi: Support command mode panel drivers drm/tiny/ili9341: Move driver to drm/panel drm/tiny/mi0283qt: Move driver to panel-ilitek-ili9341 drm/panel/ili9341: Support DPI panels MAINTAINERS | 16 +- drivers/gpu/drm/drm_mipi_dbi.c | 92 ++++ drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 469 +++++++++++++++++++ drivers/gpu/drm/tiny/Kconfig | 24 - drivers/gpu/drm/tiny/Makefile | 2 - drivers/gpu/drm/tiny/ili9341.c | 268 ----------- drivers/gpu/drm/tiny/mi0283qt.c | 294 ------------ include/drm/drm_mipi_dbi.h | 34 ++ 10 files changed, 618 insertions(+), 595 deletions(-) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c delete mode 100644 drivers/gpu/drm/tiny/ili9341.c delete mode 100644 drivers/gpu/drm/tiny/mi0283qt.c