Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1832040d authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm: Allow drivers to modify plane_state in prepare_fb/cleanup_fb



The drivers have to modify the atomic plane state during the prepare_fb
callback so they track allocations, reservations and dependencies for
this atomic operation involving this fb. In particular, how else do we
set the plane->fence from the framebuffer!

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160818180017.20508-1-chris@chris-wilson.co.uk
parent ee4d7899
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -755,7 +755,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
}

static int atmel_hlcdc_plane_prepare_fb(struct drm_plane *p,
					const struct drm_plane_state *new_state)
					struct drm_plane_state *new_state)
{
	/*
	 * FIXME: we should avoid this const -> non-const cast but it's
@@ -780,7 +780,7 @@ static int atmel_hlcdc_plane_prepare_fb(struct drm_plane *p,
}

static void atmel_hlcdc_plane_cleanup_fb(struct drm_plane *p,
				const struct drm_plane_state *old_state)
					 struct drm_plane_state *old_state)
{
	/*
	 * FIXME: we should avoid this const -> non-const cast but it's
+2 −2
Original line number Diff line number Diff line
@@ -171,13 +171,13 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,

static void
fsl_dcu_drm_plane_cleanup_fb(struct drm_plane *plane,
			     const struct drm_plane_state *new_state)
			     struct drm_plane_state *new_state)
{
}

static int
fsl_dcu_drm_plane_prepare_fb(struct drm_plane *plane,
			     const struct drm_plane_state *new_state)
			     struct drm_plane_state *new_state)
{
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -818,14 +818,14 @@ static void ade_disable_channel(struct ade_plane *aplane)
}

static int ade_plane_prepare_fb(struct drm_plane *plane,
				const struct drm_plane_state *new_state)
				struct drm_plane_state *new_state)
{
	/* do nothing */
	return 0;
}

static void ade_plane_cleanup_fb(struct drm_plane *plane,
				 const struct drm_plane_state *old_state)
				 struct drm_plane_state *old_state)
{
	/* do nothing */
}
+2 −2
Original line number Diff line number Diff line
@@ -13976,7 +13976,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
 */
int
intel_prepare_plane_fb(struct drm_plane *plane,
		       const struct drm_plane_state *new_state)
		       struct drm_plane_state *new_state)
{
	struct drm_device *dev = plane->dev;
	struct drm_framebuffer *fb = new_state->fb;
@@ -14058,7 +14058,7 @@ intel_prepare_plane_fb(struct drm_plane *plane,
 */
void
intel_cleanup_plane_fb(struct drm_plane *plane,
		       const struct drm_plane_state *old_state)
		       struct drm_plane_state *old_state)
{
	struct drm_device *dev = plane->dev;
	struct intel_plane_state *old_intel_state;
+2 −2
Original line number Diff line number Diff line
@@ -1225,9 +1225,9 @@ void intel_finish_page_flip_cs(struct drm_i915_private *dev_priv, int pipe);
void intel_finish_page_flip_mmio(struct drm_i915_private *dev_priv, int pipe);
void intel_check_page_flip(struct drm_i915_private *dev_priv, int pipe);
int intel_prepare_plane_fb(struct drm_plane *plane,
			   const struct drm_plane_state *new_state);
			   struct drm_plane_state *new_state);
void intel_cleanup_plane_fb(struct drm_plane *plane,
			    const struct drm_plane_state *old_state);
			    struct drm_plane_state *old_state);
int intel_plane_atomic_get_property(struct drm_plane *plane,
				    const struct drm_plane_state *state,
				    struct drm_property *property,
Loading