Merge remote-tracking branch 'drm/drm-next'
[linux] / drivers / gpu / drm / meson / meson_drv.c
index 27f38bd..2281ed3 100644 (file)
@@ -75,6 +75,10 @@ static const struct drm_mode_config_funcs meson_mode_config_funcs = {
        .fb_create           = drm_gem_fb_create,
 };
 
+static const struct drm_mode_config_helper_funcs meson_mode_config_helpers = {
+       .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
+};
+
 static irqreturn_t meson_irq(int irq, void *arg)
 {
        struct drm_device *dev = arg;
@@ -286,6 +290,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
        drm->mode_config.max_width = 3840;
        drm->mode_config.max_height = 2160;
        drm->mode_config.funcs = &meson_mode_config_funcs;
+       drm->mode_config.helper_private = &meson_mode_config_helpers;
 
        /* Hardware Initialization */
 
@@ -408,8 +413,10 @@ static int meson_probe_remote(struct platform_device *pdev,
                remote_node = of_graph_get_remote_port_parent(ep);
                if (!remote_node ||
                    remote_node == parent || /* Ignore parent endpoint */
-                   !of_device_is_available(remote_node))
+                   !of_device_is_available(remote_node)) {
+                       of_node_put(remote_node);
                        continue;
+               }
 
                count += meson_probe_remote(pdev, match, remote, remote_node);
 
@@ -428,10 +435,13 @@ static int meson_drv_probe(struct platform_device *pdev)
 
        for_each_endpoint_of_node(np, ep) {
                remote = of_graph_get_remote_port_parent(ep);
-               if (!remote || !of_device_is_available(remote))
+               if (!remote || !of_device_is_available(remote)) {
+                       of_node_put(remote);
                        continue;
+               }
 
                count += meson_probe_remote(pdev, &match, np, remote);
+               of_node_put(remote);
        }
 
        if (count && !match)