MX5: Make IPU display output and pixel format configurable
Subsystems (2)
PATCH 1/1 MX5: Make IPU display output and pixel format configurable
--- drivers/video/mxc_ipuv3_fb.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/video/mxc_ipuv3_fb.c +12 -2
@@ -42,6 +42,16 @@DECLARE_GLOBAL_DATA_PTR ; +/* Use DISP #1 by default. */ +#ifndef CONFIG_VIDEO_MX5_OUTPUT +#define CONFIG_VIDEO_MX5_OUTPUT 0 +#endif + +/* Use RGB666 pixel format by default. */ +#ifndef CONFIG_VIDEO_MX5_PIXFMT +#define CONFIG_VIDEO_MX5_PIXFMT IPU_PIX_FMT_RGB666 +#endif +void *lcd_base;/* Start of framebuffer memory */ void *lcd_console_address;/* Start of console buffer */
@@ -550,7 +560,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode) mxcfbi->blank =FB_BLANK_POWERDOWN ; } - mxcfbi->ipu_di =0 ; + mxcfbi->ipu_di =CONFIG_VIDEO_MX5_OUTPUT ;ipu_disp_set_global_alpha (mxcfbi->ipu_ch,1 ,0x80 );ipu_disp_set_color_key (mxcfbi->ipu_ch,0 ,0 );
@@ -636,7 +646,7 @@ int mx51_fb_init(struct fb_videomode *mode) lcd_base +=56 ;debug ("Framebuffer at 0x%x\n" , (unsigned int )lcd_base); - ret =mxcfb_probe (IPU_PIX_FMT_RGB666 , mode); + ret =mxcfb_probe (CONFIG_VIDEO_MX5_PIXFMT , mode);return ret; }
Signature · 1 line
1.7.5.4
Fabio Estevam
reviewerPATCH 1/1 MX5: Make IPU display output and pixel format configurable
Hi Marek,
Quoted 11 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>---
?drivers/video/mxc_ipuv3_fb.c | ? 14 ++++++++++++-- ?1 files changed, 12 insertions(+), 2 deletions(-)drivers/video/mxc_ipuv3_fb.c +0
-0
drivers/video/mxc_ipuv3_fb.c line 48
Quoted 7 lines
drivers/video/mxc_ipuv3_fb.c +4
-0@@ -42,6 +42,16 @@ ?DECLARE_GLOBAL_DATA_PTR; +/* Use DISP #1 by default. */ +#ifndef ? ? ? ?CONFIG_VIDEO_MX5_OUTPUT +#define ? ? ? ?CONFIG_VIDEO_MX5_OUTPUT 0 +#endif
What about putting a define for selecting between IPU DI0 or DI1 in the board config file?
There are boards that have DI0 connected as the primary display, others may have DI1.
This way the mxc_ipuv3_fb.c driver could handle both cases depending on the board config.
Regards,
Fabio Estevam
PATCH 1/1 MX5: Make IPU display output and pixel format configurable
Quoted 25 lines · Fabio Estevam
Hi Marek,
Quoted 11 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- drivers/video/mxc_ipuv3_fb.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)drivers/video/mxc_ipuv3_fb.c +0
-0drivers/video/mxc_ipuv3_fb.c line 48
Quoted 7 lines
drivers/video/mxc_ipuv3_fb.c +4
-0@@ -42,6 +42,16 @@DECLARE_GLOBAL_DATA_PTR ; +/* Use DISP #1 by default. */ +#ifndef CONFIG_VIDEO_MX5_OUTPUT +#define CONFIG_VIDEO_MX5_OUTPUT 0 +#endif What about putting a define for selecting between IPU DI0 or DI1 in the board config file?
Quoted 5 lines
There are boards that have DI0 connected as the primary display, others may have DI1.
This way the
mxc_ipuv3_fb.cdriver could handle both cases depending on the board config.
Sure, this is a default value for boards which just use the default (most common case). You can define CONFIG... in your board config file and change this.
Quoted 4 lines
Regards,
Fabio Estevam
PATCH 1/1 MX5: Make IPU display output and pixel format configurable
In reply to Marek VasutQuoted 37 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- drivers/video/mxc_ipuv3_fb.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)drivers/video/mxc_ipuv3_fb.c +11
-1@@ -42,6 +42,16 @@DECLARE_GLOBAL_DATA_PTR ; +/* Use DISP #1 by default. */ +#ifndef CONFIG_VIDEO_MX5_OUTPUT +#define CONFIG_VIDEO_MX5_OUTPUT 0 +#endif + +/* Use RGB666 pixel format by default. */ +#ifndef CONFIG_VIDEO_MX5_PIXFMT +#define CONFIG_VIDEO_MX5_PIXFMT IPU_PIX_FMT_RGB666 +#endif +void *lcd_base;/* Start of framebuffer memory */ void *lcd_console_address;/* Start of console buffer */ @@ -550,7 +560,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode) mxcfbi->blank =FB_BLANK_POWERDOWN ; } - mxcfbi->ipu_di =0 ; + mxcfbi->ipu_di =CONFIG_VIDEO_MX5_OUTPUT ;ipu_disp_set_global_alpha (mxcfbi->ipu_ch,1 ,0x80 );ipu_disp_set_color_key (mxcfbi->ipu_ch,0 ,0 );
drivers/video/mxc_ipuv3_fb.c int mx51_fb_init(struct fb_videomode *mode) · line 650
Quoted 6 lines
drivers/video/mxc_ipuv3_fb.c +1
-1@@ -636,7 +646,7 @@ int mx51_fb_init(struct fb_videomode *mode) lcd_base +=56 ;debug ("Framebuffer at 0x%x\n" , (unsigned int )lcd_base); - ret =mxcfb_probe (IPU_PIX_FMT_RGB666 , mode); + ret =mxcfb_probe (CONFIG_VIDEO_MX5_PIXFMT , mode);
What about to not use a CONFIG_ ? at the moment, the board code calls mx51_fb_init() to initialize the display parameter. We can add a second parameter (display_id) to the initialization and the board code is responsible to do that. And it is not required to recompile u-boot if the board as the mx51evk more as one display has or can have.
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-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
In reply to Marek Vasut--- board/ttcontrol/vision2/vision2.c | 6 ++++-- drivers/video/mxc_ipuv3_fb.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-)
V2: Configure the LCD via mx51_fb_init
board/ttcontrol/vision2/vision2.c +4 -2
@@ -39,11 +39,13 @@#include <mc13892.h> #include <linux/fb.h> +#include <../drivers/video/ipu.h> +DECLARE_GLOBAL_DATA_PTR ;static u32 system_rev; -extern int mx51_fb_init (struct fb_videomode *mode); +extern int mx51_fb_init (struct fb_videomode *,uint8_t ,uint32_t );static struct fb_videomode nec_nl6448bc26_09c = {"NEC_NL6448BC26-09C" ,
@@ -646,7 +648,7 @@ void lcd_enable(void)gpio_set_value (2 ,1 );mxc_request_iomux (MX51_PIN_GPIO1_2 ,IOMUX_CONFIG_ALT0 ); - ret =mx51_fb_init (&nec_nl6448bc26_09c); + ret =mx51_fb_init (&nec_nl6448bc26_09c,0 ,IPU_PIX_FMT_RGB666 );if (ret)puts ("LCD cannot be configured\n" ); }
drivers/video/mxc_ipuv3_fb.c +5 -4
@@ -526,7 +526,8 @@ 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,struct fb_videomode *mode) +static int mxcfb_probe (u32 interface_pix_fmt,uint8_t disp, +struct fb_videomode *mode) {struct fb_info *fbi;struct mxcfb_info *mxcfbi;
@@ -550,7 +551,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode) mxcfbi->blank =FB_BLANK_POWERDOWN ; } - mxcfbi->ipu_di =0 ; + mxcfbi->ipu_di = disp;ipu_disp_set_global_alpha (mxcfbi->ipu_ch,1 ,0x80 );ipu_disp_set_color_key (mxcfbi->ipu_ch,0 ,0 );
@@ -625,7 +626,7 @@ void lcd_ctrl_init(void *lcdbase)memset (lcdbase,0 , mem_len); } -int mx51_fb_init (struct fb_videomode *mode) +int mx51_fb_init (struct fb_videomode *mode,uint8_t disp,uint32_t pixfmt) {int ret;
@@ -636,7 +637,7 @@ int mx51_fb_init(struct fb_videomode *mode) lcd_base +=56 ;debug ("Framebuffer at 0x%x\n" , (unsigned int )lcd_base); - ret =mxcfb_probe (IPU_PIX_FMT_RGB666 , mode); + ret =mxcfb_probe (pixfmt, disp, mode);return ret; }
Signature · 1 line
1.7.5.4
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
Quoted 8 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- board/ttcontrol/vision2/vision2.c | 6 ++++-- drivers/video/mxc_ipuv3_fb.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-)V2: Configure the LCD via
mx51_fb_init
You missed to send your patch to Anatolij (video maintainer), too.
Quoted 62 lines
board/ttcontrol/vision2/vision2.c +4
-2@@ -39,11 +39,13 @@#include <mc13892.h> #include <linux/fb.h> +#include <../drivers/video/ipu.h> +DECLARE_GLOBAL_DATA_PTR ;static u32 system_rev; -extern int mx51_fb_init (struct fb_videomode *mode); +extern int mx51_fb_init (struct fb_videomode *,uint8_t ,uint32_t );static struct fb_videomode nec_nl6448bc26_09c = {"NEC_NL6448BC26-09C" ,@@ -646,7 +648,7 @@ void lcd_enable(void)gpio_set_value (2 ,1 );mxc_request_iomux (MX51_PIN_GPIO1_2 ,IOMUX_CONFIG_ALT0 ); - ret =mx51_fb_init (&nec_nl6448bc26_09c); + ret =mx51_fb_init (&nec_nl6448bc26_09c,0 ,IPU_PIX_FMT_RGB666 );if (ret)puts ("LCD cannot be configured\n" ); }drivers/video/mxc_ipuv3_fb.c +4
-3@@ -526,7 +526,8 @@ 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,struct fb_videomode *mode) +static int mxcfb_probe (u32 interface_pix_fmt,uint8_t disp, +struct fb_videomode *mode) {struct fb_info *fbi;struct mxcfb_info *mxcfbi;@@ -550,7 +551,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode) mxcfbi->blank =FB_BLANK_POWERDOWN ; } - mxcfbi->ipu_di =0 ; + mxcfbi->ipu_di = disp;ipu_disp_set_global_alpha (mxcfbi->ipu_ch,1 ,0x80 );ipu_disp_set_color_key (mxcfbi->ipu_ch,0 ,0 );@@ -625,7 +626,7 @@ void lcd_ctrl_init(void *lcdbase)memset (lcdbase,0 , mem_len); } -int mx51_fb_init (struct fb_videomode *mode) +int mx51_fb_init (struct fb_videomode *mode,uint8_t disp,uint32_t pixfmt) {int ret;
drivers/video/mxc_ipuv3_fb.c int mx51_fb_init(struct fb_videomode *mode) · line 643
Quoted 8 lines
drivers/video/mxc_ipuv3_fb.c +1
-1@@ -636,7 +637,7 @@ int mx51_fb_init(struct fb_videomode *mode) lcd_base +=56 ;debug ("Framebuffer at 0x%x\n" , (unsigned int )lcd_base); - ret =mxcfb_probe (IPU_PIX_FMT_RGB666 , mode); + ret =mxcfb_probe (pixfmt, disp, mode);return ret; }
Agree with your changes- only they can conflict with the patch I submitted recently to switch to CONFIG_VIDEO, see
http://patchwork.ozlabs.org/patch/116380/
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-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
Quoted 5 lines · Stefano Babic
Quoted 4 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>---
Quoted 7 lines
Quoted 5 lines
board/ttcontrol/vision2/vision2.c | 6 ++++-- drivers/video/mxc_ipuv3_fb.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-)V2: Configure the LCD via
mx51_fb_initYou missed to send your patch to Anatolij (video maintainer), too.
Shall I resend or is it fine as it is ?
[...]
Quoted 3 lines
Agree with your changes- only they can conflict with the patch I submitted recently to switch to
CONFIG_VIDEO, see
Can you possibly put this patch prior to your change and then rebase on top of it ?
Cheers
Quoted 5 lines
http://patchwork.ozlabs.org/patch/116380/
Best regards,
Stefano Babic
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
Quoted 7 lines · Marek Vasut
Quoted 3 lines
Agree with your changes- only they can conflict with the patch I submitted recently to switch to
CONFIG_VIDEO, seeCan you possibly put this patch prior to your change and then rebase on top of it ?
I can do it
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-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
Quoted 8 lines · Stefano Babic
Quoted 5 lines · Marek Vasut
Quoted 2 lines
Agree with your changes- only they can conflict with the patch I submitted recently to switch to
CONFIG_VIDEO, seeCan you possibly put this patch prior to your change and then rebase on top of it ?
I can do it
Thanks!
Cheers
PATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
In reply to Marek VasutDear Marek Vasut,
Quoted 8 lines · In message <[email protected]> you wrote:
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- board/ttcontrol/vision2/vision2.c | 6 ++++-- drivers/video/mxc_ipuv3_fb.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-)V2: Configure the LCD via
mx51_fb_init
Checkpatch says:
total: 0 errors, 1 warnings, 55 lines checked
Please clean up and resubmit. Thanks.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A committee is a group that keeps the minutes and loses hours.
-- Milton BerlePATCH v2 1/1 MX5: Make IPU display output and pixel format configurable
Hi Wolfgang, Marek,
Quoted 10 lines · On Thu, 06 Oct 2011 23:20:33 +0200 Wolfgang Denk <[email protected]> wrote:
Dear Marek Vasut,
Quoted 7 lines · In message <[email protected]> you wrote:
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>--- board/ttcontrol/vision2/vision2.c | 6 ++++-- drivers/video/mxc_ipuv3_fb.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-)
Quoted 7 lines
Quoted 1 line
V2: Configure the LCD via
mx51_fb_initCheckpatch says:
total: 0 errors, 1 warnings, 55 lines checked
Please clean up and resubmit. Thanks.
No, there is no need to resubmit this patch. Stefano resubmitted it as part of another patch set and a cleaned up patch version was already applied.
Thanks,
Anatolij