Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
a3bb2e4f
Commit
a3bb2e4f
authored
Sep 02, 2008
by
Jorge Zapata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear the framebuffer memory when the mode is changed
parent
2e9294aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
drivers/video/dm/dm_main.c
drivers/video/dm/dm_main.c
+22
-15
No files found.
drivers/video/dm/dm_main.c
View file @
a3bb2e4f
...
@@ -812,6 +812,26 @@ static inline void dm_win_position_get(const struct dm_win_info *w,
...
@@ -812,6 +812,26 @@ static inline void dm_win_position_get(const struct dm_win_info *w,
*
yl
=
v
->
yres
;
*
yl
=
v
->
yres
;
}
}
static
void
dm_win_clear
(
struct
dm_win_info
*
w
)
{
struct
fb_var_screeninfo
*
v
=
&
(
w
->
info
.
var
);
int
bg_color
=
0x00
;
switch
(
v
->
bits_per_pixel
)
{
case
16
:
/* yuv422 */
if
(
is_win
(
w
,
DAVINCIFB_WIN_VID0
)
||
is_win
(
w
,
DAVINCIFB_WIN_VID1
))
bg_color
=
0x88
;
break
;
/* attribute */
case
4
:
if
(
is_win
(
w
,
DAVINCIFB_WIN_OSD1
))
bg_color
=
0x77
;
break
;
}
memset
((
void
*
)
w
->
fb_base
,
bg_color
,
w
->
fb_size
);
}
/**
/**
* Checks if the rectangle formed by the first four coordinates is inside the
* Checks if the rectangle formed by the first four coordinates is inside the
* rectangle formed by the second four coordinates
* rectangle formed by the second four coordinates
...
@@ -1153,7 +1173,6 @@ static int dm_wins_remove(struct dm_info *info)
...
@@ -1153,7 +1173,6 @@ static int dm_wins_remove(struct dm_info *info)
static
int
dm_win_probe
(
struct
dm_win_info
*
w
)
static
int
dm_win_probe
(
struct
dm_win_info
*
w
)
{
{
int
ret
;
int
ret
;
int
bg_color
=
0x00
;
struct
fb_info
*
info
=
&
w
->
info
;
struct
fb_info
*
info
=
&
w
->
info
;
struct
device
*
dev
=
w
->
dm
->
dev
;
struct
device
*
dev
=
w
->
dm
->
dev
;
struct
fb_var_screeninfo
*
vinfo
=
&
info
->
var
;
struct
fb_var_screeninfo
*
vinfo
=
&
info
->
var
;
...
@@ -1177,20 +1196,7 @@ static int dm_win_probe(struct dm_win_info *w)
...
@@ -1177,20 +1196,7 @@ static int dm_win_probe(struct dm_win_info *w)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
/* clear the memory */
/* clear the memory */
switch
(
info
->
var
.
bits_per_pixel
)
{
dm_win_clear
(
w
);
case
16
:
/* yuv422 */
if
(
is_win
(
w
,
DAVINCIFB_WIN_VID0
)
||
is_win
(
w
,
DAVINCIFB_WIN_VID1
))
bg_color
=
0x88
;
break
;
/* attribute */
case
4
:
if
(
is_win
(
w
,
DAVINCIFB_WIN_OSD1
))
bg_color
=
0x77
;
break
;
}
memset
((
void
*
)
w
->
fb_base
,
bg_color
,
w
->
fb_size
);
/* create the fb device */
/* create the fb device */
if
(
register_framebuffer
(
info
)
<
0
)
{
if
(
register_framebuffer
(
info
)
<
0
)
{
dev_err
(
dev
,
"Unable to register %s framebuffer
\n
"
,
dev_err
(
dev
,
"Unable to register %s framebuffer
\n
"
,
...
@@ -1510,6 +1516,7 @@ static int davincifb_set_par(struct fb_info *info)
...
@@ -1510,6 +1516,7 @@ static int davincifb_set_par(struct fb_info *info)
interlaced
=
v
->
vmode
==
FB_VMODE_INTERLACED
?
1
:
0
;
interlaced
=
v
->
vmode
==
FB_VMODE_INTERLACED
?
1
:
0
;
set_win_position
(
w
,
w
->
x
,
w
->
y
,
v
->
xres
,
v
->
yres
/
(
interlaced
+
1
));
set_win_position
(
w
,
w
->
x
,
w
->
y
,
v
->
xres
,
v
->
yres
/
(
interlaced
+
1
));
set_win_mode
(
w
);
set_win_mode
(
w
);
dm_win_clear
(
w
);
if
(
!
is_win
(
w
,
DAVINCIFB_WIN_VID0
))
if
(
!
is_win
(
w
,
DAVINCIFB_WIN_VID0
))
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment