aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_connector.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-07 23:08:35 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-03-18 11:42:14 +0200
commit30b71761957c541cd9dfd6cd10e3feb21a8ddca1 (patch)
treef4f836e13195c5e982035a6ae64218f9e8e482de /drivers/gpu/drm/omapdrm/omap_connector.c
parentdrm/omap: Add support for drm_bridge (diff)
downloadlinux-dev-30b71761957c541cd9dfd6cd10e3feb21a8ddca1.tar.xz
linux-dev-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/omap_connector.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index f711a267e2b6..5967283934e1 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -17,6 +17,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
+#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
#include "omap_drv.h"
@@ -211,6 +212,7 @@ no_edid:
static int omap_connector_get_modes(struct drm_connector *connector)
{
+ struct omap_connector *omap_connector = to_omap_connector(connector);
struct omap_dss_device *dssdev;
DBG("%s", connector->name);
@@ -234,6 +236,13 @@ static int omap_connector_get_modes(struct drm_connector *connector)
return dssdev->ops->get_modes(dssdev, connector);
/*
+ * Otherwise if the display pipeline uses a drm_panel, we delegate the
+ * operation to the panel API.
+ */
+ if (omap_connector->output->panel)
+ return drm_panel_get_modes(omap_connector->output->panel);
+
+ /*
* We can't retrieve modes, which can happen for instance for a DVI or
* VGA output with the DDC bus unconnected. The KMS core will add the
* default modes.