[PATCH 03/18] drm/i915: Add atomic get property interface for CRTC

Daniel Vetter daniel at ffwll.ch
Tue Aug 25 00:16:00 PDT 2015


On Sat, Aug 22, 2015 at 11:30:44AM +0530, Sharma, Shashank wrote:
> Thanks for the review Matt.
> 
> Regards
> Shashank
> On 8/22/2015 4:10 AM, Matt Roper wrote:
> >On Thu, Aug 06, 2015 at 10:08:12PM +0530, Shashank Sharma wrote:
> >>From: Kausal Malladi <kausalmalladi at gmail.com>
> >>
> >>This patch adds atomic get property interface for Intel CRTC. This
> >>interface will be used for get operation on any non-core DRM properties.
> >>
> >>Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
> >>Signed-off-by: Kausal Malladi <kausalmalladi at gmail.com>
> >>---
> >>  drivers/gpu/drm/i915/intel_atomic.c  | 8 ++++++++
> >>  drivers/gpu/drm/i915/intel_display.c | 1 +
> >>  drivers/gpu/drm/i915/intel_drv.h     | 4 ++++
> >>  3 files changed, 13 insertions(+)
> >>
> >>diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> >>index 922fecf..8d04ee8 100644
> >>--- a/drivers/gpu/drm/i915/intel_atomic.c
> >>+++ b/drivers/gpu/drm/i915/intel_atomic.c
> >>@@ -327,3 +327,11 @@ int intel_crtc_atomic_set_property(struct drm_crtc *crtc,
> >>  	DRM_DEBUG_KMS("Unknown crtc property '%s'\n", property->name);
> >>  	return -EINVAL;
> >>  }
> >>+
> >>+int intel_crtc_atomic_get_property(struct drm_crtc *crtc,
> >>+				   const struct drm_crtc_state *state,
> >>+				   struct drm_property *property,
> >>+				   uint64_t *val)
> >>+{
> >>+	return 0;
> >
> >I think this should be -EINVAL since it's an unrecognized property.
> >Probably add a DRM_DEBUG_KMS() message here like we have in
> >intel_plane_atomic_get_property() as well.
> >
> >
> >Matt
> Got it.

Sounds like we need an igt for invalid properties ...
-Daniel

> >
> >>+}
> >>diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >>index 1fbf0ff..1412e21 100644
> >>--- a/drivers/gpu/drm/i915/intel_display.c
> >>+++ b/drivers/gpu/drm/i915/intel_display.c
> >>@@ -13353,6 +13353,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
> >>  	.page_flip = intel_crtc_page_flip,
> >>  	.set_property = drm_atomic_helper_crtc_set_property,
> >>  	.atomic_set_property = intel_crtc_atomic_set_property,
> >>+	.atomic_get_property = intel_crtc_atomic_get_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 c0ae529..b3dc138 100644
> >>--- a/drivers/gpu/drm/i915/intel_drv.h
> >>+++ b/drivers/gpu/drm/i915/intel_drv.h
> >>@@ -1426,6 +1426,10 @@ int intel_crtc_atomic_set_property(struct drm_crtc *plane,
> >>  				   struct drm_crtc_state *state,
> >>  				   struct drm_property *property,
> >>  				   uint64_t val);
> >>+int intel_crtc_atomic_get_property(struct drm_crtc *plane,
> >>+				   const 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);
> >>--
> >>1.9.1
> >>
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list