|
@@ -1116,6 +1116,7 @@ int drm_atomic_helper_prepare_planes(struct drm_device *dev,
|
|
for (i = 0; i < nplanes; i++) {
|
|
for (i = 0; i < nplanes; i++) {
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane *plane = state->planes[i];
|
|
struct drm_plane *plane = state->planes[i];
|
|
|
|
+ struct drm_plane_state *plane_state = state->plane_states[i];
|
|
struct drm_framebuffer *fb;
|
|
struct drm_framebuffer *fb;
|
|
|
|
|
|
if (!plane)
|
|
if (!plane)
|
|
@@ -1123,10 +1124,10 @@ int drm_atomic_helper_prepare_planes(struct drm_device *dev,
|
|
|
|
|
|
funcs = plane->helper_private;
|
|
funcs = plane->helper_private;
|
|
|
|
|
|
- fb = state->plane_states[i]->fb;
|
|
|
|
|
|
+ fb = plane_state->fb;
|
|
|
|
|
|
if (fb && funcs->prepare_fb) {
|
|
if (fb && funcs->prepare_fb) {
|
|
- ret = funcs->prepare_fb(plane, fb);
|
|
|
|
|
|
+ ret = funcs->prepare_fb(plane, fb, plane_state);
|
|
if (ret)
|
|
if (ret)
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -1138,6 +1139,7 @@ fail:
|
|
for (i--; i >= 0; i--) {
|
|
for (i--; i >= 0; i--) {
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane *plane = state->planes[i];
|
|
struct drm_plane *plane = state->planes[i];
|
|
|
|
+ struct drm_plane_state *plane_state = state->plane_states[i];
|
|
struct drm_framebuffer *fb;
|
|
struct drm_framebuffer *fb;
|
|
|
|
|
|
if (!plane)
|
|
if (!plane)
|
|
@@ -1148,7 +1150,7 @@ fail:
|
|
fb = state->plane_states[i]->fb;
|
|
fb = state->plane_states[i]->fb;
|
|
|
|
|
|
if (fb && funcs->cleanup_fb)
|
|
if (fb && funcs->cleanup_fb)
|
|
- funcs->cleanup_fb(plane, fb);
|
|
|
|
|
|
+ funcs->cleanup_fb(plane, fb, plane_state);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1254,6 +1256,7 @@ void drm_atomic_helper_cleanup_planes(struct drm_device *dev,
|
|
for (i = 0; i < nplanes; i++) {
|
|
for (i = 0; i < nplanes; i++) {
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane_helper_funcs *funcs;
|
|
struct drm_plane *plane = old_state->planes[i];
|
|
struct drm_plane *plane = old_state->planes[i];
|
|
|
|
+ struct drm_plane_state *plane_state = old_state->plane_states[i];
|
|
struct drm_framebuffer *old_fb;
|
|
struct drm_framebuffer *old_fb;
|
|
|
|
|
|
if (!plane)
|
|
if (!plane)
|
|
@@ -1261,10 +1264,10 @@ void drm_atomic_helper_cleanup_planes(struct drm_device *dev,
|
|
|
|
|
|
funcs = plane->helper_private;
|
|
funcs = plane->helper_private;
|
|
|
|
|
|
- old_fb = old_state->plane_states[i]->fb;
|
|
|
|
|
|
+ old_fb = plane_state->fb;
|
|
|
|
|
|
if (old_fb && funcs->cleanup_fb)
|
|
if (old_fb && funcs->cleanup_fb)
|
|
- funcs->cleanup_fb(plane, old_fb);
|
|
|
|
|
|
+ funcs->cleanup_fb(plane, old_fb, plane_state);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(drm_atomic_helper_cleanup_planes);
|
|
EXPORT_SYMBOL(drm_atomic_helper_cleanup_planes);
|