All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: initialize default rotation value to DRM_ROTATE_0
@ 2016-01-19  8:26 Marek Szyprowski
  2016-01-19  8:42 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2016-01-19  8:26 UTC (permalink / raw)
  To: dri-devel; +Cc: Marek Szyprowski

When no console framebuffer is enabled, the default plane state is
defined by plane reset function. If driver uses generic helper, then
rotation property is set to zero. This is not a valid value for that
enum. This patch sets default rotation value to DRM_ROTATE_0.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 268d37f26960..d0d4b2ff7c21 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2526,8 +2526,10 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)
 	kfree(plane->state);
 	plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL);
 
-	if (plane->state)
+	if (plane->state) {
 		plane->state->plane = plane;
+		plane->state->rotation = BIT(DRM_ROTATE_0);
+	}
 }
 EXPORT_SYMBOL(drm_atomic_helper_plane_reset);
 
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: initialize default rotation value to DRM_ROTATE_0
  2016-01-19  8:26 [PATCH] drm: initialize default rotation value to DRM_ROTATE_0 Marek Szyprowski
@ 2016-01-19  8:42 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2016-01-19  8:42 UTC (permalink / raw)
  To: Marek Szyprowski; +Cc: dri-devel

On Tue, Jan 19, 2016 at 09:26:48AM +0100, Marek Szyprowski wrote:
> When no console framebuffer is enabled, the default plane state is
> defined by plane reset function. If driver uses generic helper, then
> rotation property is set to zero. This is not a valid value for that
> enum. This patch sets default rotation value to DRM_ROTATE_0.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Applied to drm-misc.
-Daniel

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 268d37f26960..d0d4b2ff7c21 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -2526,8 +2526,10 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane)
>  	kfree(plane->state);
>  	plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL);
>  
> -	if (plane->state)
> +	if (plane->state) {
>  		plane->state->plane = plane;
> +		plane->state->rotation = BIT(DRM_ROTATE_0);
> +	}
>  }
>  EXPORT_SYMBOL(drm_atomic_helper_plane_reset);
>  
> -- 
> 1.9.2
> 

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-19  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-19  8:26 [PATCH] drm: initialize default rotation value to DRM_ROTATE_0 Marek Szyprowski
2016-01-19  8:42 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.