public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Kausal Malladi <Kausal.Malladi@intel.com>
Cc: dhanya.p.r@intel.com, annie.j.matheson@intel.com,
	dri-devel@lists.freedesktop.org, vijay.a.purushothaman@intel.com,
	hverkuil@xs4all.nl, jesse.barnes@intel.com,
	daniel.vetter@intel.com, susanta.bhattacharjee@intel.com,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/16] drm/i915: Add atomic set property interface for CRTC
Date: Mon, 20 Jul 2015 17:02:59 -0700	[thread overview]
Message-ID: <20150721000259.GI18641@intel.com> (raw)
In-Reply-To: <1436965780-6061-8-git-send-email-Kausal.Malladi@intel.com>

On Wed, Jul 15, 2015 at 06:39:31PM +0530, Kausal Malladi wrote:
> This patch adds atomic set property interface for Intel CRTC. This
> interface will be used to set color correction DRM properties.
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Kausal Malladi <Kausal.Malladi@intel.com>

I think we also need .get_property / .atomic_get_property entrypoints as
well.  When userspace tries to query properties, the DRM core will want
to call into i915 for any non-core property that it doesn't recognize.

We don't really have any examples of .atomic_get_property in i915 today,
so you might want to look at omap's omap_plane_atomic_get_property() for
a very basic example (but rather than returning a raw value for color
correction properties, you'll return blob->base.id for the relevant
property).


Matt

> ---
>  drivers/gpu/drm/i915/intel_atomic.c  | 11 +++++++++++
>  drivers/gpu/drm/i915/intel_display.c |  2 ++
>  drivers/gpu/drm/i915/intel_drv.h     |  4 ++++
>  3 files changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 6ce6c3d..d873bda 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -34,6 +34,7 @@
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_plane_helper.h>
>  #include "intel_drv.h"
> +#include "intel_color_manager.h"
>  
>  
>  /**
> @@ -465,3 +466,13 @@ void intel_atomic_state_clear(struct drm_atomic_state *s)
>  	drm_atomic_state_default_clear(&state->base);
>  	state->dpll_set = false;
>  }
> +
> +
> +int intel_crtc_atomic_set_property(struct drm_crtc *crtc,
> +				   struct drm_crtc_state *state,
> +				   struct drm_property *property,
> +				   uint64_t val)
> +{
> +	DRM_DEBUG_KMS("Unknown crtc property '%s'\n", property->name);
> +	return -EINVAL;
> +}
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b6e1dc5..11d491e 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13477,6 +13477,8 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
>  	.set_config = intel_crtc_set_config,
>  	.destroy = intel_crtc_destroy,
>  	.page_flip = intel_crtc_page_flip,
> +	.set_property = drm_atomic_helper_crtc_set_property,
> +	.atomic_set_property = intel_crtc_atomic_set_property,
>  	.atomic_duplicate_state = intel_crtc_duplicate_state,
>  	.atomic_destroy_state = intel_crtc_destroy_state,
>  };
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 05c809b..1e61036 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1438,6 +1438,10 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
>  int intel_atomic_setup_scalers(struct drm_device *dev,
>  	struct intel_crtc *intel_crtc,
>  	struct intel_crtc_state *crtc_state);
> +int intel_crtc_atomic_set_property(struct drm_crtc *plane,
> +				   struct drm_crtc_state *state,
> +				   struct drm_property *property,
> +				   uint64_t val);
>  
>  /* intel_atomic_plane.c */
>  struct intel_plane_state *intel_create_plane_state(struct drm_plane *plane);
> -- 
> 2.4.5
> 

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

  reply	other threads:[~2015-07-21  0:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 13:09 [PATCH 00/16] Color Manager Implementation Kausal Malladi
2015-07-15 13:09 ` [PATCH 01/16] drm/i915: Atomic commit path fix for CRTC properties Kausal Malladi
2015-07-15 13:09 ` [PATCH 02/16] drm: Create Color Management DRM properties Kausal Malladi
2015-07-15 13:25   ` Thierry Reding
2015-07-15 15:14     ` Sharma, Shashank
2015-07-15 13:09 ` [PATCH 03/16] drm/i915: Attach color properties to CRTC Kausal Malladi
2015-07-20 22:14   ` Bish, Jim
2015-07-29 11:39     ` Sharma, Shashank
2015-07-21  0:02   ` Matt Roper
2015-07-15 13:09 ` [PATCH 04/16] drm: Add structure for querying palette color capabilities Kausal Malladi
2015-07-20 22:17   ` Bish, Jim
2015-07-29 11:39     ` Sharma, Shashank
2015-07-15 13:09 ` [PATCH 05/16] drm: Export drm_property_replace_global_blob function Kausal Malladi
2015-07-15 13:09 ` [PATCH 06/16] drm/i915: Load gamma color capabilities for CHV CRTC Kausal Malladi
2015-07-21  0:02   ` Matt Roper
2015-07-15 13:09 ` [PATCH 07/16] drm/i915: Add atomic set property interface for CRTC Kausal Malladi
2015-07-21  0:02   ` Matt Roper [this message]
2015-07-15 13:09 ` [PATCH 08/16] drm: Add blob properties to CRTC state for color properties Kausal Malladi
2015-07-15 13:09 ` [PATCH 09/16] drm: Add structures to set/get a palette color property Kausal Malladi
2015-07-15 13:09 ` [PATCH 10/16] drm/i915: Add set_property handler for pipe Gamma correction on CHV/BSW Kausal Malladi
2015-07-21  0:03   ` Matt Roper
2015-07-21 11:04     ` Malladi, Kausal
2015-07-15 13:09 ` [PATCH 11/16] drm/i915: Add pipe level Gamma correction for CHV/BSW Kausal Malladi
2015-07-21  0:03   ` Matt Roper
2015-07-21 11:10     ` Malladi, Kausal
2015-07-21 23:34       ` Matt Roper
2015-07-15 13:09 ` [PATCH 12/16] drm/i915: Add set_property handler for pipe deGamma correction on CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 13/16] drm/i915: Add DeGamma correction for CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 14/16] drm: Add structure for set/get a CTM color property Kausal Malladi
2015-07-15 13:09 ` [PATCH 15/16] drm/i915: Add set_property handler for CSC correction on CHV/BSW Kausal Malladi
2015-07-15 13:09 ` [PATCH 16/16] drm/i915: Add CSC correction for CHV/BSW Kausal Malladi

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=20150721000259.GI18641@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=Kausal.Malladi@intel.com \
    --cc=annie.j.matheson@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=dhanya.p.r@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jesse.barnes@intel.com \
    --cc=susanta.bhattacharjee@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