drm: Plumb modifiers through plane init
[linux-2.6-block.git] / drivers / gpu / drm / hisilicon / kirin / kirin_drm_ade.c
index c96c228a98980810d220eec84b2a8a3326e0c487..9882ebd8751c833704de75bb5d3ffdefde230453 100644 (file)
@@ -467,7 +467,8 @@ static void ade_dump_regs(void __iomem *base)
 static void ade_dump_regs(void __iomem *base) { }
 #endif
 
-static void ade_crtc_enable(struct drm_crtc *crtc)
+static void ade_crtc_atomic_enable(struct drm_crtc *crtc,
+                                  struct drm_crtc_state *old_state)
 {
        struct ade_crtc *acrtc = to_ade_crtc(crtc);
        struct ade_hw_ctx *ctx = acrtc->ctx;
@@ -489,7 +490,8 @@ static void ade_crtc_enable(struct drm_crtc *crtc)
        acrtc->enable = true;
 }
 
-static void ade_crtc_disable(struct drm_crtc *crtc)
+static void ade_crtc_atomic_disable(struct drm_crtc *crtc,
+                                   struct drm_crtc_state *old_state)
 {
        struct ade_crtc *acrtc = to_ade_crtc(crtc);
        struct ade_hw_ctx *ctx = acrtc->ctx;
@@ -553,11 +555,11 @@ static void ade_crtc_atomic_flush(struct drm_crtc *crtc,
 }
 
 static const struct drm_crtc_helper_funcs ade_crtc_helper_funcs = {
-       .enable         = ade_crtc_enable,
-       .disable        = ade_crtc_disable,
        .mode_set_nofb  = ade_crtc_mode_set_nofb,
        .atomic_begin   = ade_crtc_atomic_begin,
        .atomic_flush   = ade_crtc_atomic_flush,
+       .atomic_enable  = ade_crtc_atomic_enable,
+       .atomic_disable = ade_crtc_atomic_disable,
 };
 
 static const struct drm_crtc_funcs ade_crtc_funcs = {
@@ -583,8 +585,7 @@ static int ade_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
         */
        port = of_get_child_by_name(dev->dev->of_node, "port");
        if (!port) {
-               DRM_ERROR("no port node found in %s\n",
-                         dev->dev->of_node->full_name);
+               DRM_ERROR("no port node found in %pOF\n", dev->dev->of_node);
                return -EINVAL;
        }
        of_node_put(port);
@@ -909,7 +910,7 @@ static int ade_plane_init(struct drm_device *dev, struct ade_plane *aplane,
                return ret;
 
        ret = drm_universal_plane_init(dev, &aplane->base, 1, &ade_plane_funcs,
-                                      fmts, fmts_cnt, type, NULL);
+                                      fmts, fmts_cnt, NULL, type, NULL);
        if (ret) {
                DRM_ERROR("fail to init plane, ch=%d\n", aplane->ch);
                return ret;