From: Archit Taneja <archit@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: robdclark@gmail.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH] drm: omap: fix: Defer probe if an omapdss device requests for it at connect
Date: Fri, 20 Sep 2013 14:19:02 +0530 [thread overview]
Message-ID: <523C0BFE.5010409@ti.com> (raw)
In-Reply-To: <523C02C8.30207@ti.com>
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
next prev parent reply other threads:[~2013-09-20 8:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 11:08 [PATCH] drm: omap: fix: Defer probe if an omapdss device requests for it at connect Archit Taneja
2013-09-18 11:15 ` Archit Taneja
2013-09-18 12:41 ` Tomi Valkeinen
2013-09-18 13:17 ` Archit Taneja
2013-09-18 13:26 ` Tomi Valkeinen
2013-09-19 8:49 ` [PATCH 1/2] " Archit Taneja
2013-09-19 8:49 ` [PATCH 2/2] drm: omap: disconnect devices when omapdrm module is removed Archit Taneja
2013-09-19 10:08 ` Tomi Valkeinen
2013-09-19 10:51 ` Archit Taneja
2013-09-20 8:09 ` [PATCH] drm: omap: fix: Defer probe if an omapdss device requests for it at connect Tomi Valkeinen
2013-09-20 8:49 ` Archit Taneja [this message]
2013-09-20 8:55 ` Tomi Valkeinen
2013-09-20 10:18 ` Archit Taneja
2013-09-20 10:22 ` Tomi Valkeinen
2013-10-07 9:38 ` [PATCH v2 0/2] drm: omap: Fix omapdrm probe and module insertion/removal issues Archit Taneja
2013-10-07 9:38 ` [PATCH v2 1/2] drm: omap: fix: Defer probe if an omapdss device requests for it at connect Archit Taneja
2013-10-07 9:38 ` [PATCH v2 2/2] drm: omap: disconnect devices when omapdrm module is removed Archit Taneja
2013-10-09 13:56 ` [PATCH v2 0/2] drm: omap: Fix omapdrm probe and module insertion/removal issues Archit Taneja
2013-10-21 9:38 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=523C0BFE.5010409@ti.com \
--to=archit@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.