diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/regs-fb.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/regs-fb.h | 34 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 36 |
3 files changed, 0 insertions, 90 deletions
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h index f56611526c63..a06ee0af9a4b 100644 --- a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h +++ b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h | |||
@@ -18,24 +18,4 @@ | |||
18 | 18 | ||
19 | #include <plat/regs-fb-v4.h> | 19 | #include <plat/regs-fb-v4.h> |
20 | 20 | ||
21 | /* Palette registers */ | ||
22 | #define WIN2_PAL(_entry) (0x300 + ((_entry) * 2)) | ||
23 | #define WIN3_PAL(_entry) (0x320 + ((_entry) * 2)) | ||
24 | #define WIN4_PAL(_entry) (0x340 + ((_entry) * 2)) | ||
25 | #define WIN0_PAL(_entry) (0x400 + ((_entry) * 4)) | ||
26 | #define WIN1_PAL(_entry) (0x800 + ((_entry) * 4)) | ||
27 | |||
28 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) | ||
29 | { | ||
30 | switch (window) { | ||
31 | case 0: return WIN0_PAL(reg); | ||
32 | case 1: return WIN1_PAL(reg); | ||
33 | case 2: return WIN2_PAL(reg); | ||
34 | case 3: return WIN3_PAL(reg); | ||
35 | case 4: return WIN4_PAL(reg); | ||
36 | } | ||
37 | |||
38 | BUG(); | ||
39 | } | ||
40 | |||
41 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ | 21 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ |
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-fb.h b/arch/arm/mach-s5pc100/include/mach/regs-fb.h index 1732cd28c765..4be4cc9abf75 100644 --- a/arch/arm/mach-s5pc100/include/mach/regs-fb.h +++ b/arch/arm/mach-s5pc100/include/mach/regs-fb.h | |||
@@ -100,40 +100,6 @@ | |||
100 | #define BLENDCON (0x260) | 100 | #define BLENDCON (0x260) |
101 | #define BLENDCON_8BIT_ALPHA (1 << 0) | 101 | #define BLENDCON_8BIT_ALPHA (1 << 0) |
102 | 102 | ||
103 | /* Per-window palette base addresses (start of palette memory). | ||
104 | * Each window palette area consists of 256 32-bit entries. | ||
105 | * START is the first address (entry 0th), END is the address of 255th entry. | ||
106 | */ | ||
107 | #define WIN0_PAL_BASE (0x2400) | ||
108 | #define WIN0_PAL_END (0x27fc) | ||
109 | #define WIN1_PAL_BASE (0x2800) | ||
110 | #define WIN1_PAL_END (0x2bfc) | ||
111 | #define WIN2_PAL_BASE (0x2c00) | ||
112 | #define WIN2_PAL_END (0x2ffc) | ||
113 | #define WIN3_PAL_BASE (0x3000) | ||
114 | #define WIN3_PAL_END (0x33fc) | ||
115 | #define WIN4_PAL_BASE (0x3400) | ||
116 | #define WIN4_PAL_END (0x37fc) | ||
117 | |||
118 | #define WIN0_PAL(_entry) (WIN0_PAL_BASE + ((_entry) * 4)) | ||
119 | #define WIN1_PAL(_entry) (WIN1_PAL_BASE + ((_entry) * 4)) | ||
120 | #define WIN2_PAL(_entry) (WIN2_PAL_BASE + ((_entry) * 4)) | ||
121 | #define WIN3_PAL(_entry) (WIN3_PAL_BASE + ((_entry) * 4)) | ||
122 | #define WIN4_PAL(_entry) (WIN4_PAL_BASE + ((_entry) * 4)) | ||
123 | |||
124 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) | ||
125 | { | ||
126 | switch (window) { | ||
127 | case 0: return WIN0_PAL(reg); | ||
128 | case 1: return WIN1_PAL(reg); | ||
129 | case 2: return WIN2_PAL(reg); | ||
130 | case 3: return WIN3_PAL(reg); | ||
131 | case 4: return WIN4_PAL(reg); | ||
132 | } | ||
133 | |||
134 | BUG(); | ||
135 | } | ||
136 | |||
137 | 103 | ||
138 | #endif /* __ASM_ARCH_REGS_FB_H */ | 104 | #endif /* __ASM_ARCH_REGS_FB_H */ |
139 | 105 | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-fb-v4.h b/arch/arm/plat-samsung/include/plat/regs-fb-v4.h index 0f43599248ad..0477e8aaf3dd 100644 --- a/arch/arm/plat-samsung/include/plat/regs-fb-v4.h +++ b/arch/arm/plat-samsung/include/plat/regs-fb-v4.h | |||
@@ -148,42 +148,6 @@ | |||
148 | * compiled. | 148 | * compiled. |
149 | */ | 149 | */ |
150 | 150 | ||
151 | /* return true if window _win has OSD register D */ | ||
152 | #define s3c_fb_has_osd_d(_win) ((_win) != 4 && (_win) != 0) | ||
153 | |||
154 | static inline unsigned int s3c_fb_win_pal_size(unsigned int win) | ||
155 | { | ||
156 | if (win < 2) | ||
157 | return 256; | ||
158 | if (win < 4) | ||
159 | return 16; | ||
160 | if (win == 4) | ||
161 | return 4; | ||
162 | |||
163 | BUG(); /* shouldn't get here */ | ||
164 | } | ||
165 | |||
166 | static inline int s3c_fb_validate_win_bpp(unsigned int win, unsigned int bpp) | ||
167 | { | ||
168 | /* all windows can do 1/2 bpp */ | ||
169 | |||
170 | if ((bpp == 25 || bpp == 19) && win == 0) | ||
171 | return 0; /* win 0 does not have 19 or 25bpp modes */ | ||
172 | |||
173 | if (bpp == 4 && win == 4) | ||
174 | return 0; | ||
175 | |||
176 | if (bpp == 8 && (win >= 3)) | ||
177 | return 0; /* win 3/4 cannot do 8bpp in any mode */ | ||
178 | |||
179 | return 1; | ||
180 | } | ||
181 | |||
182 | static inline int s3c_fb_pal_is16(unsigned int window) | ||
183 | { | ||
184 | return window > 1; | ||
185 | } | ||
186 | |||
187 | struct s3c_fb_palette { | 151 | struct s3c_fb_palette { |
188 | struct fb_bitfield r; | 152 | struct fb_bitfield r; |
189 | struct fb_bitfield g; | 153 | struct fb_bitfield g; |