All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>
Cc: linux-sunxi@googlegroups.com, dri-devel@lists.freedesktop.org
Subject: Planes enumeration with sun4i-drm driver
Date: Fri, 12 Oct 2018 18:47:13 +0200	[thread overview]
Message-ID: <032bb9a1511e9c89d119cd8a0cd8dbb08226e286.camel@paulk.fr> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1927 bytes --]

Hi,

I'm looking at the sun4i DRM driver these days (especially for
mainlining the VPU tiled format support through the frontend).

The way things are done currently, all the possibly-supported plane
formats are listed in sun4i_backend_layer_formats and exposed as-is to
userspace for every plane. However, some of these formats cannot be
used on all planes at the same time and will be rejected when checking
the atomic commit.

I find this a bit confusing from a userspace perspective.

Not all constraints can be provided to userspace (e.g. the number of
planes we can effectively scale), but when it comes to formats, we have
that possibility. So perhaps it would make sense to only enumerate
formats as many times as we can support them.

For instance, it could look like:
# plane 0: primary, RGB only
# plane 1: overlay, RGB + backend YUV formats
# plane 2: overlay, RGB + frontend YUV formats
# plane 3: overlay, RGB only

That's not perfect either, because e.g. requesting a scaled RGB plane
will require the frontend and thus make it impossible to use the
frontend YUV formats that would still be described. But it feels like
it would be closer to representing hardware capabilities than our
current situation.

I am really not sure about the DRM subsystem policy about this, though.
Perhaps it was already decided that it's fine to deal with everything
at commit checking time and report more formats than the hardware can
really handle.

For sun8i and onwards, there is a clear separation between UI and video
planes in both the hardware and the code, so this problem doesn't occur
(only video planes are reported to support YUV).

What do you think?

Cheers,

Paul

-- 
Developer of free digital technology and hardware support.

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-10-12 16:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 16:47 Paul Kocialkowski [this message]
     [not found] ` <032bb9a1511e9c89d119cd8a0cd8dbb08226e286.camel-W9ppeneeCTY@public.gmane.org>
2018-10-15  8:29   ` Planes enumeration with sun4i-drm driver Maxime Ripard
2018-10-15 14:52     ` Daniel Vetter
     [not found]       ` <CAKMK7uHU--mbR1AQWqDB58U2pjzDSgSK+Ma3zyNEtJ4kCks+uw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-18 10:27         ` Maxime Ripard
2018-10-18 11:45           ` Daniel Vetter
     [not found]             ` <CAKMK7uG=GcE_S9trcNft9ueLi-L9jtUYwEyTxPXB088h6ryQeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-26  8:29               ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=032bb9a1511e9c89d119cd8a0cd8dbb08226e286.camel@paulk.fr \
    --to=contact@paulk.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.