Commit 070473bc authored by Russell King's avatar Russell King Committed by Daniel Vetter

drm: add missing ctx argument to plane transitional helpers

In commits:
34a2ab5e ("drm: Add acquire ctx parameter to ->update_plane")
19315294 ("drm: Add acquire ctx parameter to ->plane_disable")

a pointer to a drm_modeset_acquire_ctx structure was added as an
argument to the method prototypes.  The transitional helpers are
supposed to be directly plugged in as implementations of these
methods, but doing so generates a warning.  Add the missing
argument.

A number of buggy users were added for drm_plane_helper_disable()
which need to be fixed up for this change, which we do by passing
a NULL ctx argument.

Fixes: 19315294 ("drm: Add acquire ctx parameter to ->plane_disable")
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/E1fa1Zr-0005gT-VF@rmk-PC.armlinux.org.uk
parent ba609631
...@@ -186,7 +186,7 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = { ...@@ -186,7 +186,7 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
static void arc_pgu_plane_destroy(struct drm_plane *plane) static void arc_pgu_plane_destroy(struct drm_plane *plane)
{ {
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
} }
......
...@@ -282,7 +282,7 @@ static const struct drm_plane_helper_funcs hdlcd_plane_helper_funcs = { ...@@ -282,7 +282,7 @@ static const struct drm_plane_helper_funcs hdlcd_plane_helper_funcs = {
static void hdlcd_plane_destroy(struct drm_plane *plane) static void hdlcd_plane_destroy(struct drm_plane *plane)
{ {
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
} }
......
...@@ -440,6 +440,7 @@ int drm_plane_helper_commit(struct drm_plane *plane, ...@@ -440,6 +440,7 @@ int drm_plane_helper_commit(struct drm_plane *plane,
* @src_y: y offset of @fb for panning * @src_y: y offset of @fb for panning
* @src_w: width of source rectangle in @fb * @src_w: width of source rectangle in @fb
* @src_h: height of source rectangle in @fb * @src_h: height of source rectangle in @fb
* @ctx: lock acquire context, not used here
* *
* Provides a default plane update handler using the atomic plane update * Provides a default plane update handler using the atomic plane update
* functions. It is fully left to the driver to check plane constraints and * functions. It is fully left to the driver to check plane constraints and
...@@ -455,7 +456,8 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -455,7 +456,8 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
int crtc_x, int crtc_y, int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h, unsigned int crtc_w, unsigned int crtc_h,
uint32_t src_x, uint32_t src_y, uint32_t src_x, uint32_t src_y,
uint32_t src_w, uint32_t src_h) uint32_t src_w, uint32_t src_h,
struct drm_modeset_acquire_ctx *ctx)
{ {
struct drm_plane_state *plane_state; struct drm_plane_state *plane_state;
...@@ -489,6 +491,7 @@ EXPORT_SYMBOL(drm_plane_helper_update); ...@@ -489,6 +491,7 @@ EXPORT_SYMBOL(drm_plane_helper_update);
/** /**
* drm_plane_helper_disable() - Transitional helper for plane disable * drm_plane_helper_disable() - Transitional helper for plane disable
* @plane: plane to disable * @plane: plane to disable
* @ctx: lock acquire context, not used here
* *
* Provides a default plane disable handler using the atomic plane update * Provides a default plane disable handler using the atomic plane update
* functions. It is fully left to the driver to check plane constraints and * functions. It is fully left to the driver to check plane constraints and
...@@ -499,7 +502,8 @@ EXPORT_SYMBOL(drm_plane_helper_update); ...@@ -499,7 +502,8 @@ EXPORT_SYMBOL(drm_plane_helper_update);
* RETURNS: * RETURNS:
* Zero on success, error code on failure * Zero on success, error code on failure
*/ */
int drm_plane_helper_disable(struct drm_plane *plane) int drm_plane_helper_disable(struct drm_plane *plane,
struct drm_modeset_acquire_ctx *ctx)
{ {
struct drm_plane_state *plane_state; struct drm_plane_state *plane_state;
struct drm_framebuffer *old_fb; struct drm_framebuffer *old_fb;
......
...@@ -68,7 +68,7 @@ static void mdp4_plane_destroy(struct drm_plane *plane) ...@@ -68,7 +68,7 @@ static void mdp4_plane_destroy(struct drm_plane *plane)
{ {
struct mdp4_plane *mdp4_plane = to_mdp4_plane(plane); struct mdp4_plane *mdp4_plane = to_mdp4_plane(plane);
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
kfree(mdp4_plane); kfree(mdp4_plane);
......
...@@ -46,7 +46,7 @@ static void mdp5_plane_destroy(struct drm_plane *plane) ...@@ -46,7 +46,7 @@ static void mdp5_plane_destroy(struct drm_plane *plane)
{ {
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
kfree(mdp5_plane); kfree(mdp5_plane);
......
...@@ -332,7 +332,7 @@ static void sti_cursor_destroy(struct drm_plane *drm_plane) ...@@ -332,7 +332,7 @@ static void sti_cursor_destroy(struct drm_plane *drm_plane)
{ {
DRM_DEBUG_DRIVER("\n"); DRM_DEBUG_DRIVER("\n");
drm_plane_helper_disable(drm_plane); drm_plane_helper_disable(drm_plane, NULL);
drm_plane_cleanup(drm_plane); drm_plane_cleanup(drm_plane);
} }
......
...@@ -883,7 +883,7 @@ static void sti_gdp_destroy(struct drm_plane *drm_plane) ...@@ -883,7 +883,7 @@ static void sti_gdp_destroy(struct drm_plane *drm_plane)
{ {
DRM_DEBUG_DRIVER("\n"); DRM_DEBUG_DRIVER("\n");
drm_plane_helper_disable(drm_plane); drm_plane_helper_disable(drm_plane, NULL);
drm_plane_cleanup(drm_plane); drm_plane_cleanup(drm_plane);
} }
......
...@@ -1260,7 +1260,7 @@ static void sti_hqvdp_destroy(struct drm_plane *drm_plane) ...@@ -1260,7 +1260,7 @@ static void sti_hqvdp_destroy(struct drm_plane *drm_plane)
{ {
DRM_DEBUG_DRIVER("\n"); DRM_DEBUG_DRIVER("\n");
drm_plane_helper_disable(drm_plane); drm_plane_helper_disable(drm_plane, NULL);
drm_plane_cleanup(drm_plane); drm_plane_cleanup(drm_plane);
} }
......
...@@ -902,7 +902,7 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { ...@@ -902,7 +902,7 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
static void vc4_plane_destroy(struct drm_plane *plane) static void vc4_plane_destroy(struct drm_plane *plane)
{ {
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
} }
......
...@@ -446,7 +446,7 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = { ...@@ -446,7 +446,7 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
static void zx_plane_destroy(struct drm_plane *plane) static void zx_plane_destroy(struct drm_plane *plane)
{ {
drm_plane_helper_disable(plane); drm_plane_helper_disable(plane, NULL);
drm_plane_cleanup(plane); drm_plane_cleanup(plane);
} }
......
...@@ -67,8 +67,10 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -67,8 +67,10 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
int crtc_x, int crtc_y, int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h, unsigned int crtc_w, unsigned int crtc_h,
uint32_t src_x, uint32_t src_y, uint32_t src_x, uint32_t src_y,
uint32_t src_w, uint32_t src_h); uint32_t src_w, uint32_t src_h,
int drm_plane_helper_disable(struct drm_plane *plane); struct drm_modeset_acquire_ctx *ctx);
int drm_plane_helper_disable(struct drm_plane *plane,
struct drm_modeset_acquire_ctx *ctx);
/* For use by drm_crtc_helper.c */ /* For use by drm_crtc_helper.c */
int drm_plane_helper_commit(struct drm_plane *plane, int drm_plane_helper_commit(struct drm_plane *plane,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment