Skip to contentSkip to conversation

i.MX: Allow const video mode specifiers

PATCH New Eric Nelson 2 participants 5 messages Oct 3, 2012 – Oct 10, 2012

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

cover i.MX: Allow const video mode specifiers

This will keep static video initializers in the text segment.

#1 lore raw

PATCH 1/2 i.MX video: struct fb_videomode can be const

---
 drivers/video/mxc_ipuv3_fb.c |    8 +++++---
 include/ipu_pixfmt.h         |    4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/video/mxc_ipuv3_fb.c +5 -3
index 47b336e..ace226c 100644
@@ -45,7 +45,7 @@ static int mxcfb_unmap_video_memory(struct fb_info *fbi);
 
 /* graphics setup */
 static GraphicDevice panel;
-static struct fb_videomode *gmode;
+static struct fb_videomode const *gmode;
 static uint8_t gdisp;
 static uint32_t gpixfmt;
 
@@ -503,7 +503,7 @@ static struct fb_info *mxcfb_init_fbinfo(void)
  * @return      Appropriate error code to the kernel common code
  */
 static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,
-			struct fb_videomode *mode)
+			struct fb_videomode const *mode)
 {
 	struct fb_info *fbi;
 	struct mxcfb_info *mxcfbi;
@@ -619,7 +619,9 @@ void video_set_lut(unsigned int index, /* color number */
 	return;
 }
 
-int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt)
+int ipuv3_fb_init(struct fb_videomode const *mode,
+		  uint8_t disp,
+		  uint32_t pixfmt)
 {
 	gmode = mode;
 	gdisp = disp;
include/ipu_pixfmt.h +3 -1
index 4baa711..1163bf4 100644
@@ -76,7 +76,9 @@
 #define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6')	/*< 16 YVU 4:2:2 */
 #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P')	/*< 16 YUV 4:2:2 */
 
-int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
+int ipuv3_fb_init(struct fb_videomode const *mode,
+		  uint8_t disp,
+		  uint32_t pixfmt);
 void ipuv3_fb_shutdown(void);
 
 #endif
Signature · 1 line
1.7.9
#2 lore raw

PATCH 1/2 i.MX video: struct fb_videomode can be const

Quoted 6 lines · Eric Nelson
---
 drivers/video/mxc_ipuv3_fb.c |    8 +++++---
 include/ipu_pixfmt.h         |    4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

Applied to u-boot-imx, next branch, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 2/2 i.MX: ipufb: add const to fb_videomode declarations

In reply to Eric Nelson
---
 board/freescale/mx51evk/mx51evk.c   |    2 +-
 board/freescale/mx53loco/mx53loco.c |    2 +-
 board/ttcontrol/vision2/vision2.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx51evk/mx51evk.c +1 -1
index a94701c..3c4f814 100644
@@ -467,7 +467,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-static struct fb_videomode claa_wvga = {
+static struct fb_videomode const claa_wvga = {
 	.name		= "CLAA07LC0ACW",
 	.refresh	= 57,
 	.xres		= 800,
board/freescale/mx53loco/mx53loco.c +1 -1
index 6543209..6fcaa0b 100644
@@ -409,7 +409,7 @@ static void clock_1GHz(void)
 		printf("CPU:   Switch DDR clock to 400MHz failed\n");
 }
 
-static struct fb_videomode claa_wvga = {
+static struct fb_videomode const claa_wvga = {
 	.name		= "CLAA07LC0ACW",
 	.refresh	= 57,
 	.xres		= 800,
board/ttcontrol/vision2/vision2.c +1 -1
index f28eab0..82aa4da 100644
@@ -43,7 +43,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static struct fb_videomode nec_nl6448bc26_09c = {
+static struct fb_videomode const nec_nl6448bc26_09c = {
 	"NEC_NL6448BC26-09C",
 	60,	/* Refresh */
 	640,	/* xres */
Signature · 1 line
1.7.9
#4 lore raw

PATCH 2/2 i.MX: ipufb: add const to fb_videomode declarations

Quoted 7 lines · Eric Nelson
---
 board/freescale/mx51evk/mx51evk.c   |    2 +-
 board/freescale/mx53loco/mx53loco.c |    2 +-
 board/ttcontrol/vision2/vision2.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-imx, next branch, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================