All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Uma Shankar <uma.shankar@intel.com>
Cc: intel-gfx@lists.freedesktop.org, ville.syrjala@intel.com,
	maarten.lankhorst@intel.com
Subject: Re: [RFC v1 7/7] drm/i915: Add multi segment gamma for icl
Date: Thu, 21 Mar 2019 15:04:12 -0700	[thread overview]
Message-ID: <20190321220412.GH4773@mdroper-desk.amr.corp.intel.com> (raw)
In-Reply-To: <1552984218-3357-8-git-send-email-uma.shankar@intel.com>

On Tue, Mar 19, 2019 at 02:00:18PM +0530, Uma Shankar wrote:
> Added support for ICL platform multi segment gamma
> capabilties and attached the property, exposing the
> same to userspace.
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_color.c | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
> index 7733c256..1e9f784 100644
> --- a/drivers/gpu/drm/i915/intel_color.c
> +++ b/drivers/gpu/drm/i915/intel_color.c
> @@ -1011,6 +1011,8 @@ int intel_color_check(struct intel_crtc_state *crtc_state)
>  void intel_color_init(struct intel_crtc *crtc)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> +	struct multi_segment_gamma_lut multi_segment_lut;
> +
>  
>  	drm_mode_crtc_set_gamma_size(&crtc->base, 256);
>  
> @@ -1049,6 +1051,24 @@ void intel_color_init(struct intel_crtc *crtc)
>  
>  	intel_attach_gamma_mode_property(crtc);
>  
> -	if (INTEL_GEN(dev_priv) >= 11)
> +	if (IS_ICELAKE(dev_priv)) {

Is it intentional to limit this specifically to Icelake?  This is
basically the opposite of the type of generalization that we've been
moving toward with patches like

        commit 2dd24a9c2c8d767a976da37d59680f09b9d111ab
        Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
        Date:   Fri Mar 8 13:42:58 2019 -0800

            drm/i915/gen11+: First assume next platforms will inherit stuff

Also, we already support another gen11 platform (or will once the
mailing list patches land) in the form of EHL; is there any reason that
this shouldn't apply to it?

> +		multi_segment_lut.segment_cnt = 3;
> +		multi_segment_lut.precision_bits = 16;
> +		multi_segment_lut.segment_lut_cnt_ptr = kzalloc(3 * sizeof(int),
> +								GFP_KERNEL);
> +		if (!multi_segment_lut.segment_lut_cnt_ptr)
> +			return;
> +		multi_segment_lut.segment_lut_cnt_ptr[0] = 9;
> +		multi_segment_lut.segment_lut_cnt_ptr[1] = 256;
> +		multi_segment_lut.segment_lut_cnt_ptr[2] = 256;

On this patch and the previous one we have a few magic numbers
representing how the segmented gamma is laid out.  Can we move stuff
like this into the device info structure and then just setup the
appropriate userspace properties on any platform that has the device
info fields filled in (i.e., the same way we do the basic color
management properties)?


Matt

> +
>  		intel_attach_multi_segment_gamma_mode_property(crtc);
> +
> +		drm_property_replace_global_blob(crtc->base.dev,
> +						 &crtc->config->multi_segment_gamma_lut,
> +						 sizeof(struct multi_segment_gamma_lut),
> +						 &multi_segment_lut,
> +						 &crtc->base.base,
> +						 dev_priv->multi_segment_gamma_mode_property);
> +	}
>  }
> -- 
> 1.9.1
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-21 22:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  8:30 [RFC v1 0/7] Add Multi Segment Gamma Support Uma Shankar
2019-03-19  8:12 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-19  8:15 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-19  8:30 ` [RFC v1 1/7] drm/i915: Add gamma mode property Uma Shankar
2019-03-21 21:19   ` Matt Roper
2019-03-22 13:06     ` Shankar, Uma
2019-03-22 13:39       ` Brian Starkey
2019-03-22 14:02         ` Ville Syrjälä
2019-03-22 15:42           ` Brian Starkey
2019-03-22 15:51             ` Ville Syrjälä
2019-03-19  8:30 ` [RFC v1 2/7] drm/i915: Add intel crtc set and get property callback Uma Shankar
2019-03-19  8:30 ` [RFC v1 3/7] drm/i915: Add Support for Multi Segment Gamma Mode Uma Shankar
2019-03-19  8:46   ` Lankhorst, Maarten
2019-03-19 16:59     ` Ville Syrjälä
2019-03-20 17:03       ` Shankar, Uma
2019-03-21 21:52         ` Matt Roper
2019-03-22 13:12           ` Shankar, Uma
2019-03-22 13:52         ` Ville Syrjälä
2019-03-28 19:00           ` Shankar, Uma
2019-03-28 19:28             ` Ville Syrjälä
2019-03-19  8:30 ` [RFC v1 4/7] drm/i915: Implement get set property handler for multi segment gamma Uma Shankar
2019-03-19  8:30 ` [RFC v1 5/7] drm/i915/icl: Add register definitions for Multi Segmented gamma Uma Shankar
2019-03-19  8:30 ` [RFC v1 6/7] drm/i915/icl: Add support for multi segmented gamma mode Uma Shankar
2019-03-19  8:30 ` [RFC v1 7/7] drm/i915: Add multi segment gamma for icl Uma Shankar
2019-03-21 22:04   ` Matt Roper [this message]
2019-03-22 13:17     ` Shankar, Uma
2019-03-19  8:31 ` ✗ Fi.CI.BAT: failure for Add Multi Segment Gamma Support Patchwork

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=20190321220412.GH4773@mdroper-desk.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@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.