* [PATCH] drm/plane_helper: Use helper for plane->CRTC linkage
@ 2015-05-26 9:12 Daniel Stone
2015-05-26 9:15 ` [PATCH v2] " Daniel Stone
2015-05-26 9:15 ` Daniel Stone
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Stone @ 2015-05-26 9:12 UTC (permalink / raw)
To: dri-devel
plane_state->crtc shouldn't be assigned directly, but instead use
drm_atomic_set_crtc_for_plane, which also takes care of updating the
plane_mask on each CRTC's state.
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
drivers/gpu/drm/drm_plane_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 40c1db9..e215a07 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -530,7 +530,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = crtc;
+ drm_atomic_set_crtc_for_plane(plane_state, crtc);
drm_atomic_set_fb_for_plane(plane_state, fb);
plane_state->crtc_x = crtc_x;
plane_state->crtc_y = crtc_y;
@@ -577,7 +577,7 @@ int drm_plane_helper_disable(struct drm_plane *plane)
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = NULL;
+ drm_atomic_set_crtc_for_plane(plane_state, NULL);
drm_atomic_set_fb_for_plane(plane_state, NULL);
return drm_plane_helper_commit(plane, plane_state, plane->fb);
--
2.4.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] drm/plane_helper: Use helper for plane->CRTC linkage
2015-05-26 9:12 [PATCH] drm/plane_helper: Use helper for plane->CRTC linkage Daniel Stone
@ 2015-05-26 9:15 ` Daniel Stone
2015-05-26 9:15 ` Daniel Stone
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Stone @ 2015-05-26 9:15 UTC (permalink / raw)
To: dri-devel
plane_state->crtc shouldn't be assigned directly, but instead use
drm_atomic_set_crtc_for_plane, which also takes care of updating the
plane_mask on each CRTC's state.
v2: First patch sent by mistake; this one checks the return value.
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
drivers/gpu/drm/drm_plane_helper.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 40c1db9..7c6a2ad 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -519,6 +519,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
uint32_t src_w, uint32_t src_h)
{
struct drm_plane_state *plane_state;
+ int ret;
if (plane->funcs->atomic_duplicate_state)
plane_state = plane->funcs->atomic_duplicate_state(plane);
@@ -530,7 +531,10 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = crtc;
+ ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
+ if (ret)
+ return ret;
+
drm_atomic_set_fb_for_plane(plane_state, fb);
plane_state->crtc_x = crtc_x;
plane_state->crtc_y = crtc_y;
@@ -561,6 +565,7 @@ EXPORT_SYMBOL(drm_plane_helper_update);
int drm_plane_helper_disable(struct drm_plane *plane)
{
struct drm_plane_state *plane_state;
+ int ret;
/* crtc helpers love to call disable functions for already disabled hw
* functions. So cope with that. */
@@ -577,7 +582,10 @@ int drm_plane_helper_disable(struct drm_plane *plane)
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = NULL;
+ ret = drm_atomic_set_crtc_for_plane(plane_state, NULL);
+ if (ret)
+ return ret;
+
drm_atomic_set_fb_for_plane(plane_state, NULL);
return drm_plane_helper_commit(plane, plane_state, plane->fb);
--
2.4.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] drm/plane_helper: Use helper for plane->CRTC linkage
2015-05-26 9:12 [PATCH] drm/plane_helper: Use helper for plane->CRTC linkage Daniel Stone
2015-05-26 9:15 ` [PATCH v2] " Daniel Stone
@ 2015-05-26 9:15 ` Daniel Stone
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Stone @ 2015-05-26 9:15 UTC (permalink / raw)
To: dri-devel
plane_state->crtc shouldn't be assigned directly, but instead use
drm_atomic_set_crtc_for_plane, which also takes care of updating the
plane_mask on each CRTC's state.
v2: First patch sent by mistake; this one checks the return value.
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
drivers/gpu/drm/drm_plane_helper.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 40c1db9..7c6a2ad 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -519,6 +519,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
uint32_t src_w, uint32_t src_h)
{
struct drm_plane_state *plane_state;
+ int ret;
if (plane->funcs->atomic_duplicate_state)
plane_state = plane->funcs->atomic_duplicate_state(plane);
@@ -530,7 +531,10 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = crtc;
+ ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
+ if (ret)
+ return ret;
+
drm_atomic_set_fb_for_plane(plane_state, fb);
plane_state->crtc_x = crtc_x;
plane_state->crtc_y = crtc_y;
@@ -561,6 +565,7 @@ EXPORT_SYMBOL(drm_plane_helper_update);
int drm_plane_helper_disable(struct drm_plane *plane)
{
struct drm_plane_state *plane_state;
+ int ret;
/* crtc helpers love to call disable functions for already disabled hw
* functions. So cope with that. */
@@ -577,7 +582,10 @@ int drm_plane_helper_disable(struct drm_plane *plane)
return -ENOMEM;
plane_state->plane = plane;
- plane_state->crtc = NULL;
+ ret = drm_atomic_set_crtc_for_plane(plane_state, NULL);
+ if (ret)
+ return ret;
+
drm_atomic_set_fb_for_plane(plane_state, NULL);
return drm_plane_helper_commit(plane, plane_state, plane->fb);
--
2.4.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-26 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 9:12 [PATCH] drm/plane_helper: Use helper for plane->CRTC linkage Daniel Stone
2015-05-26 9:15 ` [PATCH v2] " Daniel Stone
2015-05-26 9:15 ` Daniel Stone
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.