aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-06 10:49:37 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:30 -0400
commit35d944cbee2199312c6832a4acd0201a921545f4 (patch)
tree7fc1fee6cb7d2186bb07f4b1b6bab053b0174367 /drivers/gpu/drm/omapdrm/dss
parent28120302c2fdf29b515c8cbd4e3a3867cb0cde7d (diff)
drm/omap: Query timing information from analog TV encoder
Timings for the TV output are currently reported by the analog TV connector. This has the disadvantage of having to handle timing-related operations in a connector omap_dss_device that has, at the hardware level, no knowledge of any timing information. Implement the .get_timings() operation in the venc driver, and get timings from the first component in the pipeline that implements the operatation. This switches the duty of reporting analog TV timings from the connector to the encoder. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index 255bf2cd8afc..09ec8b0eafee 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -568,6 +568,16 @@ static void venc_display_disable(struct omap_dss_device *dssdev)
568 mutex_unlock(&venc->venc_lock); 568 mutex_unlock(&venc->venc_lock);
569} 569}
570 570
571static void venc_get_timings(struct omap_dss_device *dssdev,
572 struct videomode *vm)
573{
574 struct venc_device *venc = dssdev_to_venc(dssdev);
575
576 mutex_lock(&venc->venc_lock);
577 *vm = venc->vm;
578 mutex_unlock(&venc->venc_lock);
579}
580
571static void venc_set_timings(struct omap_dss_device *dssdev, 581static void venc_set_timings(struct omap_dss_device *dssdev,
572 const struct videomode *vm) 582 const struct videomode *vm)
573{ 583{
@@ -720,6 +730,7 @@ static const struct omap_dss_device_ops venc_ops = {
720 .disable = venc_display_disable, 730 .disable = venc_display_disable,
721 731
722 .check_timings = venc_check_timings, 732 .check_timings = venc_check_timings,
733 .get_timings = venc_get_timings,
723 .set_timings = venc_set_timings, 734 .set_timings = venc_set_timings,
724}; 735};
725 736
@@ -877,6 +888,7 @@ static int venc_probe(struct platform_device *pdev)
877 mutex_init(&venc->venc_lock); 888 mutex_init(&venc->venc_lock);
878 889
879 venc->wss_data = 0; 890 venc->wss_data = 0;
891 venc->vm = omap_dss_pal_vm;
880 892
881 venc_mem = platform_get_resource(venc->pdev, IORESOURCE_MEM, 0); 893 venc_mem = platform_get_resource(venc->pdev, IORESOURCE_MEM, 0);
882 venc->base = devm_ioremap_resource(&pdev->dev, venc_mem); 894 venc->base = devm_ioremap_resource(&pdev->dev, venc_mem);