* [PATCH] video imx-ipu-fb: add clear screen
@ 2012-09-07 10:46 Alex Gershgorin
2012-09-07 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-10 7:36 ` Sascha Hauer
0 siblings, 2 replies; 6+ messages in thread
From: Alex Gershgorin @ 2012-09-07 10:46 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, Alex Gershgorin
This patch clear screen before usage
Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
drivers/video/imx-ipu-fb.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
index 8039de0..d46cced 100644
--- a/drivers/video/imx-ipu-fb.c
+++ b/drivers/video/imx-ipu-fb.c
@@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
(info->bits_per_pixel >> 3));
if (!fbi->info.screen_base)
return -ENOMEM;
+
+ /* Clear the screen */
+ memset((char *)fbi->info.screen_base, 0,
+ info->xres * info->yres * (info->bits_per_pixel >> 3));
}
sdc_enable_channel(fbi, info->screen_base, IDMAC_SDC_0);
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] video imx-ipu-fb: add clear screen
2012-09-07 10:46 [PATCH] video imx-ipu-fb: add clear screen Alex Gershgorin
@ 2012-09-07 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-10 7:36 ` Sascha Hauer
1 sibling, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-07 12:11 UTC (permalink / raw)
To: Alex Gershgorin; +Cc: barebox, Alex Gershgorin
On 13:46 Fri 07 Sep , Alex Gershgorin wrote:
> This patch clear screen before usage
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
> drivers/video/imx-ipu-fb.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
> index 8039de0..d46cced 100644
> --- a/drivers/video/imx-ipu-fb.c
> +++ b/drivers/video/imx-ipu-fb.c
> @@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
> (info->bits_per_pixel >> 3));
> if (!fbi->info.screen_base)
> return -ENOMEM;
> +
> + /* Clear the screen */
> + memset((char *)fbi->info.screen_base, 0,
> + info->xres * info->yres * (info->bits_per_pixel >> 3));
no do not so
wait a few and use the splash command ot specify a background
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] video imx-ipu-fb: add clear screen
2012-09-07 10:46 [PATCH] video imx-ipu-fb: add clear screen Alex Gershgorin
2012-09-07 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-10 7:36 ` Sascha Hauer
2012-09-10 10:16 ` Alex Gershgorin
1 sibling, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-09-10 7:36 UTC (permalink / raw)
To: Alex Gershgorin; +Cc: barebox, Alex Gershgorin
On Fri, Sep 07, 2012 at 01:46:39PM +0300, Alex Gershgorin wrote:
> This patch clear screen before usage
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
> drivers/video/imx-ipu-fb.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
> index 8039de0..d46cced 100644
> --- a/drivers/video/imx-ipu-fb.c
> +++ b/drivers/video/imx-ipu-fb.c
> @@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
> (info->bits_per_pixel >> 3));
> if (!fbi->info.screen_base)
> return -ENOMEM;
> +
> + /* Clear the screen */
> + memset((char *)fbi->info.screen_base, 0,
> + info->xres * info->yres * (info->bits_per_pixel >> 3));
Not clearing the screen is intentional. Normally the fb drivers do not
enable the framebuffer until explicitely requested via fb0.enable=1. The
environment normally is supposed to set a picture on the screen and
enable it afterwards.
That said, we can clear the screen as with MMU enabled this probably
does not take long time. But then it should be done in the fb core.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] video imx-ipu-fb: add clear screen
2012-09-10 7:36 ` Sascha Hauer
@ 2012-09-10 10:16 ` Alex Gershgorin
2012-09-11 7:44 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Alex Gershgorin @ 2012-09-10 10:16 UTC (permalink / raw)
To: Sascha Hauer, Alex Gershgorin; +Cc: barebox
Hi Sascha,
On Fri, Sep 07, 2012 at 01:46:39PM +0300, Alex Gershgorin wrote:
> This patch clear screen before usage
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
> drivers/video/imx-ipu-fb.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
> index 8039de0..d46cced 100644
> --- a/drivers/video/imx-ipu-fb.c
> +++ b/drivers/video/imx-ipu-fb.c
> @@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
> (info->bits_per_pixel >> 3));
> if (!fbi->info.screen_base)
> return -ENOMEM;
> +
> + /* Clear the screen */
> + memset((char *)fbi->info.screen_base, 0,
> + info->xres * info->yres * (info->bits_per_pixel >> 3));
> > Not clearing the screen is intentional. Normally the fb drivers do not
> > enable the framebuffer until explicitely requested via fb0.enable=1. The
> > environment normally is supposed to set a picture on the screen and
> > enable it afterwards.
> > That said, we can clear the screen as with MMU enabled this probably
> > does not take long time. But then it should be done in the fb core.
Thanks for your explanation.
In my case, I displayed picture on the screen, of course as you said I added to "init" script
fb0.enable = 1
bmp / env / logo.bmp
it was easy.
The problem is that I have a screen with resolution 800x600, but picture that I displayed on the my screen is much smaller,
resulting in a picture is displayed fine, but on the sides I get garbage.
This patch fixes this issue, of course it is not the only way to solve this issue.
Regards,
Alex
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] video imx-ipu-fb: add clear screen
2012-09-10 10:16 ` Alex Gershgorin
@ 2012-09-11 7:44 ` Sascha Hauer
2012-09-11 10:14 ` Alex Gershgorin
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-09-11 7:44 UTC (permalink / raw)
To: Alex Gershgorin; +Cc: barebox, Alex Gershgorin
On Mon, Sep 10, 2012 at 01:16:26PM +0300, Alex Gershgorin wrote:
> Hi Sascha,
>
> On Fri, Sep 07, 2012 at 01:46:39PM +0300, Alex Gershgorin wrote:
> > This patch clear screen before usage
> >
> > Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > ---
> > drivers/video/imx-ipu-fb.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
> > index 8039de0..d46cced 100644
> > --- a/drivers/video/imx-ipu-fb.c
> > +++ b/drivers/video/imx-ipu-fb.c
> > @@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
> > (info->bits_per_pixel >> 3));
> > if (!fbi->info.screen_base)
> > return -ENOMEM;
> > +
> > + /* Clear the screen */
> > + memset((char *)fbi->info.screen_base, 0,
> > + info->xres * info->yres * (info->bits_per_pixel >> 3));
>
> > > Not clearing the screen is intentional. Normally the fb drivers do not
> > > enable the framebuffer until explicitely requested via fb0.enable=1. The
> > > environment normally is supposed to set a picture on the screen and
> > > enable it afterwards.
> > > That said, we can clear the screen as with MMU enabled this probably
> > > does not take long time. But then it should be done in the fb core.
>
> Thanks for your explanation.
> In my case, I displayed picture on the screen, of course as you said I added to "init" script
> fb0.enable = 1
> bmp / env / logo.bmp
I would exchange the above commands. I don't know how this looks on your
hardware, but often enough it looks a lot nicer if you draw the logo
first and enable the framebuffer (the backlight most importantly)
afterwards.
> it was easy.
>
> The problem is that I have a screen with resolution 800x600, but
> picture that I displayed on the my screen is much smaller, resulting
> in a picture is displayed fine, but on the sides I get garbage. This
> patch fixes this issue, of course it is not the only way to solve this
> issue.
Yes, I thought that. 'cp /dev/zero /dev/fb0' would be another solution.
I think the memset in the fb code is fine, but it should be done in the
generic code.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] video imx-ipu-fb: add clear screen
2012-09-11 7:44 ` Sascha Hauer
@ 2012-09-11 10:14 ` Alex Gershgorin
0 siblings, 0 replies; 6+ messages in thread
From: Alex Gershgorin @ 2012-09-11 10:14 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, Alex Gershgorin
Hi Sascha,
On Mon, Sep 10, 2012 at 01:16:26PM +0300, Alex Gershgorin wrote:
> > Hi Sascha,
> >
> > On Fri, Sep 07, 2012 at 01:46:39PM +0300, Alex Gershgorin wrote:
> > > This patch clear screen before usage
> > >
> > > Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > > ---
> > > drivers/video/imx-ipu-fb.c | 4 ++++
> > > 1 files changed, 4 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
> > > index 8039de0..d46cced 100644
> > > --- a/drivers/video/imx-ipu-fb.c
> > > +++ b/drivers/video/imx-ipu-fb.c
> > > @@ -1012,6 +1012,10 @@ static int imxfb_probe(struct device_d *dev)
> > > (info->bits_per_pixel >> 3));
> > > if (!fbi->info.screen_base)
> > > return -ENOMEM;
> > > +
> > > + /* Clear the screen */
> > > + memset((char *)fbi->info.screen_base, 0,
> > > + info->xres * info->yres * (info->bits_per_pixel >> 3));
> >
> > > > Not clearing the screen is intentional. Normally the fb drivers do not
> > > > enable the framebuffer until explicitely requested via fb0.enable=1. The
> > > > environment normally is supposed to set a picture on the screen and
> > > > enable it afterwards.
> > > > That said, we can clear the screen as with MMU enabled this probably
> > > > does not take long time. But then it should be done in the fb core.
> >
> > Thanks for your explanation.
> > In my case, I displayed picture on the screen, of course as you said I added to "init" script
> > fb0.enable = 1
> > bmp / env / logo.bmp
> I would exchange the above commands. I don't know how this looks on your
> hardware, but often enough it looks a lot nicer if you draw the logo
> first and enable the framebuffer (the backlight most importantly)
> afterwards.
Oh sorry it's my fault, but in the my script this written correctly :-)
> it was easy.
>
> The problem is that I have a screen with resolution 800x600, but
> picture that I displayed on the my screen is much smaller, resulting
> in a picture is displayed fine, but on the sides I get garbage. This
> patch fixes this issue, of course it is not the only way to solve this
> issue.
> Yes, I thought that. 'cp /dev/zero /dev/fb0' would be another solution.
> I think the memset in the fb code is fine, but it should be done in the
> generic code.
Thanks for this point I tested it, this work fine :-)
Regards,
Alex
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-11 10:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 10:46 [PATCH] video imx-ipu-fb: add clear screen Alex Gershgorin
2012-09-07 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-10 7:36 ` Sascha Hauer
2012-09-10 10:16 ` Alex Gershgorin
2012-09-11 7:44 ` Sascha Hauer
2012-09-11 10:14 ` Alex Gershgorin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox