From: Inki Dae Subject: RE: [RFC 0/2] drm/bridge: panel and chaining Date: Wed, 30 Apr 2014 15:28:36 +0900 Message-ID: <011201cf643d$6af2e680$40d8b380$%dae@samsung.com> References: <1398801463-29732-1-git-send-email-robdclark@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id EFE5C6EB5F for ; Tue, 29 Apr 2014 23:28:39 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4T00NC8ZBQ3J20@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 30 Apr 2014 15:28:38 +0900 (KST) In-reply-to: <1398801463-29732-1-git-send-email-robdclark@gmail.com> Content-language: ko List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: 'Rob Clark' , dri-devel@lists.freedesktop.org Cc: 'Ajay Kumar' List-Id: dri-devel@lists.freedesktop.org Hi Rob, > -----Original Message----- > From: dri-devel [mailto:dri-devel-bounces@lists.freedesktop.org] On Behalf > Of Rob Clark > Sent: Wednesday, April 30, 2014 4:58 AM > To: dri-devel@lists.freedesktop.org > Cc: Ajay Kumar > Subject: [RFC 0/2] drm/bridge: panel and chaining > > So I thought it would be easier to explain what I had in mind regarding > Ajay's patchset (to add panel support) in patch form. Originally Thierry > had some concerns with adding panel support in bridges ad-hoc. So this > idea adds the support of chaining multiple bridges, one of which may be a > panal adapter (maybe I should have called it drm_panel_adapter_bridge). > There are a few rough edges and TODOs, it isn't trying to be complete yet. > > So the one question is about that hunk I had to move in ptn3460 from > pre_enable() to enable(). If that really needs to come before the encoder > and after the panel, then we should go for a slightly different approach > instead: add a 'struct drm_bridge *next' ptr in 'struct drm_bridge'. Then > each bridge implementation is responsible to call the next in the chain > (if not null) at the appropriate points. That gives a bit more > flexibility to bridges to have something both pre and post the downstream > bridge/panel in each of the pre/enable/disable/post steps. > I think there would be better idea than chaining multiple bridges. For this, we had already discussed it[1], and I had posted relevant patch[2] for RFC. My idea was that encoder driver has one or two bridge objects - for panel and lvds, and also image enhancer for crtc driver. The integrated drm_bridge structure including callback set for them. Originally, it was called "drm_hw_block" but would be reasonable to change to "drm_bridge" and existing drm_bridge relevant codes should be removed. The important thing in my approach is that the integrated drm_bridge structure uses existing drm_panel infrastructure. The reason I did so was for that bridge device drivers such as lvds and image enhancer could comply with driver-model - now bridge drivers are non driver-model driver so encoder drivers should call some function directly to initialize the bridge driver. e.g. ptn3460_init function. And also with this approach crtc drivers could control bridge device such as image enhancer - Image enhancer can be placed between crtc and encoder/connector, and actually Exynos SoC has such hardware. For this, I'm planning to post next patch series, at least within this cycle. [1] http://www.spinics.net/lists/dri-devel/msg55555.html [2]http://www.spinics.net/lists/dri-devel/msg55658.html Thanks, Inki Dae > > Rob Clark (2): > drm/bridge: add composite and panel bridges > drm/bridge/ptn3460: add panel support > > drivers/gpu/drm/bridge/Makefile | 2 + > drivers/gpu/drm/bridge/drm_bridge_util.c | 251 > +++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/drm_bridge_util.h > | 29 ++++ > drivers/gpu/drm/bridge/ptn3460.c | 39 ++++- > include/drm/bridge/ptn3460.h | 6 +- > 5 files changed, 319 insertions(+), 8 deletions(-) create mode 100644 > drivers/gpu/drm/bridge/drm_bridge_util.c > create mode 100644 drivers/gpu/drm/bridge/drm_bridge_util.h > > -- > 1.9.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel