Re: [PATCH 12/15] drm: RIP mode_config->rotation_property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 18, 2016 at 01:38:05AM +0300, Laurent Pinchart wrote:
> Hi Ville,
> 
> On Friday 22 Jul 2016 16:43:13 ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Now that all drivers have been converted over to the per-plane rotation
> > property, we can just nuke the global rotation property.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Stupid question, but how does this work when the hardware supports global 
> rotation only, not per-plane rotation ?

Does that exist? If so I guess we get to add a rotation property to CRTCS
(and update docs and all that).
-Daniel

> 
> > ---
> >  drivers/gpu/drm/drm_atomic.c    |  6 ++----
> >  drivers/gpu/drm/drm_crtc.c      | 18 ------------------
> >  drivers/gpu/drm/drm_fb_helper.c |  7 +------
> >  include/drm/drm_crtc.h          |  7 -------
> >  4 files changed, 3 insertions(+), 35 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 116f940a9267..81061fcdb984 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -709,8 +709,7 @@ int drm_atomic_plane_set_property(struct drm_plane
> > *plane, state->src_w = val;
> >  	} else if (property == config->prop_src_h) {
> >  		state->src_h = val;
> > -	} else if (property == config->rotation_property ||
> > -		   property == plane->rotation_property) {
> > +	} else if (property == plane->rotation_property) {
> >  		if (!is_power_of_2(val & DRM_ROTATE_MASK))
> >  			return -EINVAL;
> >  		state->rotation = val;
> > @@ -768,8 +767,7 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
> >  		*val = state->src_w;
> >  	} else if (property == config->prop_src_h) {
> >  		*val = state->src_h;
> > -	} else if (property == config->rotation_property ||
> > -		   property == plane->rotation_property) {
> > +	} else if (property == plane->rotation_property) {
> >  		*val = state->rotation;
> >  	} else if (plane->funcs->atomic_get_property) {
> >  		return plane->funcs->atomic_get_property(plane, state, 
> property, val);
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 9e20a52ece7c..c1df75caf72f 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -5783,24 +5783,6 @@ void drm_mode_config_cleanup(struct drm_device *dev)
> >  }
> >  EXPORT_SYMBOL(drm_mode_config_cleanup);
> > 
> > -struct drm_property *drm_mode_create_rotation_property(struct drm_device
> > *dev, -						       unsigned int 
> supported_rotations)
> > -{
> > -	static const struct drm_prop_enum_list props[] = {
> > -		{ DRM_ROTATE_0,   "rotate-0" },
> > -		{ DRM_ROTATE_90,  "rotate-90" },
> > -		{ DRM_ROTATE_180, "rotate-180" },
> > -		{ DRM_ROTATE_270, "rotate-270" },
> > -		{ DRM_REFLECT_X,  "reflect-x" },
> > -		{ DRM_REFLECT_Y,  "reflect-y" },
> > -	};
> > -
> > -	return drm_property_create_bitmask(dev, 0, "rotation",
> > -					   props, ARRAY_SIZE(props),
> > -					   supported_rotations);
> > -}
> > -EXPORT_SYMBOL(drm_mode_create_rotation_property);
> > -
> >  int drm_plane_create_rotation_property(struct drm_plane *plane,
> >  				       unsigned int rotation,
> >  				       unsigned int supported_rotations)
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c
> > b/drivers/gpu/drm/drm_fb_helper.c index ce536c0553e5..cf5f071ffae1 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -392,15 +392,10 @@ static int restore_fbdev_mode(struct drm_fb_helper
> > *fb_helper) if (plane->type != DRM_PLANE_TYPE_PRIMARY)
> >  			drm_plane_force_disable(plane);
> > 
> > -		if (plane->rotation_property) {
> > +		if (plane->rotation_property)
> >  			drm_mode_plane_set_obj_prop(plane,
> >  						    plane->rotation_property,
> >  						    BIT(DRM_ROTATE_0));
> > -		} else if (dev->mode_config.rotation_property) {
> > -			drm_mode_plane_set_obj_prop(plane,
> > -						    dev-
> >mode_config.rotation_property,
> > -						    BIT(DRM_ROTATE_0));
> > -		}
> >  	}
> > 
> >  	for (i = 0; i < fb_helper->crtc_count; i++) {
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index 01cf0673f6c8..00a93e44f854 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -2480,11 +2480,6 @@ struct drm_mode_config {
> >  	 */
> >  	struct drm_property *plane_type_property;
> >  	/**
> > -	 * @rotation_property: Optional property for planes or CRTCs to 
> specify
> > -	 * rotation.
> > -	 */
> > -	struct drm_property *rotation_property;
> > -	/**
> >  	 * @prop_src_x: Default atomic plane property for the plane source
> >  	 * position in the connected &drm_framebuffer.
> >  	 */
> > @@ -2960,8 +2955,6 @@ extern int drm_mode_plane_set_obj_prop(struct
> > drm_plane *plane, struct drm_property *property,
> >  				       uint64_t value);
> > 
> > -extern struct drm_property *drm_mode_create_rotation_property(struct
> > drm_device *dev, -							      
> unsigned int supported_rotations);
> >  extern int drm_plane_create_rotation_property(struct drm_plane *plane,
> >  					      unsigned int rotation,
> >  					      unsigned int 
> supported_rotations);
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux