public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Kausal Malladi <kausalmalladi@gmail.com>
Subject: Re: [PATCH 1/6] drm: Create Color Management DRM properties
Date: Tue, 12 Jan 2016 12:02:30 +0200	[thread overview]
Message-ID: <20160112100230.GO23290@intel.com> (raw)
In-Reply-To: <CAPj87rPmcHtdg=q0+bSS9oz5V_-WYrFnn0RK5PcBpikj29fZwg@mail.gmail.com>

On Mon, Jan 11, 2016 at 08:37:09PM +0000, Daniel Stone wrote:
> Hi,
> 
> On 5 January 2016 at 10:23, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Wed, Dec 23, 2015 at 09:47:00AM +0000, Daniel Stone wrote:
> >> It's not even a legacy vs. atomic thing, this can happen in
> >> pure-atomic as well. Same as the render-compression plane property
> >> that I just replied to here as well.
> >>
> >> - Weston starts and sets up palette/CTM properties
> >> - VT switch to Mutter, which isn't aware of new properties
> >> - Mutter atomically sets new plane state, containing framebuffer which
> >> is already colour-corrected for the target
> >> - result is now double-corrected as Mutter didn't know to unset the
> >> old properties
> >>
> >> IOW, in the current model, any user of CM has to explicitly unset it
> >> before handover (not always actually possible), or any generic
> >> userspace must unset every property it sees and doesn't know about,
> >> hoping that setting to 0 will do the right thing.
> >>
> >> Or we could add another client cap, which would prevent the CM
> >> properties from ever being exposed to userspace which doesn't know how
> >> to work with it. Passing the client caps through to
> >> plane_duplicate_state also means that we can unset the CM properties
> >> at this early point for unaware clients. This would mean that we
> >> wouldn't have to have code to explicitly unset it in, e.g., every
> >> legacy hook.
> >
> > We don't have any support for unsetting anything really. Same argument you
> > make for CM here applies to rotation too. The only generic solution (if
> > you really care about this) would be for logind to once sample all atomic
> > state on boot-up, and force-restore that state when switching. Restoring
> > atomic state doesn't require userspace to understanding the semantics
> > really.
> 
> Sure, but on the other hand, rotation has been around ~forever, and is
> implemented in multiple places. Colour management is a lot less
> obvious.
> 
> > This kind of force-restoring is probably something we should implement in
> > the fbdev emulation, which would cover about 99% of all cases where
> > developers/users want to run different compositors. Or fbdev should simply
> > reset CM state, like it does for rotation already (that part is easy to
> > add, but indeed seems to be missing).
> >
> > Trying to create an ad-hoc solution (using opt-in flags) to this problem
> > for every single feature seems pointless imo.
> 
> Fair enough, I guess it could be more difficult, so how about a new
> flag to the atomic ioctl which requests state be _reset_ to scratch
> rather than duplicated? That way, clients could be really sure they
> weren't going to get screwed by rotation / colour management / render
> compression / whatever.

One question is what exactly is scratch? Eg. I have BYT tablet here
which has the display mounted upside down so in theory the reset state
should be 180 degree rotated. I have a patch hiding in some branch
to make the fbdev helper take over the rotation from the BIOS. I suppose
I should also dig into the VBT to see if there's some rotation indicators
there for the cases when you boot with HDMI plugged in. But I digress.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-12 10:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 18:57 [PATCH 0/6] Color Management for DRM framework v10 Lionel Landwerlin
2015-12-17 18:57 ` [PATCH 1/6] drm: Create Color Management DRM properties Lionel Landwerlin
2015-12-17 21:40   ` kbuild test robot
2015-12-18 16:53   ` Daniel Stone
2015-12-21 12:38     ` Daniel Vetter
2015-12-23  9:47       ` Daniel Stone
2016-01-05 10:23         ` Daniel Vetter
2016-01-11 20:37           ` Daniel Stone
2016-01-12 10:02             ` Ville Syrjälä [this message]
2015-12-21 12:43   ` Daniel Vetter
2015-12-17 18:57 ` [PATCH 2/6] drm/i915: Add set property interface for CRTC Lionel Landwerlin
2015-12-17 18:57 ` [PATCH 3/6] drm/i915: Disable plane gamma Lionel Landwerlin
2015-12-17 18:57 ` [PATCH 4/6] drm/i915/chv: Implement color management Lionel Landwerlin
2015-12-18 16:53   ` Daniel Stone
2015-12-21 12:49   ` Daniel Vetter
2015-12-17 18:57 ` [PATCH 5/6] drm/i915/bdw+: " Lionel Landwerlin
2015-12-18 16:53   ` Daniel Stone
2015-12-17 18:57 ` [PATCH 6/6] drm/i915: Register color correction capabilities Lionel Landwerlin
2015-12-18 16:54   ` Daniel Stone
2015-12-18  4:06 ` [PATCH 0/6] Color Management for DRM framework v10 Sharma, Shashank

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=20160112100230.GO23290@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@fooishbar.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kausalmalladi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox