Skip to contentSkip to conversation

fbdev/simplefb: Add the N64's mode

PATCH New Lauri Kasanen 1 participant 1 message Jan 8, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 fbdev/simplefb: Add the N64's mode

By keeping it separate for the platform, we save 748 bytes. This brings simplefb to 2.5kb from 3.2kb, when a native fb driver was 1.5kb.

---
 include/linux/platform_data/simplefb.h | 7 +++++++
 1 file changed, 7 insertions(+)

No changes for this patch, just refreshing as part of the series.

include/linux/platform_data/simplefb.h +7 -0
index ca83376..c9d4f2c 100644
@@ -13,6 +13,12 @@
 #include <linux/types.h>
 
 /* format array, use it to initialize a "struct simplefb_format" array */
+#ifdef CONFIG_MACH_NINTENDO64
+#define SIMPLEFB_FORMATS \
+{ \
+	{ "r5g5b5a1", 16, {11, 5}, {6, 5}, {1, 5}, {0, 1}, DRM_FORMAT_RGBA5551 }, \
+}
+#else
 #define SIMPLEFB_FORMATS \
 { \
 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \
@@ -25,6 +31,7 @@
 	{ "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \
 	{ "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \
 }
+#endif
 
 /*
  * Data-Format for Simple-Framebuffers

--
2.6.2