On Friday 20 September 2013 01:39 PM, Tomi Valkeinen wrote:
<snip>
+static int omap_connect_dssdevs(void)
+{
+ int r;
+ struct omap_dss_device *dssdev = NULL;
+
+ for_each_dss_dev(dssdev) {
+ r = dssdev->driver->connect(dssdev);
+ if (r == -EPROBE_DEFER) {
+ return r;
+ } else if (r) {
+ dev_warn(dssdev->dev, "could not connect display: %s\n",
+ dssdev->name);
+ }
+ }
+
+ return 0;
+}
Beagle-xm with DT boot doesn't work with this. There are no displays at
omapdrm probe time, so omapdrm doesn't find any displays. I added the
changes below, which made it work.
Tomi
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index cbe5d8e..e315413 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -91,6 +91,7 @@ static int omap_connect_dssdevs(void)
{
int r;
struct omap_dss_device *dssdev = NULL;
+ bool no_displays = true;
for_each_dss_dev(dssdev) {
r = dssdev->driver->connect(dssdev);
@@ -99,9 +100,14 @@ static int omap_connect_dssdevs(void)
} else if (r) {
dev_warn(dssdev->dev, "could not connect display: %s\n",
dssdev->name);
+ } else {
+ no_displays = false;
}
}
+ if (no_displays)
+ return -EPROBE_DEFER;
+
return 0;
}
I suppose we would hit this case if all of the displays are deferred
because of some dependency and are probed after omapdrm probes.
Is that the case with beagle-xm?
I think we need to move this from pdev_probe() anyway. I don't see other
drivers doing much in pdev_probe(), they do most of their stuff in
dev_load() itself. I'll try with that along with disabling of the
dssdevs in encoder's destroy.
Archit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html