Skip to content

Commit d6a77ba

Browse files
linuswatseanpaul
authored andcommitted
Revert "drm/panel: Add device_link from panel device to DRM device"
This reverts commit 0c08754. commit 0c08754 ("drm/panel: Add device_link from panel device to DRM device") creates a circular dependency under these circumstances: 1. The panel depends on dsi-host because it is MIPI-DSI child device. 2. dsi-host depends on the drm parent device (connector->dev->dev) this should be allowed. 3. drm parent dev (connector->dev->dev) depends on the panel after this patch. This makes the dependency circular and while it appears it does not affect any in-tree drivers (they do not seem to have dsi hosts depending on the same parent device) this does not seem right. As noted in a response from Andrzej Hajda, the intent is likely to make the panel dependent on the DRM device (connector->dev) not its parent. But we have no way of doing that since the DRM device doesn't contain any struct device on its own (arguably it should). Revert this until a proper approach is figured out. Cc: Jyri Sarha <jsarha@ti.com> Cc: Eric Anholt <eric@anholt.net> Cc: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180927124130.9102-1-linus.walleij@linaro.org
1 parent 337fe9f commit d6a77ba

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

drivers/gpu/drm/drm_panel.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <linux/err.h>
2525
#include <linux/module.h>
2626

27-
#include <drm/drm_device.h>
2827
#include <drm/drm_crtc.h>
2928
#include <drm/drm_panel.h>
3029

@@ -105,13 +104,6 @@ int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector)
105104
if (panel->connector)
106105
return -EBUSY;
107106

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-
115107
panel->connector = connector;
116108
panel->drm = connector->dev;
117109

@@ -133,8 +125,6 @@ EXPORT_SYMBOL(drm_panel_attach);
133125
*/
134126
int drm_panel_detach(struct drm_panel *panel)
135127
{
136-
device_link_del(panel->link);
137-
138128
panel->connector = NULL;
139129
panel->drm = NULL;
140130

include/drm/drm_panel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ struct drm_panel {
8989
struct drm_device *drm;
9090
struct drm_connector *connector;
9191
struct device *dev;
92-
struct device_link *link;
9392

9493
const struct drm_panel_funcs *funcs;
9594

0 commit comments

Comments
 (0)