Merge tag 'topic/atomic-core-2015-01-27' of git://anongit.freedesktop.org/drm-intel into drm-next
* tag 'topic/atomic-core-2015-01-27' of git://anongit.freedesktop.org/drm-intel: drm/atomic: Fix potential use of state after free drm/atomic-helper: debug output for modesets drm/atomic-helpers: Saner encoder/crtc callbacks drm/atomic-helpers: Recover full cursor plane behaviour drm/atomic-helper: add connector->dpms() implementation drm/atomic: Add drm_crtc_state->active drm: Add standardized boolean props drm/plane-helper: Fix transitional helper kerneldocs drm/plane-helper: Skip prepare_fb/cleanup_fb when newfb==oldfb Conflicts: include/drm/drm_crtc_helper.h
This commit is contained in:
@@ -435,7 +435,8 @@ int drm_plane_helper_commit(struct drm_plane *plane,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (plane_funcs->prepare_fb && plane_state->fb) {
|
||||
if (plane_funcs->prepare_fb && plane_state->fb &&
|
||||
plane_state->fb != old_fb) {
|
||||
ret = plane_funcs->prepare_fb(plane, plane_state->fb);
|
||||
if (ret)
|
||||
goto out;
|
||||
@@ -464,6 +465,13 @@ int drm_plane_helper_commit(struct drm_plane *plane,
|
||||
crtc_funcs[i]->atomic_flush(crtc[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we only moved the plane and didn't change fb's, there's no need to
|
||||
* wait for vblank.
|
||||
*/
|
||||
if (plane->state->fb == old_fb)
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (!crtc[i])
|
||||
continue;
|
||||
@@ -492,7 +500,7 @@ out:
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_plane_helper_update() - Helper for primary plane update
|
||||
* drm_plane_helper_update() - Transitional helper for plane update
|
||||
* @plane: plane object to update
|
||||
* @crtc: owning CRTC of owning plane
|
||||
* @fb: framebuffer to flip onto plane
|
||||
@@ -549,7 +557,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
|
||||
EXPORT_SYMBOL(drm_plane_helper_update);
|
||||
|
||||
/**
|
||||
* drm_plane_helper_disable() - Helper for primary plane disable
|
||||
* drm_plane_helper_disable() - Transitional helper for plane disable
|
||||
* @plane: plane to disable
|
||||
*
|
||||
* Provides a default plane disable handler using the atomic plane update
|
||||
|
Reference in New Issue
Block a user