From: Matt Roper <matthew.d.roper@intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>
Cc: "Matheson, Annie J" <annie.j.matheson@intel.com>,
"Bradford, Robert" <robert.bradford@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Bish, Jim" <jim.bish@intel.com>,
"Smith, Gary K" <gary.k.smith@intel.com>,
"kausalmalladi@gmail.com" <kausalmalladi@gmail.com>,
"Vetter, Daniel" <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH 10/23] drm/i915: Add gamma correction handlers
Date: Mon, 28 Sep 2015 14:42:57 -0700 [thread overview]
Message-ID: <20150928214257.GC4359@intel.com> (raw)
In-Reply-To: <FF3DDC77922A8A4BB08A3BC48A1EA8CB09A33565@BGSMSX101.gar.corp.intel.com>
Yep, Daniel's right; for properties that are not specific to the driver,
the core core should take care of stuffing the values provided by
userspace into the state structures so that every driver that wants to
use these doesn't need to replicate that logic. My bad for not catching
this in my earlier reviews; sorry about that. Basically the change
required is to add another else clause to
drm_atomic_crtc_{get,set}_property(), before the core tries to call into
the driver-specific handler. You'll notice that what you're doing with
color management blobs here is actually very similar to what's already
done for the existing mode blob, so you can take a look at that case for
an example.
Also, the functions like intel_color_manager_set_pipe_gamma() will get
moved into the DRM core and the "intel_" prefix will switch to "drm_"
since there's really nothing Intel-specific about what they're doing.
Sorry again for not noticing this and bringing it up on the earlier
reviews. Fortunately the changes required should be pretty small.
Matt
On Mon, Sep 28, 2015 at 01:19:13AM -0700, Sharma, Shashank wrote:
> Matt, your opinion about this ?
>
> Regards
> Shashank
> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
> Sent: Monday, September 28, 2015 12:14 PM
> To: Sharma, Shashank
> Cc: Daniel Vetter; Roper, Matthew D; Bish, Jim; Bradford, Robert; Smith, Gary K; dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; Matheson, Annie J; kausalmalladi@gmail.com; Vetter, Daniel
> Subject: Re: [Intel-gfx] [PATCH 10/23] drm/i915: Add gamma correction handlers
>
> On Sat, Sep 26, 2015 at 09:18:48PM +0530, Sharma, Shashank wrote:
> > On 9/23/2015 1:52 PM, Sharma, Shashank wrote:
> > >>Since color manager properties are meant as a new standardize KMS
> > >>extension (we put them into the core drm_crtc_state) the get/set
> > >>support should also be in the core. See e.g. how the rotation
> > >>property is handled in drm_atomic_plane_get/set_property. So all
> > >>this code should be added to drm_atomic_crtc_get/set_property.
> > >Thanks, sounds like a good one. Will move this.
> > Actually, while implementing this, I realized that this change is not
> > required.
> > What we want to do in drm_atomic_crtc_get/set code is:
> > if (prop == config->cm_palette_after_ctm_property || prop ==
> > config->cm_palette_before_ctm_property) {
> > crtc->funcs->atomic_get_property();
> > }
> >
> > Which is already being done in the current code:
> > else if (crtc->funcs->atomic_get_property)
> > return crtc->funcs->atomic_get_property(crtc, state, property, val);
>
> This code is to pass any property unknown to the drm core into the driver.
> But since we want this to be a new drm core property set (that's why it's in drm_crtc_state) the decoding should be done in the core too.
>
> Note that atomic_get/set_property _only_ map between the property as seen by userspace and the state structures. They're not allowed to do anything else like compute derived state, check constraints or put the state into the hw. That's for the atomic_check and atomic_commit callbacks. So for this patchset here you should move all the code in the atomic_get/set_property callbacks you add in i915 into the drm core. Like it is doen for the rotation property.
> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-09-28 21:42 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 17:36 [PATCH 00/23] Color Management for DRM Shashank Sharma
2015-09-16 17:36 ` [PATCH 01/23] drm: Create Color Management DRM properties Shashank Sharma
2015-09-16 17:51 ` Matt Roper
2015-09-23 8:51 ` Sharma, Shashank
2015-09-16 17:36 ` [PATCH 02/23] drm: Add structure for querying palette color capabilities Shashank Sharma
2015-09-16 17:51 ` Matt Roper
2015-09-22 13:02 ` Daniel Vetter
2015-09-23 8:10 ` Sharma, Shashank
2015-09-23 9:47 ` Smith, Gary K
2015-09-23 11:57 ` Sharma, Shashank
2015-09-23 13:26 ` Daniel Vetter
2015-09-16 17:37 ` [PATCH 03/23] drm: Add color correction blobs in CRTC state Shashank Sharma
2015-09-16 17:37 ` [PATCH 04/23] drm: Add drm structures for palette color property Shashank Sharma
2015-09-21 16:46 ` Ville Syrjälä
2015-09-22 7:57 ` Sharma, Shashank
2015-09-22 13:08 ` Daniel Vetter
2015-09-22 13:53 ` Emil Velikov
2015-09-22 15:00 ` Ville Syrjälä
2015-09-22 16:51 ` Emil Velikov
2015-09-23 8:15 ` Sharma, Shashank
2015-09-23 12:49 ` Daniel Vetter
2015-09-23 12:59 ` Sharma, Shashank
2015-09-23 13:30 ` Daniel Vetter
2015-09-16 17:37 ` [PATCH 05/23] drm: Add structure to set/get a CTM " Shashank Sharma
2015-09-22 13:08 ` Daniel Vetter
2015-09-23 8:16 ` Sharma, Shashank
2015-09-22 15:22 ` Ville Syrjälä
2015-09-16 17:37 ` [PATCH 06/23] drm/i915: Add atomic set property interface for CRTC Shashank Sharma
2015-09-16 17:37 ` [PATCH 07/23] drm/i915: Add atomic get " Shashank Sharma
2015-09-16 17:37 ` [PATCH 08/23] drm/i915: Create color management files Shashank Sharma
2015-09-16 17:37 ` [PATCH 09/23] drm/i915: Register pipe color capabilities Shashank Sharma
2015-09-22 13:24 ` Daniel Vetter
2015-09-23 8:35 ` Sharma, Shashank
2015-09-23 12:52 ` [Intel-gfx] " Daniel Vetter
2015-09-16 17:37 ` [PATCH 10/23] drm/i915: Add gamma correction handlers Shashank Sharma
2015-09-22 13:15 ` [Intel-gfx] " Daniel Vetter
2015-09-22 13:19 ` Daniel Vetter
2015-09-23 8:22 ` [Intel-gfx] " Sharma, Shashank
2015-09-23 13:02 ` Daniel Vetter
2015-09-26 15:48 ` Sharma, Shashank
2015-09-28 6:43 ` [Intel-gfx] " Daniel Vetter
2015-09-28 8:19 ` Sharma, Shashank
2015-09-28 21:42 ` Matt Roper [this message]
2015-09-29 4:29 ` Sharma, Shashank
2015-09-29 4:29 ` Matheson, Annie J
2015-09-16 17:37 ` [PATCH 11/23] drm/i915: Add pipe deGamma " Shashank Sharma
2015-09-16 17:37 ` [PATCH 12/23] drm/i915: Add pipe CSC " Shashank Sharma
2015-09-16 17:37 ` [PATCH 13/23] drm/i915: CHV: Load gamma color correction values Shashank Sharma
2015-09-16 17:37 ` [PATCH 14/23] drm/i915: CHV: Load degamma " Shashank Sharma
2015-09-16 17:37 ` [PATCH 15/23] drm/i915: CHV: Pipe level Gamma correction Shashank Sharma
2015-09-16 17:37 ` [PATCH 16/23] drm/i915: CHV: Pipe level degamma correction Shashank Sharma
2015-09-16 17:37 ` [PATCH 17/23] drm/i915: CHV: Pipe level CSC correction Shashank Sharma
2015-09-16 17:37 ` [PATCH 18/23] drm/i915: Commit color changes to CRTC Shashank Sharma
2015-09-16 17:37 ` [PATCH 19/23] drm/i915: Attach color properties " Shashank Sharma
2015-09-16 17:37 ` [PATCH 20/23] drm/i915: BDW: Load gamma correction values Shashank Sharma
2015-09-16 17:37 ` [PATCH 21/23] drm/i915: BDW: Pipe level Gamma correction Shashank Sharma
2015-09-30 14:31 ` Rob Bradford
2015-09-30 16:25 ` Sharma, Shashank
2015-09-30 16:31 ` Matheson, Annie J
2015-09-30 17:15 ` Sharma, Shashank
2015-09-30 16:44 ` Ville Syrjälä
2015-09-16 17:37 ` [PATCH 22/23] drm/i915: BDW: Load degamma correction values Shashank Sharma
2015-09-16 17:37 ` [PATCH 23/23] drm/i915: BDW: Pipe level degamma correction Shashank Sharma
2015-09-22 13:27 ` [Intel-gfx] [PATCH 00/23] Color Management for DRM Daniel Vetter
2015-09-23 8:38 ` 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=20150928214257.GC4359@intel.com \
--to=matthew.d.roper@intel.com \
--cc=annie.j.matheson@intel.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary.k.smith@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jim.bish@intel.com \
--cc=kausalmalladi@gmail.com \
--cc=robert.bradford@intel.com \
--cc=shashank.sharma@intel.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