All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Simon Ser <contact@emersion.fr>
Cc: "Sebastian Wick" <sebastian.wick@redhat.com>,
	"Jonas Ådahl" <jadahl@redhat.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Pekka Paalanen" <ppaalanen@gmail.com>,
	"Vitaly Prosyak" <vitaly.prosyak@amd.com>
Subject: Re: How should "max bpc" KMS property work?
Date: Thu, 28 Apr 2022 17:50:03 +0300	[thread overview]
Message-ID: <YmqpmzBrJLX6Xowq@intel.com> (raw)
In-Reply-To: <LN_QB3Nb1GNVmbIVpDUJ4ZVnK3WVHlLKwEYxIqEMYJYc2BohK-7VrtEXJF7iDytYws4tiq2RnimS1QsqwERDdReixBshVTVzNyAMOcWsE3M=@emersion.fr>

On Thu, Apr 28, 2022 at 07:52:58AM +0000, Simon Ser wrote:
> On Thursday, April 28th, 2022 at 09:50, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> 
> > > > > Also like Alex said, the kernel does not know if the user prefers high
> > > > > color depth or high refresh rate either. One way to solve that is to
> > > > > light up the requested video mode any way the kernel can, and then
> > > > > report what the resulting color depth is. Another way is to have
> > > > > explicit "use this bpc or fail" KMS property, maybe in the form of 'min
> > > > > bpc' as I recall being discussed in the past, and let userspace guess
> > > > > what might work. The former is easier to light up, but probing requires
> > > > > actually setting the modes. The latter may require a lot of
> > > > > trial-and-error from userspace to find anything that works, but it
> > > > > takes only time and not blinking - as far as things can be detected
> > > > > with TEST_ONLY commits. Then one still has to ask the user if it
> > > > > actually worked.
> > > >
> > > > min_bpc sounds like something we might want for HDR use-cases, unless
> > > > the compositor has a way to confirm the output box (and format). min_bpc
> > > > would allow the KMS driver to pick the lowest required bpc so the
> > > > compositor always has a guarantee of quality.
> > >
> > > IMO that would be ideal. The driver should try to reduce bandwidth by lowering
> > > the bpc down to the min_bpc if the hardware can't drive the selected mode at a
> > > higher bpc. User space usually knows which bpc is sufficient for the use case
> > > but will never complain about too much bpc. Drivers which don't support
> > > lowering the bpc dynamically can then still go with the min_bpc and user space
> > > still gets all the modes which work with the minimum required bpc.
> >
> >
> > This would be nice, yes.
> >
> > I'm fairly sure 'min bpc' was discussed here on the dri-devel mailing
> > list in the past, but I don't remember when or by whom.
> 
> Yup. I explained there that I'd prefer "current bpc" + "user bpc" props
> and let user-space deal with the fallback logic just like it does for
> modes, modifiers, etc.

The main problem is that the bpc is not really al that well defined.
We have stuff like 4:2:0 subsampling, DSC (compression), etc. muddying
the waters. Of course max_bpc already suffers a bit from those issues,
but at least it can still claim to do what it says on the tin.
Guaranteeing any kind of minimum bpc is not possible without first
defining what that actually means.

Oh and the various processing blocks in the pipeline might also have
varying input/output precision. So those can also degrade the quality
regardless of how many bits are coming out the end of the pipe.

I suspect trying to exose all that explicitly would result in an API
that just has too many knobs and interactions between the knobs. So
likely no one would be able to succesfully use it.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2022-04-28 14:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  8:35 How should "max bpc" KMS property work? Pekka Paalanen
2022-04-26 17:55 ` Ville Syrjälä
2022-04-27 10:52   ` Pekka Paalanen
2022-04-27 15:02     ` Michel Dänzer
2022-04-27 15:41     ` Harry Wentland
2022-04-27 21:29       ` Sebastian Wick
2022-04-28  7:50         ` Pekka Paalanen
2022-04-28  7:52           ` Simon Ser
2022-04-28 14:50             ` Ville Syrjälä [this message]
2022-04-28 19:00               ` Sebastian Wick
2022-05-20 15:20   ` Hans de Goede
2022-05-23  8:22     ` Pekka Paalanen
2022-05-23 11:54       ` Sebastian Wick
2022-05-24  9:36         ` Hans de Goede
2022-05-24 15:43           ` Ville Syrjälä
2022-05-24 22:03             ` Alex Deucher
2022-05-25  6:04               ` Simon Ser
2022-05-25  7:17                 ` Pekka Paalanen
2022-05-25  8:42               ` Michel Dänzer
2022-05-25  7:28         ` Pekka Paalanen
2022-05-25  8:35           ` Michel Dänzer
2022-05-25  9:23             ` Simon Ser
2022-05-25 10:36               ` Pekka Paalanen
2022-05-30 10:21                 ` Jani Nikula
2022-05-31 17:37                 ` Ville Syrjälä
2022-06-01  7:21                   ` How should "max bpc" and "Colorspace" " Pekka Paalanen
2022-06-01  7:26                     ` Simon Ser
2022-06-01 14:06                     ` Ville Syrjälä
2022-06-01 22:25                       ` Sebastian Wick
2022-06-02  7:47                       ` Pekka Paalanen
2022-06-02 16:40                         ` Ville Syrjälä
2022-06-02 17:08                           ` Sebastian Wick
2022-06-02 17:20                             ` Ville Syrjälä
2022-06-03  7:19                           ` Pekka Paalanen
2022-06-03 16:27                             ` Ville Syrjälä
2022-04-26 19:38 ` How should "max bpc" " Alex Deucher
2022-04-26 19:55   ` Ville Syrjälä

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=YmqpmzBrJLX6Xowq@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=contact@emersion.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jadahl@redhat.com \
    --cc=ppaalanen@gmail.com \
    --cc=sebastian.wick@redhat.com \
    --cc=vitaly.prosyak@amd.com \
    /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.