summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/venc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-09-13 00:17:01 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-03-18 11:42:12 +0200
commit870e19d59f8a2e13750861d8f8f49e93188634ec (patch)
treef7729f94cc9ca45f2a4c2797c7ddadc651a44a53 /drivers/gpu/drm/omapdrm/dss/venc.c
parentd17eb4537a7eb16da9eafbfd5717e12b45b77251 (diff)
drm/omap: Expose DRM modes instead of timings in display devices
omap_dss_device operations expose fixed video timings through a .get_timings() operation that return a single timing for the device. To prepare for the move to drm_bridge, modify the API to instead add DRM modes directly to the connector. As this puts more burden on display devices, we also create a helper function for panels to add a single DRM mode from the panel video timings. 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/venc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index 3fc776c45c4f..cefefe6d6fcb 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -548,14 +548,17 @@ static void venc_display_disable(struct omap_dss_device *dssdev)
mutex_unlock(&venc->venc_lock);
}
-static void venc_get_timings(struct omap_dss_device *dssdev,
- struct videomode *vm)
+static int venc_get_modes(struct omap_dss_device *dssdev,
+ struct drm_connector *connector)
{
struct venc_device *venc = dssdev_to_venc(dssdev);
+ int r;
mutex_lock(&venc->venc_lock);
- *vm = venc->vm;
+ r = omapdss_display_get_modes(connector, &venc->vm);
mutex_unlock(&venc->venc_lock);
+
+ return r;
}
static void venc_set_timings(struct omap_dss_device *dssdev,
@@ -690,8 +693,9 @@ static const struct omap_dss_device_ops venc_ops = {
.disable = venc_display_disable,
.check_timings = venc_check_timings,
- .get_timings = venc_get_timings,
.set_timings = venc_set_timings,
+
+ .get_modes = venc_get_modes,
};
/* -----------------------------------------------------------------------------