Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
7027d562
Commit
7027d562
authored
15 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-video
parents
fb508b8b
acb13868
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lcd.c
+20
-4
20 additions, 4 deletions
common/lcd.c
with
20 additions
and
4 deletions
common/lcd.c
+
20
−
4
View file @
7027d562
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
/************************************************************************/
/************************************************************************/
#ifdef CONFIG_LCD_LOGO
#ifdef CONFIG_LCD_LOGO
# include <bmp_logo.h>
/* Get logo data, width and height */
# include <bmp_logo.h>
/* Get logo data, width and height */
# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
&& (LCD_BPP != LCD_COLOR16)
# error Default Color Map overlaps with Logo Color Map
# error Default Color Map overlaps with Logo Color Map
# endif
# endif
#endif
#endif
...
@@ -218,8 +218,12 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
...
@@ -218,8 +218,12 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
for
(
row
=
0
;
row
<
VIDEO_FONT_HEIGHT
;
++
row
,
dest
+=
lcd_line_length
)
{
for
(
row
=
0
;
row
<
VIDEO_FONT_HEIGHT
;
++
row
,
dest
+=
lcd_line_length
)
{
uchar
*
s
=
str
;
uchar
*
s
=
str
;
uchar
*
d
=
dest
;
int
i
;
int
i
;
#if LCD_BPP == LCD_COLOR16
ushort
*
d
=
(
ushort
*
)
dest
;
#else
uchar
*
d
=
dest
;
#endif
#if LCD_BPP == LCD_MONOCHROME
#if LCD_BPP == LCD_MONOCHROME
uchar
rest
=
*
d
&
-
(
1
<<
(
8
-
off
));
uchar
rest
=
*
d
&
-
(
1
<<
(
8
-
off
));
...
@@ -244,7 +248,7 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
...
@@ -244,7 +248,7 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
bits
<<=
1
;
bits
<<=
1
;
}
}
#elif LCD_BPP == LCD_COLOR16
#elif LCD_BPP == LCD_COLOR16
for
(
c
=
0
;
c
<
16
;
++
c
)
{
for
(
c
=
0
;
c
<
8
;
++
c
)
{
*
d
++
=
(
bits
&
0x80
)
?
*
d
++
=
(
bits
&
0x80
)
?
lcd_color_fg
:
lcd_color_bg
;
lcd_color_fg
:
lcd_color_bg
;
bits
<<=
1
;
bits
<<=
1
;
...
@@ -521,6 +525,13 @@ void bitmap_plot (int x, int y)
...
@@ -521,6 +525,13 @@ void bitmap_plot (int x, int y)
cmap
=
(
ushort
*
)
&
(
cp
->
lcd_cmap
[
BMP_LOGO_OFFSET
*
sizeof
(
ushort
)]);
cmap
=
(
ushort
*
)
&
(
cp
->
lcd_cmap
[
BMP_LOGO_OFFSET
*
sizeof
(
ushort
)]);
#elif defined(CONFIG_ATMEL_LCD)
#elif defined(CONFIG_ATMEL_LCD)
cmap
=
(
uint
*
)
(
panel_info
.
mmio
+
ATMEL_LCDC_LUT
(
0
));
cmap
=
(
uint
*
)
(
panel_info
.
mmio
+
ATMEL_LCDC_LUT
(
0
));
#else
/*
* default case: generic system with no cmap (most likely 16bpp)
* We set cmap to the source palette, so no change is done.
* This avoids even more ifdef in the next stanza
*/
cmap
=
bmp_logo_palette
;
#endif
#endif
WATCHDOG_RESET
();
WATCHDOG_RESET
();
...
@@ -559,10 +570,15 @@ void bitmap_plot (int x, int y)
...
@@ -559,10 +570,15 @@ void bitmap_plot (int x, int y)
}
}
}
}
else
{
/* true color mode */
else
{
/* true color mode */
u16
col16
;
fb16
=
(
ushort
*
)(
lcd_base
+
y
*
lcd_line_length
+
x
);
fb16
=
(
ushort
*
)(
lcd_base
+
y
*
lcd_line_length
+
x
);
for
(
i
=
0
;
i
<
BMP_LOGO_HEIGHT
;
++
i
)
{
for
(
i
=
0
;
i
<
BMP_LOGO_HEIGHT
;
++
i
)
{
for
(
j
=
0
;
j
<
BMP_LOGO_WIDTH
;
j
++
)
{
for
(
j
=
0
;
j
<
BMP_LOGO_WIDTH
;
j
++
)
{
fb16
[
j
]
=
bmp_logo_palette
[(
bmap
[
j
])];
col16
=
bmp_logo_palette
[(
bmap
[
j
]
-
16
)];
fb16
[
j
]
=
((
col16
&
0x000F
)
<<
1
)
|
((
col16
&
0x00F0
)
<<
3
)
|
((
col16
&
0x0F00
)
<<
4
);
}
}
bmap
+=
BMP_LOGO_WIDTH
;
bmap
+=
BMP_LOGO_WIDTH
;
fb16
+=
panel_info
.
vl_col
;
fb16
+=
panel_info
.
vl_col
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment