All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Artem Mygaiev <joculator@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Question about sRGB framebuffer support
Date: Wed, 6 May 2020 12:18:40 +0300	[thread overview]
Message-ID: <20200506091840.GP6112@intel.com> (raw)
In-Reply-To: <CAJwc6Kum2SrGixZyJzAWjC71pxO8zkBJ7MBfdVhxZOFvWyw4RQ@mail.gmail.com>

On Wed, May 06, 2020 at 12:04:22PM +0300, Artem Mygaiev wrote:
> Hello Ville
> 
> On Wed, May 6, 2020 at 10:45 AM Ville Syrjälä
> <ville.syrjala@linux.intel.com> wrote:
> >
> > On Tue, May 05, 2020 at 01:24:16PM +0300, Artem Mygaiev wrote:
> > > Hello all
> > >
> > > I am currently working on DRM/KMS driver for Fresco Logic FL2000 USB display
> > > controller [1]. I have already implemented a POC driver [2] which is working for
> > > me, although there are still plenty of things to improve or fix, of course.
> > >
> > > So far I have one thing that I somehow cannot find in DRM/KMS documentation or
> > > existing drivers: how to tell the system that HW expects sRGB (i.e. non-linear)
> > > color encoding in framebuffers? This is a HW limitation that I cannot influence
> > > by configuration.
> >
> > Does it do something to process the data that requires linearization
> > or why does it care about the gamma applied to the data? In a typical
> > use case the data is just passed through unless the user asks otherwise,
> > so it doesn't matter much what gamma was used. Though most displays
> > probably expect something resembling sRGB gamma by default, so that's
> > presumably what most things generate, and images/videos/etc. pretty
> > much always have gamma already applied when they are produced.
> >
> 
> Unfortunately the HW was designed in a way that when it is configured to 24-bit
> RGB888 it expects sRGB and applies degamma automatically. It is not possible to
> disable this, I've asked vendor and they confirmed this [1].

So it always does degamma+gamma for no real reason? That shouldn't
really matter (apart from potentially losing some precision in those
conversions).

> 
> The only workaround I could implement now is to switch it to 16-bit RGB565 and
> perform framebuffer conversions in driver, similar to what
> rm_fb_xrgb8888_to_rgb565() alike helpers do; but it would be still great to
> understand whether it is possible to support sRGB.
> 
> [1] https://github.com/FrescoLogic/FL2000/issues/42
> 
> > >
> > > Any pointers are greatly appreciated.
> > >
> > > [1] www.frescologic.com/product/single/fl2000
> > > [2] https://github.com/klogg/fl2000_drm
> > >
> > > Best regards,
> > >  -- Artem
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
> > --
> > Ville Syrjälä
> > Intel
> 
> Best regards,
> Artem Mygaiev

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-05-06  9:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 10:24 Question about sRGB framebuffer support Artem Mygaiev
2020-05-05 19:03 ` Sam Ravnborg
2020-05-05 19:17   ` Artem Mygaiev
2020-05-06  7:44 ` Ville Syrjälä
2020-05-06  9:04   ` Artem Mygaiev
2020-05-06  9:18     ` Ville Syrjälä [this message]
2020-05-06  9:25       ` Artem Mygaiev
2020-05-06  9:33         ` Ville Syrjälä
2020-05-06 13:54           ` Artem Mygaiev
2020-05-07  6:07             ` Ville Syrjälä
2020-05-07  6:18               ` Ville Syrjälä
2020-05-07  9:15                 ` Artem Mygaiev

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=20200506091840.GP6112@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joculator@gmail.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.