Re: [PATCH 3/7] drm/i915: Add Set property interface for CRTC

Jindal, Sonika
2015-06-02T11:19:56Z

> This patch adds 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>
> ---
> drivers/gpu/drm/i915/intel_display.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f817cea..21e67da 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12978,11 +12978,19 @@ out:
> return ret;
> }
>
> +static int intel_crtc_set_property(struct drm_crtc *crtc,
> + struct drm_property *property, uint64_t val)
> +{
> + DRM_DEBUG_KMS("Unknown crtc property '%s'\n", property->name);
> + return -EINVAL;
> +}
> +
> static const struct drm_crtc_funcs intel_crtc_funcs = {
> .gamma_set = intel_crtc_gamma_set,
> .set_config = intel_crtc_set_config,
> .destroy = intel_crtc_destroy,
> .page_flip = intel_crtc_page_flip,
> + .set_property = intel_crtc_set_property,
I think it should be done similar to plane set property using atomic
helpers.

> .atomic_duplicate_state = intel_crtc_duplicate_state,
> .atomic_destroy_state = intel_crtc_destroy_state,