drm/atomic: Make prepare_fb/cleanup_fb only take state, v3.
This removes the need to separately track fb changes i915. That will be done as a separate commit, however. Changes since v1: - Add dri-devel to cc. - Fix a check in intel's prepare and cleanup fb to take rotation into account. Changes since v2: - Split out i915 changes to a separate commit. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> [danvet: Squash in msm fixup from Maarten.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:

committed by
Daniel Vetter

parent
825926d8e0
commit
844f9111f6
@@ -60,17 +60,19 @@ to_omap_plane_state(struct drm_plane_state *state)
|
||||
}
|
||||
|
||||
static int omap_plane_prepare_fb(struct drm_plane *plane,
|
||||
struct drm_framebuffer *fb,
|
||||
const struct drm_plane_state *new_state)
|
||||
{
|
||||
return omap_framebuffer_pin(fb);
|
||||
if (!new_state->fb)
|
||||
return 0;
|
||||
|
||||
return omap_framebuffer_pin(new_state->fb);
|
||||
}
|
||||
|
||||
static void omap_plane_cleanup_fb(struct drm_plane *plane,
|
||||
struct drm_framebuffer *fb,
|
||||
const struct drm_plane_state *old_state)
|
||||
{
|
||||
omap_framebuffer_unpin(fb);
|
||||
if (old_state->fb)
|
||||
omap_framebuffer_unpin(old_state->fb);
|
||||
}
|
||||
|
||||
static void omap_plane_atomic_update(struct drm_plane *plane,
|
||||
|
Reference in New Issue
Block a user