return 0;
}
-static int armada_ovl_plane_disable(struct drm_plane *plane)
+static int armada_ovl_plane_disable(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane);
struct drm_framebuffer *fb;
/**
* drm_atomic_helper_disable_plane - Helper for primary plane disable using * atomic
* @plane: plane to disable
+ * @ctx: lock acquire context
*
* Provides a default plane disable handler using the atomic driver interface.
*
* RETURNS:
* Zero on success, error code on failure
*/
-int drm_atomic_helper_disable_plane(struct drm_plane *plane)
+int drm_atomic_helper_disable_plane(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct drm_atomic_state *state;
struct drm_plane_state *plane_state;
WARN_ON(drm_drv_uses_atomic_modeset(plane->dev));
plane->old_fb = plane->fb;
- ret = plane->funcs->disable_plane(plane);
+ ret = plane->funcs->disable_plane(plane, NULL);
if (ret) {
DRM_ERROR("failed to disable plane with busy fb\n");
plane->old_fb = NULL;
/* No fb means shut it down */
if (!fb) {
plane->old_fb = plane->fb;
- ret = plane->funcs->disable_plane(plane);
+ ret = plane->funcs->disable_plane(plane, ctx);
if (!ret) {
plane->crtc = NULL;
plane->fb = NULL;
* provides their own disable function, this will just
* wind up returning -EINVAL to userspace.
*/
- return plane->funcs->disable_plane(plane);
+ return plane->funcs->disable_plane(plane, ctx);
/* Find current connectors for CRTC */
num_connectors = get_connectors_for_crtc(crtc, NULL, 0);
* RETURNS:
* Unconditionally returns -EINVAL.
*/
-int drm_primary_helper_disable(struct drm_plane *plane)
+int drm_primary_helper_disable(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
return -EINVAL;
}
}
static int
-nv10_disable_plane(struct drm_plane *plane)
+nv10_disable_plane(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
struct nouveau_plane *nv_plane =
static void
nv_destroy_plane(struct drm_plane *plane)
{
- plane->funcs->disable_plane(plane);
+ drm_plane_force_disable(plane);
drm_plane_cleanup(plane);
kfree(plane);
}
plane->set_params = nv10_set_params;
nv10_set_params(plane);
- nv10_disable_plane(&plane->base);
+ drm_plane_force_disable(&plane->base);
return;
cleanup:
drm_plane_cleanup(&plane->base);
}
static int
-nv04_disable_plane(struct drm_plane *plane)
+nv04_disable_plane(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
struct nouveau_plane *nv_plane =
drm_object_attach_property(&plane->base.base,
plane->props.brightness, plane->brightness);
- nv04_disable_plane(&plane->base);
+ drm_plane_force_disable(&plane->base);
return;
cleanup:
drm_plane_cleanup(&plane->base);
return 0;
}
-static int shmob_drm_plane_disable(struct drm_plane *plane)
+static int shmob_drm_plane_disable(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct shmob_drm_plane *splane = to_shmob_plane(plane);
struct shmob_drm_device *sdev = plane->dev->dev_private;
static void shmob_drm_plane_destroy(struct drm_plane *plane)
{
- shmob_drm_plane_disable(plane);
+ drm_plane_force_disable(plane);
drm_plane_cleanup(plane);
}
uint32_t src_x, uint32_t src_y,
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,
+ struct drm_modeset_acquire_ctx *ctx);
int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
struct drm_plane_state *plane_state);
int drm_atomic_helper_set_config(struct drm_mode_set *set);
*
* 0 on success or a negative error code on failure.
*/
- int (*disable_plane)(struct drm_plane *plane);
+ int (*disable_plane)(struct drm_plane *plane,
+ struct drm_modeset_acquire_ctx *ctx);
/**
* @destroy:
uint32_t src_x, uint32_t src_y,
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,
+ struct drm_modeset_acquire_ctx *ctx);
void drm_primary_helper_destroy(struct drm_plane *plane);
extern const struct drm_plane_funcs drm_primary_helper_funcs;