All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Kumar@freedesktop.org, kiran.s.kumar@intel.com, kausalmalladi@gmail.com
Subject: Re: [PATCH 3/5] drm: introduce pipe color correction properties
Date: Tue, 22 Mar 2016 11:59:22 +0200	[thread overview]
Message-ID: <87oaa6rfyd.fsf@intel.com> (raw)
In-Reply-To: <1456506302-640-4-git-send-email-lionel.g.landwerlin@intel.com>

On Fri, 26 Feb 2016, Lionel Landwerlin <lionel.g.landwerlin@intel.com> wrote:
> @@ -2554,6 +2583,21 @@ static inline struct drm_property *drm_property_find(struct drm_device *dev,
>  	return mo ? obj_to_property(mo) : NULL;
>  }
>  
> +/*
> + * Extract a degamma/gamma LUT value provided by user and round it to the
> + * precision supported by the hardware.
> + */
> +static inline uint32_t drm_color_lut_extract(uint32_t user_input,
> +					     uint32_t bit_precision)
> +{
> +	uint32_t val = user_input + (1 << (16 - bit_precision - 1));
> +	uint32_t max = 0xffff >> (16 - bit_precision);
> +
> +	val >>= 16 - bit_precision;
> +
> +	return clamp_val(val, 0, max);
> +}

Didn't dig deeper, but sparse complains

  CHECK   drivers/gpu/drm/i915/intel_color.c
include/drm/drm_crtc.h:2603:40: warning: shift too big (4294967295) for type int
include/drm/drm_crtc.h:2603:40: warning: shift too big (4294967295) for type int
include/drm/drm_crtc.h:2603:40: warning: shift too big (4294967295) for type int


BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-03-22  9:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 17:04 [PATCH 0/5] Pipe level color management V10 Lionel Landwerlin
2016-02-26 17:04 ` [PATCH 1/5] drm/i915: Extract out gamma table and CSC to their own file Lionel Landwerlin
2016-02-26 17:04 ` [PATCH 2/5] drm/i915: Do not read GAMMA_MODE register Lionel Landwerlin
2016-02-26 17:05 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin
2016-03-22  9:59   ` Jani Nikula [this message]
2016-02-26 17:05 ` [PATCH 4/5] drm/i915: Implement color management on bdw/skl/bxt/kbl Lionel Landwerlin
2016-02-26 17:05 ` [PATCH 5/5] drm/i915: Implement color management on chv Lionel Landwerlin
2016-02-27  6:58 ` ✗ Fi.CI.BAT: failure for Pipe level color management (rev10) Patchwork
2016-03-08 11:45 ` [PATCH 0/5] Pipe level color management V10 Rob Bradford
2016-03-08 12:13   ` Daniel Stone
2016-03-08 12:59     ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2016-02-25 15:33 [PATCH 0/5] Pipe level color management V9 Lionel Landwerlin
2016-02-25 15:33 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin
2016-02-25 10:58 [PATCH 0/5] Pipe level color management V8 Lionel Landwerlin
2016-02-25 10:58 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin
2016-02-26  0:36   ` Emil Velikov
2016-02-26  1:04     ` Matt Roper
2016-02-26 15:43     ` Lionel Landwerlin
2016-02-27  0:35       ` Emil Velikov
2016-02-23 14:39 [PATCH 0/5] Pipe level color management V7 Lionel Landwerlin
2016-02-23 14:39 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin
2016-02-22 14:18 [PATCH 0/5] Pipe level color management V6 Lionel Landwerlin
2016-02-22 14:18 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin
2016-02-19 15:39 [PATCH 0/5] Pipe level color management V5 Lionel Landwerlin
2016-02-19 15:39 ` [PATCH 3/5] drm: introduce pipe color correction properties Lionel Landwerlin

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=87oaa6rfyd.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Kumar@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kausalmalladi@gmail.com \
    --cc=kiran.s.kumar@intel.com \
    --cc=lionel.g.landwerlin@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.