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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 67062C433E0 for ; Sun, 24 May 2020 17:46:33 +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 173AE2073B for ; Sun, 24 May 2020 17:46:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=tronnes.org header.i=@tronnes.org header.b="GRIbVQIp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 173AE2073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tronnes.org 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 0B9FD89DDF; Sun, 24 May 2020 17:46:32 +0000 (UTC) Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id E80F889DDF for ; Sun, 24 May 2020 17:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org ; s=ds201912; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gEucHw00yI0aDw2301W8fLDPFjF0TZfhsCmw9IsXOBs=; b=GRIbVQIppWgeNa7ixzVNW22N+Z vpo4I3CslBa3BVW17pWaVO8O7AKqUgDNNhDaaHxOx5voXbIDMyaXxlFbO75CPA3EVFN2pq+ynkeld OwL8cxXFs2KTpuhiZAxe4aqBhjFH5N658kMJkMgerzUeHF5VBViHnWWC4b5UMq1JMGaTPUp+OToxj N/eFkWovNXM2NxlSe9kKaQarW9aUpeQbgDfGjGUdaoVdY91KDeCTN2dyofqYnc0UL2mvnHuAJpAje Sr1g4rrKMmFoo/+5JsWxOqdZxykkW8qUm0lLpfMCtl69nILNQtjYdzHkyCiWCss1Rcg1zJZQ9Aksu w+mCIu/w==; Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:51721 helo=[192.168.10.61]) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jcuhg-0004FH-MM; Sun, 24 May 2020 19:46:28 +0200 Subject: Re: MIPI DSI, DBI, and tinydrm drivers To: Paul Cercueil , dri-devel References: <4QFUAQ.UPWBIKSUSOG@crapouillou.net> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <05f4908a-2df4-2694-e5e6-0faee31cc2a9@tronnes.org> Date: Sun, 24 May 2020 19:46:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <4QFUAQ.UPWBIKSUSOG@crapouillou.net> 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: Sam Ravnborg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Den 24.05.2020 18.13, skrev Paul Cercueil: > Hi list, > > I'd like to open a discussion about the current support of MIPI DSI and > DBI panels. > > Both are standards from the MIPI alliance, both are communication > protocols between a LCD controller and a LCD panel, they generally both > use the same commands (DCS), the main difference is that DSI is serial > and DBI is generally parallel. > > In the kernel right now, DSI is pretty well implemented. All the > infrastucture to register a DSI host, DSI device etc. is there. DSI > panels are implemented as regular drm_panel instances, and their drivers > go through the DSI API to communicate with the panel, which makes them > independent of the DSI host driver. > > DBI, on the other hand, does not have any of this. All (?) DBI panels > are implemented as tinydrm drivers, which make them impossible to use > with regular DRM drivers. Writing a standard drm_panel driver is > impossible, as there is no concept of host and device. All these tinydrm > drivers register their own DBI host as they all do DBI over SPI. > > I think this needs a good cleanup. Given that DSI and DBI are so > similar, it would probably make sense to fuse DBI support into the > current DSI code, as trying to update DBI would result in a lot of code > being duplicated. With the proper host/device registration mechanism > from DSI code, it would be possible to turn most of the tinydrm drivers > into regular drm_panel drivers. > > The problem then is that these should still be available as tinydrm > drivers. If the DSI/DBI panels can somehow register a .update_fb() > callback, it would make it possible to have a panel-agnostic tinydrm > driver, which would then probably open a lot of doors, and help a lot to > clean the mess. > > I think I can help with that, I just need some guidance - I am fishing > in exotic seas here. > > Thoughts, comments, are very welcome. I did look at this a few months back: drm/mipi-dbi: Support panel drivers https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems. My initial tinydrm work used drm_panel, but I was not allowed to use it (at least not the way I had done it). Noralf. > > Cheers, > -Paul > > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel