From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/omap: ensure all displays have been probed
Date: Sun, 13 Dec 2015 22:30:43 +0200 [thread overview]
Message-ID: <55772991.Fz4XTGrJkY@avalon> (raw)
In-Reply-To: <1449675491-9184-2-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
Thank you for the patch.
On Wednesday 09 December 2015 17:38:05 Tomi Valkeinen wrote:
> DRM offers no ways to add new displays after the DRM driver has been
> loaded. This causes issues on boards that have multiple displays, and
> omapdrm is loaded when some of them are loaded but not all. The result
> is that omapdrm starts with the displays that were loaded at that time,
> ignoring the displays loaded later.
>
> This patch changes the behavior so that omapdrm ensures all display are
> loaded which have an alias in the .dts file.
>
> The downside is that this prevents omapdrm from loading if, say, the
> user has not compiled a kernel module for one of the displays, or
> there's some kind of failure in one of the displays. Thus, after this
> patch, all the displays have to work, or none does.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/gpu/drm/omapdrm/omap_drv.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> b/drivers/gpu/drm/omapdrm/omap_drv.c index 5c6609cbb6a2..c93c13e2c22d
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -242,11 +242,38 @@ static void omap_disconnect_dssdevs(void)
> dssdev->driver->disconnect(dssdev);
> }
>
> +static bool dssdev_with_alias_exists(const char *alias)
> +{
> + struct omap_dss_device *dssdev = NULL;
> +
> + for_each_dss_dev(dssdev) {
> + if (strcmp(alias, dssdev->alias) == 0) {
> + omap_dss_put_device(dssdev);
> + return true;
> + }
> + }
> +
> + return false;
> +}
> +
> static int omap_connect_dssdevs(void)
> {
> int r;
> struct omap_dss_device *dssdev = NULL;
> bool no_displays = true;
> + struct device_node *aliases;
> + struct property *pp;
> +
> + aliases = of_find_node_by_path("/aliases");
> + if (aliases) {
> + for_each_property_of_node(aliases, pp) {
> + if (strncmp(pp->name, "display", 7) != 0)
> + continue;
> +
> + if (dssdev_with_alias_exists(pp->name) == false)
> + return -EPROBE_DEFER;
> + }
> + }
The DSS bindings document the aliases as optional, so this won't work in the
general case. The best solution would be to travel the display graph through
the ports and use the components framework, but that would be more complex to
implement.
>
> for_each_dss_dev(dssdev) {
> r = dssdev->driver->connect(dssdev);
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-14 1:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 15:38 [PATCH 0/7] drm/omap: misc patches Tomi Valkeinen
2015-12-09 15:38 ` [PATCH 1/7] drm/omap: ensure all displays have been probed Tomi Valkeinen
2015-12-13 20:30 ` Laurent Pinchart [this message]
2015-12-16 15:45 ` Tomi Valkeinen
2015-12-09 15:38 ` [PATCH 2/7] drm/omap: remove extra drm_gem_free_mmap_offset() call Tomi Valkeinen
2015-12-13 20:33 ` Laurent Pinchart
2015-12-09 15:38 ` [PATCH 3/7] drm/omap: Use bitmaps for TILER placement Tomi Valkeinen
2015-12-09 15:38 ` [PATCH 4/7] drm/omap: remove unused plugin defines Tomi Valkeinen
2015-12-13 20:34 ` Laurent Pinchart
2015-12-09 15:38 ` [PATCH 5/7] drm/omap: set DRIVER_ATOMIC for omapdrm Tomi Valkeinen
2015-12-13 20:34 ` Laurent Pinchart
2015-12-09 15:38 ` [PATCH 6/7] drm/omap: remove obsolete manager assignment Tomi Valkeinen
2015-12-09 15:38 ` [PATCH 7/7] drm/omap: fix fbdev pix format to support all platforms Tomi Valkeinen
2015-12-13 20:35 ` Laurent Pinchart
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=55772991.Fz4XTGrJkY@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--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.