| From 3974f00104e399e91a0ab0f4b0f5e26e1f5e2ff9 Mon Sep 17 00:00:00 2001 |
| From: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
| Date: Fri, 31 Oct 2014 15:06:38 +1100 |
| Subject: [PATCH 03/17] drm/ast: Default to 8bpp on big endian |
| |
| This chip is LE only (some versions support HW swappers but not |
| the latest and the driver doesn't anyway). |
| |
| I tried using the "foreign endian" fb flag but it appears to be |
| busted, so instead, default to endian-neutral 8bpp for BE. |
| |
| Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
| Signed-off-by: Joel Stanley <joel@jms.id.au> |
| --- |
| drivers/gpu/drm/ast/ast_fb.c | 13 +++++++++++++ |
| 1 file changed, 13 insertions(+) |
| |
| diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c |
| index ff68eef..c532c69 100644 |
| --- a/drivers/gpu/drm/ast/ast_fb.c |
| +++ b/drivers/gpu/drm/ast/ast_fb.c |
| @@ -345,7 +345,20 @@ int ast_fbdev_init(struct drm_device *dev) |
| /* disable all the possible outputs/crtcs before entering KMS mode */ |
| drm_helper_disable_unused_functions(dev); |
| |
| + /* |
| + * This chip is LE only (some versions support HW swappers but not |
| + * the latest and the driver doesn't anyway). |
| + * |
| + * I tried using the "foreign endian" fb flag but it appears to be |
| + * busted, so instead, default to endian-neutral 8bpp for BE. |
| + * |
| + * (and it's faster !) |
| + */ |
| +#if defined(__BIG_ENDIAN) |
| + ret = drm_fb_helper_initial_config(&afbdev->helper, 8); |
| +#else |
| ret = drm_fb_helper_initial_config(&afbdev->helper, 32); |
| +#endif |
| if (ret) |
| goto fini; |
| |
| -- |
| 2.5.0 |
| |