From: Damien Lespiau <damien.lespiau@intel.com>
To: Kausal Malladi <Kausal.Malladi@intel.com>
Cc: annie.j.matheson@intel.com, dhanya.p.r@intel.com,
avinash.reddy.palleti@intel.com, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, vijay.a.purushothaman@intel.com,
indranil.mukherjee@intel.com, jesse.barnes@intel.com,
daniel.vetter@intel.com, sunil.kamath@intel.com,
shashank.sharma@intel.com
Subject: Re: [PATCH v2 02/10] drm/i915: Attach color properties to CRTC
Date: Tue, 9 Jun 2015 11:54:29 +0100 [thread overview]
Message-ID: <20150609105429.GC1671@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1433425361-17864-3-git-send-email-Kausal.Malladi@intel.com>
On Thu, Jun 04, 2015 at 07:12:33PM +0530, Kausal Malladi wrote:
> From: Kausal Malladi <Kausal.Malladi@intel.com>
>
> Every CRTC would be carrying its own instances of CSC and Gamma color
> correction values. This patch adds a new function to attach color
> properties to respective CRTCs while initialization.
>
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Kausal Malladi <Kausal.Malladi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_color_manager.c | 24 ++++++++++++++++++++++++
> drivers/gpu/drm/i915/intel_color_manager.h | 2 ++
> drivers/gpu/drm/i915/intel_display.c | 3 +++
> 3 files changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_color_manager.c b/drivers/gpu/drm/i915/intel_color_manager.c
> index f7e2380..8d4ee8f 100644
> --- a/drivers/gpu/drm/i915/intel_color_manager.c
> +++ b/drivers/gpu/drm/i915/intel_color_manager.c
> @@ -27,6 +27,30 @@
>
> #include "intel_color_manager.h"
>
> +void intel_color_manager_attach(struct drm_device *dev,
> + struct drm_mode_object *mode_obj)
> +{
> + struct drm_mode_config *config = &dev->mode_config;
> +
> + /* Attach all properties generic to crtc and plane */
> + if (config->gamma_property) {
> + drm_object_attach_property(mode_obj,
> + config->gamma_property, 0);
No platform check? I doubt all of our platforms have LUTs on all planes.
Ah but we don't attach this property to any plane just yet, so the
comment is misleading.
> +
> + DRM_DEBUG_DRIVER("Initialized gamma property\n");
That looks too verbose to me.
> + }
> +
> + /* Attach properties specific to crtc only */
> + if (mode_obj->type == DRM_MODE_OBJECT_CRTC) {
> + if (config->csc_property) {
> + drm_object_attach_property(mode_obj,
> + config->csc_property, 0);
> +
> + DRM_DEBUG_DRIVER("Initialized CSC property\n");
> + }
> + }
> +}
> +
> void intel_color_manager_init(struct drm_device *dev)
> {
> struct drm_mode_config *config = &dev->mode_config;
> diff --git a/drivers/gpu/drm/i915/intel_color_manager.h b/drivers/gpu/drm/i915/intel_color_manager.h
> index 154bf16..a55ce23 100644
> --- a/drivers/gpu/drm/i915/intel_color_manager.h
> +++ b/drivers/gpu/drm/i915/intel_color_manager.h
> @@ -30,3 +30,5 @@
>
> /* Generic Function prototypes */
> void intel_color_manager_init(struct drm_device *dev);
> +void intel_color_manager_attach(struct drm_device *dev,
> + struct drm_mode_object *mode_obj);
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2322dee..d4e9aa3 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13794,6 +13794,9 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
> intel_crtc->cursor_cntl = ~0;
> intel_crtc->cursor_size = ~0;
>
> + /* Attaching color properties to the CRTC */
> + intel_color_manager_attach(dev, &intel_crtc->base.base);
> +
> BUG_ON(pipe >= ARRAY_SIZE(dev_priv->plane_to_crtc_mapping) ||
> dev_priv->plane_to_crtc_mapping[intel_crtc->plane] != NULL);
> dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
> --
> 2.4.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-06-09 10:54 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1433425361-17864-1-git-send-email-Kausal.Malladi@intel.com>
2015-06-05 4:01 ` [PATCH v2 00/10] Color Manager Implementation Jindal, Sonika
2015-06-05 9:28 ` Malladi, Kausal
[not found] ` <1433425361-17864-2-git-send-email-Kausal.Malladi@intel.com>
2015-06-06 1:00 ` [PATCH v2 01/10] drm/i915: Initialize Color Manager Matt Roper
2015-06-06 11:42 ` Sharma, Shashank
2015-06-09 10:34 ` Damien Lespiau
2015-06-09 14:26 ` Damien Lespiau
[not found] ` <1433425361-17864-5-git-send-email-Kausal.Malladi@intel.com>
2015-06-05 12:00 ` [PATCH v2 04/10] drm: Add Gamma correction structure Jindal, Sonika
2015-06-05 12:25 ` Malladi, Kausal
2015-06-12 17:17 ` Emil Velikov
2015-06-14 9:02 ` Sharma, Shashank
2015-06-18 15:00 ` Emil Velikov
2015-06-06 1:00 ` Matt Roper
2015-06-06 11:51 ` Sharma, Shashank
2015-06-09 0:48 ` Matt Roper
2015-06-09 11:06 ` Damien Lespiau
[not found] ` <1433425361-17864-6-git-send-email-Kausal.Malladi@intel.com>
2015-06-06 1:00 ` [PATCH v2 05/10] drm: Add a new function for updating color blob Matt Roper
2015-06-06 11:54 ` Sharma, Shashank
2015-06-09 0:53 ` Matt Roper
[not found] ` <1433425361-17864-7-git-send-email-Kausal.Malladi@intel.com>
2015-06-06 1:01 ` [PATCH v2 06/10] drm: Avoid atomic commit path for CRTC property (Gamma) Matt Roper
2015-06-06 12:04 ` Sharma, Shashank
2015-06-09 0:58 ` Matt Roper
2015-06-19 22:50 ` [Intel-gfx] " Matt Roper
2015-06-24 15:40 ` Malladi, Kausal
2015-06-24 21:37 ` Matheson, Annie J
2015-06-09 10:11 ` [PATCH v2 00/10] Color Manager Implementation Damien Lespiau
2015-06-11 7:57 ` Malladi, Kausal
2015-06-11 9:04 ` Jani Nikula
[not found] ` <1433425361-17864-3-git-send-email-Kausal.Malladi@intel.com>
2015-06-09 10:54 ` Damien Lespiau [this message]
[not found] ` <1433425361-17864-8-git-send-email-Kausal.Malladi@intel.com>
2015-06-06 5:33 ` [PATCH v2 07/10] drm/i915: Add pipe level Gamma correction for CHV/BSW Jindal, Sonika
2015-06-06 12:09 ` Sharma, Shashank
2015-06-09 11:23 ` Damien Lespiau
2015-06-09 11:51 ` Damien Lespiau
2015-06-09 14:15 ` Damien Lespiau
[not found] ` <1433425361-17864-11-git-send-email-Kausal.Malladi@intel.com>
2015-06-09 11:55 ` [PATCH v2 10/10] drm/i915: Add CSC support " Damien Lespiau
2015-06-09 12:50 ` [PATCH v2 00/10] Color Manager Implementation Damien Lespiau
2015-06-15 6:53 ` [Intel-gfx] " Daniel Vetter
2015-06-15 20:30 ` Matheson, Annie J
2015-06-16 3:12 ` Sharma, Shashank
2015-06-16 22:10 ` Matheson, Annie J
2015-07-13 8:29 ` Hans Verkuil
2015-07-13 9:18 ` Daniel Vetter
2015-07-13 9:43 ` [Intel-gfx] " Hans Verkuil
2015-07-13 9:54 ` Daniel Vetter
2015-07-13 10:11 ` Hans Verkuil
2015-07-13 14:07 ` [Intel-gfx] " Daniel Vetter
2015-07-14 8:17 ` Hans Verkuil
2015-07-14 9:11 ` Daniel Vetter
2015-07-14 9:35 ` Hans Verkuil
2015-07-14 10:16 ` [Intel-gfx] " Daniel Vetter
2015-07-15 12:35 ` Hans Verkuil
2015-07-15 13:28 ` [Intel-gfx] " Hans Verkuil
[not found] ` <1433425361-17864-9-git-send-email-Kausal.Malladi@intel.com>
2015-06-09 11:53 ` [PATCH v2 08/10] drm: Add CSC correction structure Damien Lespiau
2015-06-09 14:58 ` Damien Lespiau
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=20150609105429.GC1671@strange.amr.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=Kausal.Malladi@intel.com \
--cc=annie.j.matheson@intel.com \
--cc=avinash.reddy.palleti@intel.com \
--cc=daniel.vetter@intel.com \
--cc=dhanya.p.r@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=indranil.mukherjee@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jesse.barnes@intel.com \
--cc=shashank.sharma@intel.com \
--cc=sunil.kamath@intel.com \
--cc=vijay.a.purushothaman@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