From: "Clark, Rob" Subject: Re: [RFC] drm: add overlays as first class KMS objects Date: Sat, 14 May 2011 19:00:16 -0500 Message-ID: References: <20110425151220.2f5dc17a@jbarnes-desktop> <20110513180256.773ec8aa@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20110513180256.773ec8aa@jbarnes-desktop> Sender: linux-media-owner@vger.kernel.org To: Jesse Barnes Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, Hans Verkuil , linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Fri, May 13, 2011 at 8:02 PM, Jesse Barnes wrote: > On Fri, 13 May 2011 18:16:30 +0200 > Daniel Vetter wrote: > >> Hi Jesse, >> >> Discussion here in Budapest with v4l and embedded graphics folks was >> extremely fruitful. A few quick things to take away - I'll try to di= g >> through all >> the stuff I've learned more in-depth later (probably in a blog post = or two): Hi Daniel, thanks for writing this up >> - embedded graphics is insane. The output routing/blending/whatever >> =A0 currently shipping hw can do is crazy and kms as-is is nowhere n= ear up >> =A0 to snuff to support this. We've discussed omap4 and a ti chip ta= rgeted at >> =A0 video surveillance as use cases. I'll post block diagrams and ex= planations >> =A0 some when later. > > Yeah I expected that; even just TVs can have really funky restriction= s > about z order and blend capability. > >> - we should immediately stop to call anything an overlay. It's a con= fusing >> =A0 concept that has a different meaning in every subsystem and for = every hw >> =A0 manufacturer. More sensible names are dma fifo engines for thing= s that slurp >> =A0 in planes and make them available to the display subsystem. Blen= d engines >> =A0 for blocks that take multiple input pipes and overlay/underlay/b= lend them >> =A0 together. Display subsytem/controller for the aggregate thing in= cluding >> =A0 encoders/resizers/outputs and especially the crazy routing netwo= rk that >> =A0 connects everything. > > How about just "display plane" then? =A0Specifically in the context o= f > display output hardware... "display plane" could be a good name.. actually in omap4 case it is a single dma engine that is multiplexing fetches for however many attached video pipes.. that is perhaps an implementation detail, but it makes "display plane" sound nicer as a name > >> 1) Splitting the crtc object into two objects: crtc with associated = output mode >> (pixel clock, encoders/connectors) and dma engines (possibly multipl= e) that >> feed it. omap 4 has essentially just 4 dma engines that can be freel= y assigned >> to the available outputs, so a distinction between normal crtcs and = overlay >> engines just does not make sense. There's the major open question of= where >> to put the various attributes to set up the output pipeline. Also so= me of these >> attributes might need to be changed atomicly together with pageflips= on >> a bunch of dma engines all associated with the same crtc on the next= vsync, >> e.g. output position of an overlaid video buffer. > > Yeah, that's a good goal, and pretty much what I had in mind here. > However, breaking the existing interface is a non-starter, so either = we > need a new CRTC object altogether, or we preserve the idea of a > "primary" plane (whatever that means for a given platform) that's tie= d > to each CRTC, which each additional plane described in a separate > structure. =A0Z order and blend restrictions will have to be communic= ated > separately I think... In the cases I can think of, you'll always have a primary plane, so userspace need not explicitly specify it. But I think you want the driver to pick which display plane to be automatically hooked between the primary fb and crtc, or at least this should be the case if some new bit is set in driver_features to indicate the driver supports multiple display planes per crtc. BR, -R > Thanks, > -- > Jesse Barnes, Intel Open Source Technology Center >