aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/pl111/pl111_drv.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-03-07 22:58:19 +0100
committerLinus Walleij <linus.walleij@linaro.org>2018-03-07 23:14:24 +0100
commitdf99dd9202216f54eaf672e07808e9198d868af6 (patch)
treeee75d257bc640dec1ff405deca483e83b63216e2 /drivers/gpu/drm/pl111/pl111_drv.c
parentdrm/bridge: sii902x: Retry status read after DDI I2C (diff)
downloadlinux-dev-df99dd9202216f54eaf672e07808e9198d868af6.tar.xz
linux-dev-df99dd9202216f54eaf672e07808e9198d868af6.zip
drm/pl111: Use max memory bandwidth for resolution
We were previously selecting 1024x768 and 32BPP as the default set-up for the PL111 consumers. This does not work on elder systems: the device tree bindings support a property "max-memory-bandwidth" in bytes/second that states that if you exceed this the memory bus will saturate. The result is flickering and unstable images. Parse the "max-memory-bandwidth" and respect it when intializing the driver. On the RealView PB11MP, Versatile and Integrator/CP we get a nice console as default with this code. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180307215819.15814-1-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drv.c')
-rw-r--r--drivers/gpu/drm/pl111/pl111_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index e92a406c9ea9..4621259d5387 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -257,6 +257,12 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
drm->dev_private = priv;
priv->variant = variant;
+ if (of_property_read_u32(dev->of_node, "max-memory-bandwidth",
+ &priv->memory_bw)) {
+ dev_info(dev, "no max memory bandwidth specified, assume unlimited\n");
+ priv->memory_bw = 0;
+ }
+
/* The two variants swap this register */
if (variant->is_pl110) {
priv->ienb = CLCD_PL110_IENB;