Commit 34a2ab5e authored by Daniel Vetter's avatar Daniel Vetter

drm: Add acquire ctx parameter to ->update_plane

Just rolling it out, no code change here.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Eric Anholt <eric@anholt.net>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-3-daniel.vetter@ffwll.ch
parent 232e8f70
...@@ -94,7 +94,8 @@ static int ...@@ -94,7 +94,8 @@ static int
armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
struct drm_framebuffer *fb, struct drm_framebuffer *fb,
int crtc_x, int crtc_y, unsigned crtc_w, unsigned crtc_h, int crtc_x, int crtc_y, unsigned crtc_w, unsigned crtc_h,
uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h,
struct drm_modeset_acquire_ctx *ctx)
{ {
struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane); struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane);
struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
......
...@@ -2077,6 +2077,7 @@ EXPORT_SYMBOL(drm_atomic_helper_swap_state); ...@@ -2077,6 +2077,7 @@ EXPORT_SYMBOL(drm_atomic_helper_swap_state);
* @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
* *
* Provides a default plane update handler using the atomic driver interface. * Provides a default plane update handler using the atomic driver interface.
* *
...@@ -2089,7 +2090,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane, ...@@ -2089,7 +2090,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane,
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_atomic_state *state; struct drm_atomic_state *state;
struct drm_plane_state *plane_state; struct drm_plane_state *plane_state;
......
...@@ -510,7 +510,7 @@ static int __setplane_internal(struct drm_plane *plane, ...@@ -510,7 +510,7 @@ static int __setplane_internal(struct drm_plane *plane,
plane->old_fb = plane->fb; plane->old_fb = plane->fb;
ret = plane->funcs->update_plane(plane, crtc, fb, ret = plane->funcs->update_plane(plane, crtc, fb,
crtc_x, crtc_y, crtc_w, crtc_h, crtc_x, crtc_y, crtc_w, crtc_h,
src_x, src_y, src_w, src_h); src_x, src_y, src_w, src_h, ctx);
if (!ret) { if (!ret) {
plane->crtc = crtc; plane->crtc = crtc;
plane->fb = fb; plane->fb = fb;
......
...@@ -275,6 +275,7 @@ EXPORT_SYMBOL(drm_plane_helper_check_update); ...@@ -275,6 +275,7 @@ EXPORT_SYMBOL(drm_plane_helper_check_update);
* @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 for primary planes. This is handler * Provides a default plane update handler for primary planes. This is handler
* is called in response to a userspace SetPlane operation on the plane with a * is called in response to a userspace SetPlane operation on the plane with a
...@@ -303,7 +304,8 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -303,7 +304,8 @@ int drm_primary_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_mode_set set = { struct drm_mode_set set = {
.crtc = crtc, .crtc = crtc,
......
...@@ -13426,7 +13426,8 @@ intel_legacy_cursor_update(struct drm_plane *plane, ...@@ -13426,7 +13426,8 @@ intel_legacy_cursor_update(struct drm_plane *plane,
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_i915_private *dev_priv = to_i915(crtc->dev); struct drm_i915_private *dev_priv = to_i915(crtc->dev);
int ret; int ret;
...@@ -13539,7 +13540,7 @@ intel_legacy_cursor_update(struct drm_plane *plane, ...@@ -13539,7 +13540,7 @@ intel_legacy_cursor_update(struct drm_plane *plane,
slow: slow:
return drm_atomic_helper_update_plane(plane, crtc, fb, return drm_atomic_helper_update_plane(plane, crtc, fb,
crtc_x, crtc_y, crtc_w, crtc_h, crtc_x, crtc_y, crtc_w, crtc_h,
src_x, src_y, src_w, src_h); src_x, src_y, src_w, src_h, ctx);
} }
static const struct drm_plane_funcs intel_cursor_plane_funcs = { static const struct drm_plane_funcs intel_cursor_plane_funcs = {
......
...@@ -37,7 +37,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane, ...@@ -37,7 +37,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
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);
static void set_scanout_locked(struct drm_plane *plane, static void set_scanout_locked(struct drm_plane *plane,
struct drm_framebuffer *fb); struct drm_framebuffer *fb);
...@@ -886,7 +887,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane, ...@@ -886,7 +887,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
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, *new_plane_state; struct drm_plane_state *plane_state, *new_plane_state;
struct mdp5_plane_state *mdp5_pstate; struct mdp5_plane_state *mdp5_pstate;
...@@ -954,7 +956,7 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane, ...@@ -954,7 +956,7 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
slow: slow:
return drm_atomic_helper_update_plane(plane, crtc, fb, return drm_atomic_helper_update_plane(plane, crtc, fb,
crtc_x, crtc_y, crtc_w, crtc_h, crtc_x, crtc_y, crtc_w, crtc_h,
src_x, src_y, src_w, src_h); src_x, src_y, src_w, src_h, ctx);
} }
enum mdp5_pipe mdp5_plane_pipe(struct drm_plane *plane) enum mdp5_pipe mdp5_plane_pipe(struct drm_plane *plane)
......
...@@ -94,7 +94,8 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -94,7 +94,8 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
struct drm_framebuffer *fb, int crtc_x, int crtc_y, struct drm_framebuffer *fb, 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 nouveau_drm *drm = nouveau_drm(plane->dev); struct nouveau_drm *drm = nouveau_drm(plane->dev);
struct nvif_object *dev = &drm->client.device.object; struct nvif_object *dev = &drm->client.device.object;
...@@ -345,7 +346,8 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -345,7 +346,8 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
struct drm_framebuffer *fb, int crtc_x, int crtc_y, struct drm_framebuffer *fb, 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 nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
struct nouveau_plane *nv_plane = struct nouveau_plane *nv_plane =
......
...@@ -177,7 +177,8 @@ shmob_drm_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -177,7 +177,8 @@ shmob_drm_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
struct drm_framebuffer *fb, int crtc_x, int crtc_y, struct drm_framebuffer *fb, 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 shmob_drm_plane *splane = to_shmob_plane(plane); struct shmob_drm_plane *splane = to_shmob_plane(plane);
struct shmob_drm_device *sdev = plane->dev->dev_private; struct shmob_drm_device *sdev = plane->dev->dev_private;
......
...@@ -756,7 +756,8 @@ vc4_update_plane(struct drm_plane *plane, ...@@ -756,7 +756,8 @@ vc4_update_plane(struct drm_plane *plane,
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;
struct vc4_plane_state *vc4_state; struct vc4_plane_state *vc4_state;
...@@ -817,7 +818,8 @@ vc4_update_plane(struct drm_plane *plane, ...@@ -817,7 +818,8 @@ vc4_update_plane(struct drm_plane *plane,
crtc_x, crtc_y, crtc_x, crtc_y,
crtc_w, crtc_h, crtc_w, crtc_h,
src_x, src_y, src_x, src_y,
src_w, src_h); src_w, src_h,
ctx);
} }
static const struct drm_plane_funcs vc4_plane_funcs = { static const struct drm_plane_funcs vc4_plane_funcs = {
......
...@@ -94,7 +94,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane, ...@@ -94,7 +94,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane,
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);
int drm_atomic_helper_disable_plane(struct drm_plane *plane); int drm_atomic_helper_disable_plane(struct drm_plane *plane);
int __drm_atomic_helper_disable_plane(struct drm_plane *plane, int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
struct drm_plane_state *plane_state); struct drm_plane_state *plane_state);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
struct drm_crtc; struct drm_crtc;
struct drm_printer; struct drm_printer;
struct drm_modeset_acquire_ctx;
/** /**
* struct drm_plane_state - mutable plane state * struct drm_plane_state - mutable plane state
...@@ -184,7 +185,8 @@ struct drm_plane_funcs { ...@@ -184,7 +185,8 @@ struct drm_plane_funcs {
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);
/** /**
* @disable_plane: * @disable_plane:
......
...@@ -61,7 +61,8 @@ int drm_primary_helper_update(struct drm_plane *plane, ...@@ -61,7 +61,8 @@ int drm_primary_helper_update(struct drm_plane *plane,
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);
int drm_primary_helper_disable(struct drm_plane *plane); int drm_primary_helper_disable(struct drm_plane *plane);
void drm_primary_helper_destroy(struct drm_plane *plane); void drm_primary_helper_destroy(struct drm_plane *plane);
extern const struct drm_plane_funcs drm_primary_helper_funcs; extern const struct drm_plane_funcs drm_primary_helper_funcs;
......
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