diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-12-07 23:08:35 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-03-18 11:42:14 +0200 |
commit | 30b71761957c541cd9dfd6cd10e3feb21a8ddca1 (patch) | |
tree | f4f836e13195c5e982035a6ae64218f9e8e482de /drivers/gpu/drm/omapdrm/dss/base.c | |
parent | 79107f274b2fc6bce13f687de33c8d0b70994558 (diff) | |
download | linux-30b71761957c541cd9dfd6cd10e3feb21a8ddca1.tar.gz linux-30b71761957c541cd9dfd6cd10e3feb21a8ddca1.tar.bz2 linux-30b71761957c541cd9dfd6cd10e3feb21a8ddca1.zip |
drm/omap: Add support for drm_panel
Hook up drm_panel support in the omapdrm driver. The change is
relatively simply as the way has been paved by drm_bridge support
already. In addition to looking up, attaching to and detaching from the
panel, we only need to add panel support in the connector .get_modes()
handler, take connector bus flags (set by the panel) into account, and
enable/disable the panel in the encoder enable/disable operations
handlers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/base.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c index 09c9f2971aa2..3c088cd2ceab 100644 --- a/drivers/gpu/drm/omapdrm/dss/base.c +++ b/drivers/gpu/drm/omapdrm/dss/base.c @@ -157,7 +157,8 @@ struct omap_dss_device *omapdss_device_next_output(struct omap_dss_device *from) goto done; } - if (dssdev->id && (dssdev->next || dssdev->bridge)) + if (dssdev->id && + (dssdev->next || dssdev->bridge || dssdev->panel)) goto done; } @@ -192,10 +193,11 @@ int omapdss_device_connect(struct dss_device *dss, if (!dst) { /* * The destination is NULL when the source is connected to a - * bridge instead of a DSS device. Stop here, we will attach the - * bridge later when we will have a DRM encoder. + * bridge or panel instead of a DSS device. Stop here, we will + * attach the bridge or panel later when we will have a DRM + * encoder. */ - return src && src->bridge ? 0 : -EINVAL; + return src && (src->bridge || src->panel) ? 0 : -EINVAL; } if (omapdss_device_is_connected(dst)) @@ -223,7 +225,7 @@ void omapdss_device_disconnect(struct omap_dss_device *src, dst ? dev_name(dst->dev) : "NULL"); if (!dst) { - WARN_ON(!src->bridge); + WARN_ON(!src->bridge && !src->panel); return; } |