Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f497d015
Commit
f497d015
authored
Mar 18, 2009
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imxfb: calculate bpix value from bits_per_pixel
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
9b0e6db0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
arch/arm/plat-mxc/include/mach/imxfb.h
arch/arm/plat-mxc/include/mach/imxfb.h
+2
-1
drivers/video/imxfb.c
drivers/video/imxfb.c
+18
-1
No files found.
arch/arm/plat-mxc/include/mach/imxfb.h
View file @
f497d015
...
...
@@ -13,7 +13,8 @@
#define PCR_BPIX_4 (2 << 25)
#define PCR_BPIX_8 (3 << 25)
#define PCR_BPIX_12 (4 << 25)
#define PCR_BPIX_16 (4 << 25)
#define PCR_BPIX_16 (5 << 25)
#define PCR_BPIX_18 (6 << 25)
#define PCR_PIXPOL (1 << 24)
#define PCR_FLMPOL (1 << 23)
#define PCR_LPPOL (1 << 22)
...
...
drivers/video/imxfb.c
View file @
f497d015
...
...
@@ -33,6 +33,7 @@
#include <linux/math64.h>
#include <mach/imxfb.h>
#include <mach/hardware.h>
/*
* Complain if VAR is out of range.
...
...
@@ -530,8 +531,24 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
lcd_clk
/
pcr
);
}
switch
(
var
->
bits_per_pixel
)
{
case
32
:
pcr
|=
PCR_BPIX_18
;
break
;
case
16
:
default:
if
(
cpu_is_mx1
())
pcr
|=
PCR_BPIX_12
;
else
pcr
|=
PCR_BPIX_16
;
break
;
case
8
:
pcr
|=
PCR_BPIX_8
;
break
;
}
/* add sync polarities */
pcr
|=
fbi
->
pcr
&
~
0x3F
;
pcr
|=
fbi
->
pcr
&
~
(
0x3f
|
(
7
<<
25
))
;
writel
(
pcr
,
fbi
->
regs
+
LCDC_PCR
);
writel
(
fbi
->
pwmr
,
fbi
->
regs
+
LCDC_PWMR
);
...
...
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