{
struct armada_private *priv = drm->dev_private;
struct armada_crtc *dcrtc;
- struct armada_plane *primary;
+ struct drm_plane *primary;
void __iomem *base;
int ret;
goto err_crtc;
}
- ret = drm_crtc_init_with_planes(drm, &dcrtc->crtc, &primary->base, NULL,
+ ret = drm_crtc_init_with_planes(drm, &dcrtc->crtc, primary, NULL,
&armada_crtc_funcs, NULL);
if (ret)
goto err_crtc_init;
return armada_overlay_plane_create(drm, 1 << dcrtc->num);
err_crtc_init:
- primary->base.funcs->destroy(&primary->base);
+ primary->funcs->destroy(primary);
err_crtc:
kfree(dcrtc);
armada_reg_queue_mod(_r, _i, 0, 0, ~0)
struct armada_crtc;
-struct armada_plane;
struct armada_variant;
-struct armada_plane {
- struct drm_plane base;
- wait_queue_head_t frame_wait;
-};
-#define drm_to_armada_plane(p) container_of(p, struct armada_plane, base)
-
struct armada_crtc {
struct drm_crtc crtc;
const struct armada_variant *variant;
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
};
-int armada_drm_plane_init(struct armada_plane *plane)
-{
- init_waitqueue_head(&plane->frame_wait);
- return 0;
-}
-
int armada_drm_primary_plane_init(struct drm_device *drm,
- struct armada_plane *primary)
+ struct drm_plane *primary)
{
int ret;
- ret = armada_drm_plane_init(primary);
- if (ret)
- return ret;
-
- drm_plane_helper_add(&primary->base,
- &armada_primary_plane_helper_funcs);
+ drm_plane_helper_add(primary, &armada_primary_plane_helper_funcs);
- ret = drm_universal_plane_init(drm, &primary->base, 0,
+ ret = drm_universal_plane_init(drm, primary, 0,
&armada_primary_plane_funcs,
armada_primary_formats,
ARRAY_SIZE(armada_primary_formats),
struct drm_plane_state *old_state);
int armada_drm_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state);
-int armada_drm_plane_init(struct armada_plane *plane);
int armada_drm_primary_plane_init(struct drm_device *drm,
- struct armada_plane *primary);
+ struct drm_plane *primary);
#endif