@@ -320,6 +320,7 @@ int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
static int
i9xx_plane_check(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
@@ -616,7 +616,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
if (!new_plane_state->hw.crtc && !old_plane_state->hw.crtc)
return 0;
- ret = plane->check_plane(new_crtc_state, new_plane_state);
+ ret = plane->check_plane(new_crtc_state, old_plane_state, new_plane_state);
if (ret)
return ret;
@@ -231,6 +231,7 @@ static bool i845_cursor_size_ok(const struct intel_plane_state *plane_state)
}
static int i845_check_cursor(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
const struct drm_framebuffer *fb = plane_state->hw.fb;
@@ -470,6 +471,7 @@ static bool i9xx_cursor_size_ok(const struct intel_plane_state *plane_state)
}
static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
@@ -1493,6 +1493,7 @@ struct intel_plane {
const struct intel_crtc_state *crtc_state);
bool (*get_hw_state)(struct intel_plane *plane, enum pipe *pipe);
int (*check_plane)(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state);
int (*min_cdclk)(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state);
@@ -1321,6 +1321,7 @@ g4x_sprite_check_scaling(struct intel_crtc_state *crtc_state,
static int
g4x_sprite_check(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
struct intel_display *display = to_intel_display(crtc_state);
@@ -1389,6 +1390,7 @@ int chv_plane_check_rotation(const struct intel_plane_state *plane_state)
static int
vlv_sprite_check(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
int ret;
@@ -2250,6 +2250,7 @@ static void check_protection(struct intel_plane_state *plane_state)
}
static int skl_plane_check(struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
struct intel_plane_state *plane_state)
{
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
We are adding support to track and store the plane damage clips in to plane state as part of plane atomich check routine. This damage areas could be utilized for FBC dirty rect in xe3. We would need to use a drm_helper function which generates a merged damage area from damage clips set from the userspace. But this helper require old_plane_state being passed as a parameter to it. Add old_plane_state parameter to the check_plane() and update all the affected function calls. Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> --- drivers/gpu/drm/i915/display/i9xx_plane.c | 1 + drivers/gpu/drm/i915/display/intel_atomic_plane.c | 2 +- drivers/gpu/drm/i915/display/intel_cursor.c | 2 ++ drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_sprite.c | 2 ++ drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 + 6 files changed, 8 insertions(+), 1 deletion(-)