drm/omap: Filter displays mode based on bandwidth limit
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 30 Nov 2017 12:12:37 +0000 (14:12 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 19 Dec 2017 08:32:00 +0000 (10:32 +0200)
commita7631c4b9846a433c06422c6cc64a8a5025071a2
tree087a97ad01bba924654ababf81dea02302d521da
parent867d7e0212170a24f0889e940a5b05ee34551e27
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>
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_drv.h