All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Shashank" <shashank.sharma@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org, daniel.vetter@intel.com
Subject: Re: [PATCH 2/4] drm/i915: Plug-in color manager attach
Date: Wed, 10 Sep 2014 17:22:35 +0530	[thread overview]
Message-ID: <54103B83.9040008@intel.com> (raw)
In-Reply-To: <20140910012915.GE26681@intel.com>

Matt,
Thanks for your time and review comments.
Please find mine inline.

Regards
Shashank
On 9/10/2014 6:59 AM, Matt Roper wrote:
> On Tue, Sep 09, 2014 at 11:53:14AM +0530, shashank.sharma@intel.com wrote:
>> From: Shashank Sharma <shashank.sharma@intel.com>
>>
>> This patch does following things:
>> 1. Adds new function to attach color proprties with
>>     corresponsing crtc / plane objects.
>> 2. Call these attach functions, from corresponding crtc/plane
>>     init functions.
>>
>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_clrmgr.c  | 25 +++++++++++--------------
>>   drivers/gpu/drm/i915/intel_clrmgr.h  | 22 ++++++++++++++++++++++
>>   drivers/gpu/drm/i915/intel_display.c |  2 ++
>>   drivers/gpu/drm/i915/intel_sprite.c  |  3 +++
>>   4 files changed, 38 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_clrmgr.c b/drivers/gpu/drm/i915/intel_clrmgr.c
>> index 0def917..ac0a890 100644
>> --- a/drivers/gpu/drm/i915/intel_clrmgr.c
>> +++ b/drivers/gpu/drm/i915/intel_clrmgr.c
>> @@ -32,20 +32,17 @@
>>   #include "i915_reg.h"
>>   #include "intel_clrmgr.h"
>>
>> -/* Names to register with color properties */
>> -const char *clrmgr_property_names[] = {
>> -	/* csc */
>> -	"csc-correction",
>> -	/* gamma */
>> -	"gamma-correction",
>> -	/* contrast */
>> -	"contrast",
>> -	/* brightness */
>> -	"brightness",
>> -	/* hue_saturation */
>> -	"hue_saturation"
>> -	/* add a new prop name here */
>> -};
>
> It looks like you just added this array in the previous patch, remove it
> here, and then you add it back (with only a single element) in the next
> patch.  I suspect this is just an artifact of your rebasing and
> respinning the patch series, but if you agree my suggestion on the
> previous patch to drop the array completely, please make sure that it's
> dropped throughout the series to keep the review simple.  :-)
>
Yes, this is a mistake.
My intention was to add an empty array first, and then with each 
property specific patch, add one name in this array. But looks like
its just creating confusions. I will change this.
>
>> +void
>> +intel_attach_plane_color_correction(struct intel_plane *intel_plane)
>> +{
>> +	DRM_DEBUG_DRIVER("\n");
>> +}
>> +
>> +void
>> +intel_attach_pipe_color_correction(struct intel_crtc *intel_crtc)
>> +{
>> +	DRM_DEBUG_DRIVER("\n");
>> +}
>
> I think it's generally a bit easier to review if you just add the
> functions with their bodies when you actually have the implementation.
> I can see where you call these functions in the code below, but without
> the bodies present, it makes it a little harder for reviewers to see
> whether those are correct.  Since this patch doesn't do anything by
> itself, I'd suggest dropping it and just squashing the changes here into
> your future patches.
>
Yes, the same case here. I thought the CSC patch will come and fill all 
the functions at a time, and it would be easy to understand, but looks 
like it was a bad idea :)
> Also, it looks like the plane function remains a noop throughout your
> patch series, so I'd just leave it out completely until you start
> introducing the plane properties that will use it.
>
Yes, plane properties are contrast, brightness and hue/sat.
> Matt
>
>>
>>   int intel_clrmgr_create_color_properties(struct drm_device *dev)
>>   {
>> diff --git a/drivers/gpu/drm/i915/intel_clrmgr.h b/drivers/gpu/drm/i915/intel_clrmgr.h
>> index 1b7e906..8cff487 100644
>> --- a/drivers/gpu/drm/i915/intel_clrmgr.h
>> +++ b/drivers/gpu/drm/i915/intel_clrmgr.h
>> @@ -50,6 +50,28 @@ enum clrmgr_tweaks {
>>   };
>>
>>   /*
>> +* intel_attach_plane_color_correction:
>> +* Attach plane level color correction DRM properties to
>> +* corresponding plane objects.
>> +* This function should be called from plane initialization function
>> +* for each plane
>> +* input: intel_plane *
>> +*/
>> +void
>> +intel_attach_plane_color_correction(struct intel_plane *intel_plane);
>> +
>> +/*
>> +* intel_attach_pipe_color_correction:
>> +* Attach pipe level color correction DRM properties to
>> +* corresponding CRTC objects.
>> +* This function should be called from CRTC initialization function
>> +* for each CRTC
>> +*  input: intel_crtc *
>> +*/
>> +void
>> +intel_attach_pipe_color_correction(struct intel_crtc *intel_crtc);
>> +
>> +/*
>>   * intel_clrmgr_init:
>>   * Create drm properties for color correction
>>   * Allocate memory to store current color correction
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index df2dcbd..a289b44 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -12017,6 +12017,8 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
>>
>>   	drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
>>
>> +	intel_attach_pipe_color_correction(intel_crtc);
>> +
>>   	WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
>>   	return;
>>
>> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
>> index fd5f271..cc061de 100644
>> --- a/drivers/gpu/drm/i915/intel_sprite.c
>> +++ b/drivers/gpu/drm/i915/intel_sprite.c
>> @@ -36,6 +36,7 @@
>>   #include "intel_drv.h"
>>   #include <drm/i915_drm.h>
>>   #include "i915_drv.h"
>> +#include "intel_clrmgr.h"
>>
>>   static int usecs_to_scanlines(const struct drm_display_mode *mode, int usecs)
>>   {
>> @@ -1395,6 +1396,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
>>   					   dev->mode_config.rotation_property,
>>   					   intel_plane->rotation);
>>
>> +	intel_attach_plane_color_correction(intel_plane);
>> +
>>    out:
>>   	return ret;
>>   }
>> --
>> 1.9.1
>>
>

  reply	other threads:[~2014-09-10 11:52 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 18:04 [PATCH 00/11]: Color manager framework for I915 driver shashank.sharma
2014-07-23 18:04 ` [PATCH 01/11] drm/i915: Color manager framework for valleyview shashank.sharma
2014-07-23 18:04 ` [PATCH 02/11] drm/i915: Register pipe level color properties shashank.sharma
2014-07-25  0:02   ` Matt Roper
2014-07-23 18:04 ` [PATCH 03/11] drm/i915: Register plane " shashank.sharma
2014-07-23 18:04 ` [PATCH 04/11] drm/i915: Add color manager CSC correction shashank.sharma
2014-07-23 18:04 ` [PATCH 05/11] drm/i915: Add color manager gamma correction shashank.sharma
2014-07-23 18:05 ` [PATCH 06/11] drm/i915: Add contrast and brightness correction shashank.sharma
2014-07-23 18:05 ` [PATCH 07/11] drm/i915: Add hue and saturation correction shashank.sharma
2014-07-23 18:05 ` [PATCH 08/11] drm/i915: Add CRTC set property functions shashank.sharma
2014-07-23 18:05 ` [PATCH 09/11] drm/i915: Add set plane " shashank.sharma
2014-07-23 18:05 ` [PATCH 10/11] drm/i915: Plug-in color manager init shashank.sharma
2014-07-23 18:05 ` [PATCH 11/11] drm/i915: Plug-in color manager exit shashank.sharma
2014-07-23 18:34 ` [PATCH 00/11]: Color manager framework for I915 driver Daniel Vetter
2014-07-24  4:08   ` Sharma, Shashank
2014-07-25  0:43     ` Matt Roper
2014-07-25  4:36       ` Sharma, Shashank
2014-07-26  1:58         ` Matt Roper
2014-07-28  4:57           ` Sharma, Shashank
2014-09-09  6:23           ` [PATCH 0/4] Color manager framework shashank.sharma
2014-09-09  6:23             ` [PATCH 1/4] drm/i915: Color manager framework for valleyview shashank.sharma
2014-09-09 22:51               ` Bob Paauwe
2014-09-10  8:40                 ` Sharma, Shashank
2014-09-10 16:25                   ` Bob Paauwe
2014-09-10  1:29               ` Matt Roper
2014-09-10 11:20                 ` Sharma, Shashank
2014-09-10 21:17                   ` Matt Roper
2014-09-11  7:52                     ` Daniel Vetter
2014-09-09  6:23             ` [PATCH 2/4] drm/i915: Plug-in color manager attach shashank.sharma
2014-09-10  1:29               ` Matt Roper
2014-09-10 11:52                 ` Sharma, Shashank [this message]
2014-09-09  6:23             ` [PATCH 3/4] drm/i915: CSC color correction shashank.sharma
2014-09-09 22:51               ` Bob Paauwe
2014-09-10  8:55                 ` Sharma, Shashank
2014-09-10 16:03                   ` Bob Paauwe
2014-09-10  1:30               ` Matt Roper
2014-09-10  6:40                 ` Daniel Vetter
2014-09-10 12:05                   ` Sharma, Shashank
2014-09-10 12:13                     ` Daniel Vetter
2014-09-10 22:17               ` Matt Roper
2014-09-11  7:53                 ` Daniel Vetter
2014-09-09  6:23             ` [PATCH 4/4] drm/i915: Add set_protpery function shashank.sharma
2014-09-10  1:28             ` [PATCH 0/4] Color manager framework Matt Roper
2014-09-10 11:08               ` Sharma, Shashank
2014-09-10 18:15                 ` Matt Roper
2014-09-11  7:56                   ` Daniel Vetter
2014-09-11  8:18                     ` Sharma, Shashank
2014-09-11  8:49                       ` Daniel Vetter
2014-09-11  9:23                         ` 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=54103B83.9040008@intel.com \
    --to=shashank.sharma@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 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.