summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_plane.h
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-09-04 12:48:38 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-09-08 10:39:37 +0200
commit669c9215afea4e3684ef13e54e6908e9ae34f0ae (patch)
treea82464679d2b22c8e231404d8126c3513542c629 /include/drm/drm_plane.h
parent21a01abbe32a3cbeb903378a24e504bfd9fe0648 (diff)
downloadlinux-669c9215afea4e3684ef13e54e6908e9ae34f0ae.tar.bz2
drm/atomic: Make async plane update checks work as intended, v2.
By always keeping track of the last commit in plane_state, we know whether there is an active update on the plane or not. With that information we can reject the fast update, and force the slowpath to be used as was originally intended. We cannot use plane_state->crtc->state here, because this only mentions the most recent commit for the crtc, but not the planes that were part of it. We specifically care about what the last commit involving this plane is, which can only be tracked with a pointer in the plane state. Changes since v1: - Clean up the whole function here, instead of partially earlier. - Add mention in the commit message why we need commit in plane_state. - Swap plane->state in intel_legacy_cursor_update, instead of reassigning all variables. With this commit We know that the cursor is not part of any active commits so this hack can be removed. Cc: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com [mlankhorst: Amend commit for merge conflicts with drm-intel]
Diffstat (limited to 'include/drm/drm_plane.h')
-rw-r--r--include/drm/drm_plane.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 7d96116fd4c4..feb9941d0cdb 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -124,9 +124,10 @@ struct drm_plane_state {
bool visible;
/**
- * @commit: Tracks the pending commit to prevent use-after-free conditions.
+ * @commit: Tracks the pending commit to prevent use-after-free conditions,
+ * and for async plane updates.
*
- * Is only set when @crtc is NULL.
+ * May be NULL.
*/
struct drm_crtc_commit *commit;