aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-03-02 04:09:47 -0500
committerLinus Walleij <linus.walleij@linaro.org>2018-03-07 16:48:08 -0500
commit20a0dfeead0512af1d194ebaa8b0abe05323bbdb (patch)
tree53e4e8d01a4b2359b2999376c0f896820026df09
parent9f8d4fe94eb4fb958fc92ee91a3ec54ab378339c (diff)
drm/pl111: Handle the RealView variant separately
We want to cut down the default bpp to 16 on the RealView so we can have a 1024x768 framebuffer console by default. The memory bandwidth limitations makes this not work with the PL111 default of 32bpp. This builds on top of the earlier patches making the framebuffer default bpp a per-variant variable. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180302090948.6399-4-linus.walleij@linaro.org
-rw-r--r--drivers/gpu/drm/pl111/pl111_versatile.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c
index 2c6fc50b0c12..9302f516045e 100644
--- a/drivers/gpu/drm/pl111/pl111_versatile.c
+++ b/drivers/gpu/drm/pl111/pl111_versatile.c
@@ -230,6 +230,23 @@ static const u32 pl110_versatile_pixel_formats[] = {
230 DRM_FORMAT_XRGB1555, 230 DRM_FORMAT_XRGB1555,
231}; 231};
232 232
233static const u32 pl111_realview_pixel_formats[] = {
234 DRM_FORMAT_ABGR8888,
235 DRM_FORMAT_XBGR8888,
236 DRM_FORMAT_ARGB8888,
237 DRM_FORMAT_XRGB8888,
238 DRM_FORMAT_BGR565,
239 DRM_FORMAT_RGB565,
240 DRM_FORMAT_ABGR1555,
241 DRM_FORMAT_XBGR1555,
242 DRM_FORMAT_ARGB1555,
243 DRM_FORMAT_XRGB1555,
244 DRM_FORMAT_ABGR4444,
245 DRM_FORMAT_XBGR4444,
246 DRM_FORMAT_ARGB4444,
247 DRM_FORMAT_XRGB4444,
248};
249
233/* 250/*
234 * The Integrator variant is a PL110 with a bunch of broken, or not 251 * The Integrator variant is a PL110 with a bunch of broken, or not
235 * yet implemented features 252 * yet implemented features
@@ -257,6 +274,18 @@ static const struct pl111_variant_data pl110_versatile = {
257 .fb_bpp = 16, 274 .fb_bpp = 16,
258}; 275};
259 276
277/*
278 * RealView PL111 variant, the only real difference from the vanilla
279 * PL111 is that we select 16bpp framebuffer by default to be able
280 * to get 1024x768 without saturating the memory bus.
281 */
282static const struct pl111_variant_data pl111_realview = {
283 .name = "PL111 RealView",
284 .formats = pl111_realview_pixel_formats,
285 .nformats = ARRAY_SIZE(pl111_realview_pixel_formats),
286 .fb_bpp = 16,
287};
288
260int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) 289int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv)
261{ 290{
262 const struct of_device_id *clcd_id; 291 const struct of_device_id *clcd_id;
@@ -306,6 +335,7 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv)
306 case REALVIEW_CLCD_PBA8: 335 case REALVIEW_CLCD_PBA8:
307 case REALVIEW_CLCD_PBX: 336 case REALVIEW_CLCD_PBX:
308 versatile_syscon_map = map; 337 versatile_syscon_map = map;
338 priv->variant = &pl111_realview;
309 priv->variant_display_enable = pl111_realview_clcd_enable; 339 priv->variant_display_enable = pl111_realview_clcd_enable;
310 priv->variant_display_disable = pl111_realview_clcd_disable; 340 priv->variant_display_disable = pl111_realview_clcd_disable;
311 dev_info(dev, "set up callbacks for RealView PL111\n"); 341 dev_info(dev, "set up callbacks for RealView PL111\n");