* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
@ 2010-08-25 21:36 Timur Tabi
2010-08-27 11:46 ` Detlev Zundel
2010-08-27 20:51 ` Timur Tabi
0 siblings, 2 replies; 8+ messages in thread
From: Timur Tabi @ 2010-08-25 21:36 UTC (permalink / raw)
To: u-boot
The 'bmp display' command accepts optional X and Y values for the position
of the image to be displayed. Change the code which parses the command line
to accept negative values.
This feature is useful if you want to use a frame buffer for the console, and
you want a banner displayed on the top of the screen that never scrolls off.
This can be accomplished by declaring that the width and height of the video
screen is smaller than it really is, and then drawing an image in the
undeclared area.
For example, if you have 1280x1024 monitor, and you want to display a banner
on the top of the screen that's 100 pixels tall, then video_hw_init() should
say that display is really 1280x924, and then the banner should be drawn at
position (0, -100).
Signed-off-by: Timur Tabi <timur@freescale.com>
---
common/cmd_bmp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index d51cc55..06c1547 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -122,8 +122,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
break;
case 4:
addr = simple_strtoul(argv[1], NULL, 16);
- x = simple_strtoul(argv[2], NULL, 10);
- y = simple_strtoul(argv[3], NULL, 10);
+ x = simple_strtol(argv[2], NULL, 10);
+ y = simple_strtol(argv[3], NULL, 10);
break;
default:
return cmd_usage(cmdtp);
--
1.7.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-25 21:36 [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command Timur Tabi
@ 2010-08-27 11:46 ` Detlev Zundel
2010-08-27 12:00 ` Tabi Timur-B04825
2010-08-27 20:51 ` Timur Tabi
1 sibling, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2010-08-27 11:46 UTC (permalink / raw)
To: u-boot
Hi Timur,
> The 'bmp display' command accepts optional X and Y values for the position
> of the image to be displayed. Change the code which parses the command line
> to accept negative values.
>
> This feature is useful if you want to use a frame buffer for the console, and
> you want a banner displayed on the top of the screen that never scrolls off.
> This can be accomplished by declaring that the width and height of the video
> screen is smaller than it really is, and then drawing an image in the
> undeclared area.
>
> For example, if you have 1280x1024 monitor, and you want to display a banner
> on the top of the screen that's 100 pixels tall, then video_hw_init() should
> say that display is really 1280x924, and then the banner should be drawn at
> position (0, -100).
Ugh. I have to admit that I really dislike this patch. What you
effectively do is to erase the "aboluteness" of coordinates. Instead of
the current 1:1 correspondence between a pixel coordinate and its
location on the physical display, you introduce virtual coordinates
without any possibility to inquire about the virtual coordinate system
in use.
Currently if we display an image at (0, 0) we can be sure that it
appears at the edge of the display. With your system one cannot tell
without knowing the complete context.
Can't you come up with a scheme which does not destroy this valuable
property of our coordinates?
Cheers
Detlev
--
When you loosen yourself from all the obvious delusions - religion,
ideology, Communism - you're still left with the myth of your own
goodness. Which is the final delusion.
-- Philip Roth
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-27 11:46 ` Detlev Zundel
@ 2010-08-27 12:00 ` Tabi Timur-B04825
2010-08-27 13:14 ` Detlev Zundel
0 siblings, 1 reply; 8+ messages in thread
From: Tabi Timur-B04825 @ 2010-08-27 12:00 UTC (permalink / raw)
To: u-boot
Detlev Zundel wrote:
> Can't you come up with a scheme which does not destroy this valuable
> property of our coordinates?
I'm only doing two things:
1) Exposing a feature of the existing code. Notice that I only had to change
two lines in the cmd_bmp code, not any of the core bitmap code, which already
takes signed integers.
2) Trying to use the existing bitmap code to do the same thing that we do
with the Freescale-specific bitmap code.
If you can tell me how I can display a logo on top of the screen, and have
all of the boot text appear below the logo, I'll be happy to do that instead.
The logo will then scroll off the top of the screen, but that's okay.
--
Timur Tabi
Linux kernel developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-27 12:00 ` Tabi Timur-B04825
@ 2010-08-27 13:14 ` Detlev Zundel
2010-08-27 14:00 ` Tabi Timur-B04825
0 siblings, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2010-08-27 13:14 UTC (permalink / raw)
To: u-boot
Hi Timur,
> Detlev Zundel wrote:
>
>> Can't you come up with a scheme which does not destroy this valuable
>> property of our coordinates?
>
> I'm only doing two things:
>
> 1) Exposing a feature of the existing code. Notice that I only had to change
> two lines in the cmd_bmp code, not any of the core bitmap code, which already
> takes signed integers.
Yes, I fully expected such an answer. Please show me the "existing
feature" which started to leak in such virtual coordinates into the
code. We should take a look at this and re-evaluate it.
> 2) Trying to use the existing bitmap code to do the same thing that we do
> with the Freescale-specific bitmap code.
>
> If you can tell me how I can display a logo on top of the screen, and have
> all of the boot text appear below the logo, I'll be happy to do that instead.
> The logo will then scroll off the top of the screen, but that's okay.
We can discuss this once I see the code that makes virtual coordinates
neccessary.
Cheers
Detlev
--
Quality isn't something you lay on top of subjects and objects like
tinsel on a christmas tree. Real Quality must be the source of the
subjects and objects, the cone from which the tree must start.
-- Robert M. Pirsig
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-27 13:14 ` Detlev Zundel
@ 2010-08-27 14:00 ` Tabi Timur-B04825
2010-08-27 14:10 ` Reinhard Meyer
0 siblings, 1 reply; 8+ messages in thread
From: Tabi Timur-B04825 @ 2010-08-27 14:00 UTC (permalink / raw)
To: u-boot
On Aug 27, 2010, at 8:14 AM, "Detlev Zundel" <dzu@denx.de> wrote:
> We can discuss this once I see the code that makes virtual coordinates
>
If you can help me figure out how to get the boot text to appear below the logo, I won't need to use virtual coordinates.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-27 14:00 ` Tabi Timur-B04825
@ 2010-08-27 14:10 ` Reinhard Meyer
2010-08-27 14:28 ` Tabi Timur-B04825
0 siblings, 1 reply; 8+ messages in thread
From: Reinhard Meyer @ 2010-08-27 14:10 UTC (permalink / raw)
To: u-boot
Dear Timur,
> On Aug 27, 2010, at 8:14 AM, "Detlev Zundel"<dzu@denx.de> wrote:
>
>> We can discuss this once I see the code that makes virtual coordinates
>>
>
> If you can help me figure out how to get the boot text to appear below the logo, I won't need to use virtual coordinates.
1. would it be possible to output several line-feeds before u-boot starts its
output?
2. would it be possible to just manipulate the initial Y for text output?
3. most elegant, however, would be to add a scroll area feature...
just my 0.001 ? ;)
Reinhard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command
2010-08-25 21:36 [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command Timur Tabi
2010-08-27 11:46 ` Detlev Zundel
@ 2010-08-27 20:51 ` Timur Tabi
1 sibling, 0 replies; 8+ messages in thread
From: Timur Tabi @ 2010-08-27 20:51 UTC (permalink / raw)
To: u-boot
I'm rescinding this patch. I have some new code that doesn't need this hack.
On Wed, Aug 25, 2010 at 4:36 PM, Timur Tabi <timur@freescale.com> wrote:
> The 'bmp display' command accepts optional X and Y values for the position
> of the image to be displayed. ?Change the code which parses the command line
> to accept negative values.
>
> This feature is useful if you want to use a frame buffer for the console, and
> you want a banner displayed on the top of the screen that never scrolls off.
> This can be accomplished by declaring that the width and height of the video
> screen is smaller than it really is, and then drawing an image in the
> undeclared area.
>
> For example, if you have 1280x1024 monitor, and you want to display a banner
> on the top of the screen that's 100 pixels tall, then video_hw_init() should
> say that display is really 1280x924, and then the banner should be drawn at
> position (0, -100).
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-08-27 20:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 21:36 [U-Boot] [PATCH 2/2] cmp_bmp: allow negative X, Y values for display command Timur Tabi
2010-08-27 11:46 ` Detlev Zundel
2010-08-27 12:00 ` Tabi Timur-B04825
2010-08-27 13:14 ` Detlev Zundel
2010-08-27 14:00 ` Tabi Timur-B04825
2010-08-27 14:10 ` Reinhard Meyer
2010-08-27 14:28 ` Tabi Timur-B04825
2010-08-27 20:51 ` Timur Tabi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.