aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-09-27 19:25:26 -0400
committerDave Airlie <airlied@redhat.com>2018-09-27 19:25:56 -0400
commitadba0e5493ab21fb5098bc1654aca6826036273c (patch)
treeb012945e33ef5cee42421692a6c39a2bf62f8c4f
parent576156bb01a62c1f64b32b416593862bb34bddaa (diff)
parentd6a77ba0eb92d8ffa4b05a442fc20d0a9b11c4c4 (diff)
Merge tag 'drm-misc-fixes-2018-09-27-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
- Revert adding device-link to panels - Don't leak fences in drm/syncobj Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20180927152712.GA53076@art_vandelay
-rw-r--r--drivers/gpu/drm/drm_panel.c10
-rw-r--r--drivers/gpu/drm/drm_syncobj.c5
-rw-r--r--include/drm/drm_panel.h1
3 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index b902361dee6e..1d9a9d2fe0e0 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -24,7 +24,6 @@
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/module.h> 25#include <linux/module.h>
26 26
27#include <drm/drm_device.h>
28#include <drm/drm_crtc.h> 27#include <drm/drm_crtc.h>
29#include <drm/drm_panel.h> 28#include <drm/drm_panel.h>
30 29
@@ -105,13 +104,6 @@ int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector)
105 if (panel->connector) 104 if (panel->connector)
106 return -EBUSY; 105 return -EBUSY;
107 106
108 panel->link = device_link_add(connector->dev->dev, panel->dev, 0);
109 if (!panel->link) {
110 dev_err(panel->dev, "failed to link panel to %s\n",
111 dev_name(connector->dev->dev));
112 return -EINVAL;
113 }
114
115 panel->connector = connector; 107 panel->connector = connector;
116 panel->drm = connector->dev; 108 panel->drm = connector->dev;
117 109
@@ -133,8 +125,6 @@ EXPORT_SYMBOL(drm_panel_attach);
133 */ 125 */
134int drm_panel_detach(struct drm_panel *panel) 126int drm_panel_detach(struct drm_panel *panel)
135{ 127{
136 device_link_del(panel->link);
137
138 panel->connector = NULL; 128 panel->connector = NULL;
139 panel->drm = NULL; 129 panel->drm = NULL;
140 130
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index adb3cb27d31e..759278fef35a 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -97,6 +97,8 @@ static int drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj,
97{ 97{
98 int ret; 98 int ret;
99 99
100 WARN_ON(*fence);
101
100 *fence = drm_syncobj_fence_get(syncobj); 102 *fence = drm_syncobj_fence_get(syncobj);
101 if (*fence) 103 if (*fence)
102 return 1; 104 return 1;
@@ -743,6 +745,9 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
743 745
744 if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) { 746 if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
745 for (i = 0; i < count; ++i) { 747 for (i = 0; i < count; ++i) {
748 if (entries[i].fence)
749 continue;
750
746 drm_syncobj_fence_get_or_add_callback(syncobjs[i], 751 drm_syncobj_fence_get_or_add_callback(syncobjs[i],
747 &entries[i].fence, 752 &entries[i].fence,
748 &entries[i].syncobj_cb, 753 &entries[i].syncobj_cb,
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 582a0ec0aa70..777814755fa6 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -89,7 +89,6 @@ struct drm_panel {
89 struct drm_device *drm; 89 struct drm_device *drm;
90 struct drm_connector *connector; 90 struct drm_connector *connector;
91 struct device *dev; 91 struct device *dev;
92 struct device_link *link;
93 92
94 const struct drm_panel_funcs *funcs; 93 const struct drm_panel_funcs *funcs;
95 94