public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sharma, Shashank" <shashank.sharma@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: annie.j.matheson@intel.com, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, kausalmalladi@gmail.com,
	daniel.vetter@intel.com
Subject: Re: [PATCH 04/23] drm: Add drm structures for palette color property
Date: Wed, 23 Sep 2015 13:45:16 +0530	[thread overview]
Message-ID: <56025F94.1090500@intel.com> (raw)
In-Reply-To: <20150922130800.GO3383@phenom.ffwll.local>

Regards
Shashank

On 9/22/2015 6:38 PM, Daniel Vetter wrote:
> On Wed, Sep 16, 2015 at 11:07:01PM +0530, Shashank Sharma wrote:
>> From: Kausal Malladi <kausalmalladi@gmail.com>
>>
>> This patch adds new structures in DRM layer for Palette color
>> correction.These structures will be used by user space agents
>> to configure appropriate number of samples and Palette LUT for
>> a platform.
>>
>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
>> Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
>> ---
>>   include/uapi/drm/drm.h | 27 +++++++++++++++++++++++++++
>>   1 file changed, 27 insertions(+)
>>
>> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
>> index e3c642f..f72b916 100644
>> --- a/include/uapi/drm/drm.h
>> +++ b/include/uapi/drm/drm.h
>> @@ -840,6 +840,33 @@ struct drm_palette_caps {
>>   	__u32 num_samples_after_ctm;
>>   };
>>
>> +struct drm_r32g32b32 {
>> +	/*
>> +	 * Data is in U8.24 fixed point format.
>> +	 * All platforms support values within [0, 1.0] range,
>> +	 * for Red, Green and Blue colors.
>> +	 */
>> +	__u32 r32;
>> +	__u32 g32;
>> +	__u32 b32;
>
> It's not strictly required, but adding a __u32 reserved here to align the
> struct to 64 bits seems good imo. Slight overhead but meh about that.
Humm, ok, we can check this out.
>
>> +};
>> +
>> +struct drm_palette {
>> +	/* Structure version. Should be 1 currently */
>> +	__u32 version;
>
> Definitely great practice to take compat into account and definitely
> needed for the first design using ioctls but I don't think we need this
> here. Properties are already extinsible themselves: We can just greate a
> "ctm-v2", "ctm-v3" if the layout changes, and since the actual ctm matrix
> is stored in the drm_crtc_state any compat code on the kernel will be
> shared.
>
> Aside: For an ioctl the recommended way to handle backwards compat and
> extensions in drm is with a flags bitfield. That's more flexible than a
> linear version field, and extending the ioctl struct at the end is already
> handled by the drm core in a transparent fashion (it 0-fills either kernel
> or userspace side).
>
Agree, we will drop this. Do you think we should add a flags field, or 
is it ok without it ?
>> +	/*
>> +	 * This has to be a supported value during get call.
>> +	 * Feature will be disabled if this is 0 while set
>> +	 */
>> +	__u32 num_samples;
>
> blob properties already have a size, storing it again in the blob is
> redundnant. Instead I think a small helper to get the number of samples
> for a given gamma table blob would be needed.
>
> Cheers, Daniel
Please note that they are different. One is the size of blob and other 
one is the num_samples supported by the property, in the current 
correction mode. If you check the design doc, num_sample serves the 
purpose of deciding which correction mode to be applied also. fox ex, 
for gamma, num_samples=0 indicates disable gamma, whereas 
num_samples=512 indicates split gamma mode.

Shashank
>
>> +	/*
>> +	 * Starting of palette LUT in R32G32B32 format.
>> +	 * Each of RGB value is in U8.24 fixed point format.
>> +	 * Actual number of samples will depend upon num_samples
>> +	 */
>> +	struct drm_r32g32b32 lut[0];
>> +};
>> +
>>   /* typedef area */
>>   #ifndef __KERNEL__
>>   typedef struct drm_clip_rect drm_clip_rect_t;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-09-23  8:15 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 [this message]
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
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=56025F94.1090500@intel.com \
    --to=shashank.sharma@intel.com \
    --cc=annie.j.matheson@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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