[RFC] drm: add support for tiled/compressed/etc modifier in addfb2

Daniel Stone daniel at fooishbar.org
Fri Dec 12 09:11:50 PST 2014


Hi,

On 12 December 2014 at 15:30, Ville Syrjälä <ville.syrjala at linux.intel.com>
wrote:
>
> On Fri, Dec 12, 2014 at 03:11:02PM +0000, Daniel Stone wrote:
> > On 12 December 2014 at 14:56, Ville Syrjälä <
> ville.syrjala at linux.intel.com>
> > wrote:
> > Having them separated is still kinda nice though, for the same rationale
> as
> > the EGLImage import extension having them as hints. If your hardware
> > doesn't support the tiling/compression format you use, then you're going
> to
> > be showing absolute garbage. But if it doesn't support your exact
> > chroma-siting or YUV range request, it'll still be totally viewable, just
> > not entirely perfect. So I don't see the logic in failing these.
>
> Well, it will look nasty when switching between GL and display
> composition the GL path does the right thing an display path doesn't/
> And we already have that problem with the fuzzy alignment/scaling
> restriction stuff. So I think we will want some kind of strict flag
> somewhere to allow the user to specify that they'd rather fail the whole
> thing and fall back to GL rather than annoy the user.
>

If you're doing it through GL, you've already lost. Either you're doing
some magic behind the user's back to bind multi-planar dmabuf-EGLImages to
TEXTURE_2D with RGB sampling, or you're binding to TEXTURE_EXTERNAL_OES,
which forces you to use linear/nearest filtering. Even if you do use
TEXTURE_2D binding, the EGLImage import spec does exactly the same as
what's suggested here, and treats them as hints, which the implementation
can use or ignore. So far I don't know of any implementation which doesn't
ignore them.

FWIW, i965 completely disallows multi-planar EGLImage imports in the first
place. Mali as shipped on ChromeOS forces you to use TEXTURE_EXTERNAL_OES.
Soooo ...


> But for some simpler cases like Xv it would seem perfectly OK to use the
> less strict rules. Well, unless someone implements Xv in a way that can
> also transparently switch between display planes and GL/software rendering.


Well sure, if you absolutely want to ensure it works, you're going to need
some kind of query. Maybe, if the range/chroma-siting ones were part of a
bitmask, you could steal the top bit to mark that the hints are actually
requirements, and to fail if you can't respect the hints.


> > Well, you don't have to solve literally everything at once. Just having a
> > list of formats which could possibly be supported if you did the right
> > thing, would be a hell of a lot better than punting to userspace, which
> > either a) has to have hardware-specific knowledge in every component
> > (compositor, media library, etc etc), or b) brute-force it. The lack of
> any
> > format query in EGLImage dmabuf import is a serious, serious, serious,
> pain
> > when trying to do generic userspace (e.g. compositor feeds GStreamer a
> list
> > of formats which are supported by the hardware). I get that there are
> > combinations that could fail, but that's true of everything. At least
> > narrowing down the problem space a bit is an enormous help.
>
> We alredy have a list of supported formats. The problem is when specific
> formats impose additonal constraints (eg. more restricted scaling factor
> limits).


Where's the list of supported formats in this proposal? It just adds a
modifier: there's no way to determine which modifiers are supported by a
specific plane, which is what I really need to know. Right now, the only
way is just brute-forcing your way through every single combination until
you find one which succeeds.

Like I said, I completely get that there are going to be
specific/weird/arbitrary restrictions. There already are, such as scaling
factors, maximum one non-primary plane per scanline, global bandwidth
limits, etc etc. Those are not something KMS has ever attempted to solve,
and I'm not suggesting that the modifier mechanism attempts to solve them.

Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141212/28ffaeaf/attachment.html>


More information about the dri-devel mailing list