aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-11-30 07:12:37 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-12-19 03:32:00 -0500
commita7631c4b9846a433c06422c6cc64a8a5025071a2 (patch)
tree087a97ad01bba924654ababf81dea02302d521da /drivers/gpu/drm/omapdrm/omap_drv.c
parent867d7e0212170a24f0889e940a5b05ee34551e27 (diff)
drm/omap: Filter displays mode based on bandwidth limit
If we have memory bandwidth limit configured, reject the modes which would require more bandwidth than the limit if it is used with one full resolution plane (most common use case). This filtering is not providing full protection as it is possible that application would pick smaller crtc resolution with high resolution planes and down scaling, or can enable more smaller planes where the sum of their bandwidth need would be higher than the limit. This patch only allows us to filter out modes which would need more bandwidth if they were used with one full screen plane. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 96857c508ee0..c4bb261dfcd9 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -563,6 +563,11 @@ static int pdev_probe(struct platform_device *pdev)
563 ddev->dev_private = priv; 563 ddev->dev_private = priv;
564 platform_set_drvdata(pdev, ddev); 564 platform_set_drvdata(pdev, ddev);
565 565
566 /* Get memory bandwidth limits */
567 if (priv->dispc_ops->get_memory_bandwidth_limit)
568 priv->max_bandwidth =
569 priv->dispc_ops->get_memory_bandwidth_limit();
570
566 omap_gem_init(ddev); 571 omap_gem_init(ddev);
567 572
568 ret = omap_modeset_init(ddev); 573 ret = omap_modeset_init(ddev);