Re: [PATCH v2 02/20] drm: Don't update plane properties for atomic planes if it stays the same

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

 



On Tue, Jul 07, 2015 at 09:08:13AM +0200, Maarten Lankhorst wrote:
> This allows the first atomic call during hw init to be a real modeset,
> which is useful for forcing a recalculation.

fbcon is optional, you can't rely on anything being done in any specific
way. What exactly do you need this for, what's the implications?
-Daniel

> 
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index cac422916c7a..33b5e4ecaf46 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -322,10 +322,12 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper)
>  	drm_warn_on_modeset_not_all_locked(dev);
>  
>  	list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
> -		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
> +		if (plane->type != DRM_PLANE_TYPE_PRIMARY &&
> +		    (!plane->state || plane->state->fb))
>  			drm_plane_force_disable(plane);
>  
> -		if (dev->mode_config.rotation_property) {
> +		if (dev->mode_config.rotation_property &&
> +		    (!plane->state || plane->state->rotation != BIT(DRM_ROTATE_0))) {
>  			drm_mode_plane_set_obj_prop(plane,
>  						    dev->mode_config.rotation_property,
>  						    BIT(DRM_ROTATE_0));
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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