aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/i810/i810_accel.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-01-27 17:18:29 -0500
committerLen Brown <len.brown@intel.com>2006-01-27 17:18:29 -0500
commit292dd876ee765c478b27c93cc51e93a558ed58bf (patch)
tree5b740e93253295baee2a9c414a6c66d03d44a9ef /drivers/video/i810/i810_accel.c
parentd4ec6c7cc9a15a7a529719bc3b84f46812f9842e (diff)
parent9fdb62af92c741addbea15545f214a6e89460865 (diff)
Pull release into acpica branch
Diffstat (limited to 'drivers/video/i810/i810_accel.c')
-rw-r--r--drivers/video/i810/i810_accel.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
index 64cd1c827cf0..76764ea3486a 100644
--- a/drivers/video/i810/i810_accel.c
+++ b/drivers/video/i810/i810_accel.c
@@ -14,6 +14,7 @@
14 14
15#include "i810_regs.h" 15#include "i810_regs.h"
16#include "i810.h" 16#include "i810.h"
17#include "i810_main.h"
17 18
18static u32 i810fb_rop[] = { 19static u32 i810fb_rop[] = {
19 COLOR_COPY_ROP, /* ROP_COPY */ 20 COLOR_COPY_ROP, /* ROP_COPY */
@@ -57,7 +58,7 @@ static inline void i810_report_error(u8 __iomem *mmio)
57 */ 58 */
58static inline int wait_for_space(struct fb_info *info, u32 space) 59static inline int wait_for_space(struct fb_info *info, u32 space)
59{ 60{
60 struct i810fb_par *par = (struct i810fb_par *) info->par; 61 struct i810fb_par *par = info->par;
61 u32 head, count = WAIT_COUNT, tail; 62 u32 head, count = WAIT_COUNT, tail;
62 u8 __iomem *mmio = par->mmio_start_virtual; 63 u8 __iomem *mmio = par->mmio_start_virtual;
63 64
@@ -88,7 +89,7 @@ static inline int wait_for_space(struct fb_info *info, u32 space)
88 */ 89 */
89static inline int wait_for_engine_idle(struct fb_info *info) 90static inline int wait_for_engine_idle(struct fb_info *info)
90{ 91{
91 struct i810fb_par *par = (struct i810fb_par *) info->par; 92 struct i810fb_par *par = info->par;
92 u8 __iomem *mmio = par->mmio_start_virtual; 93 u8 __iomem *mmio = par->mmio_start_virtual;
93 int count = WAIT_COUNT; 94 int count = WAIT_COUNT;
94 95
@@ -116,7 +117,7 @@ static inline int wait_for_engine_idle(struct fb_info *info)
116 */ 117 */
117static inline u32 begin_iring(struct fb_info *info, u32 space) 118static inline u32 begin_iring(struct fb_info *info, u32 space)
118{ 119{
119 struct i810fb_par *par = (struct i810fb_par *) info->par; 120 struct i810fb_par *par = info->par;
120 121
121 if (par->dev_flags & ALWAYS_SYNC) 122 if (par->dev_flags & ALWAYS_SYNC)
122 wait_for_engine_idle(info); 123 wait_for_engine_idle(info);
@@ -161,7 +162,7 @@ static inline void source_copy_blit(int dwidth, int dheight, int dpitch,
161 int xdir, int src, int dest, int rop, 162 int xdir, int src, int dest, int rop,
162 int blit_bpp, struct fb_info *info) 163 int blit_bpp, struct fb_info *info)
163{ 164{
164 struct i810fb_par *par = (struct i810fb_par *) info->par; 165 struct i810fb_par *par = info->par;
165 166
166 if (begin_iring(info, 24 + IRING_PAD)) return; 167 if (begin_iring(info, 24 + IRING_PAD)) return;
167 168
@@ -195,7 +196,7 @@ static inline void color_blit(int width, int height, int pitch, int dest,
195 int rop, int what, int blit_bpp, 196 int rop, int what, int blit_bpp,
196 struct fb_info *info) 197 struct fb_info *info)
197{ 198{
198 struct i810fb_par *par = (struct i810fb_par *) info->par; 199 struct i810fb_par *par = info->par;
199 200
200 if (begin_iring(info, 24 + IRING_PAD)) return; 201 if (begin_iring(info, 24 + IRING_PAD)) return;
201 202
@@ -236,7 +237,7 @@ static inline void mono_src_copy_imm_blit(int dwidth, int dheight, int dpitch,
236 int dest, const u32 *src, int bg, 237 int dest, const u32 *src, int bg,
237 int fg, struct fb_info *info) 238 int fg, struct fb_info *info)
238{ 239{
239 struct i810fb_par *par = (struct i810fb_par *) info->par; 240 struct i810fb_par *par = info->par;
240 241
241 if (begin_iring(info, 24 + (dsize << 2) + IRING_PAD)) return; 242 if (begin_iring(info, 24 + (dsize << 2) + IRING_PAD)) return;
242 243
@@ -254,7 +255,7 @@ static inline void mono_src_copy_imm_blit(int dwidth, int dheight, int dpitch,
254 255
255static inline void load_front(int offset, struct fb_info *info) 256static inline void load_front(int offset, struct fb_info *info)
256{ 257{
257 struct i810fb_par *par = (struct i810fb_par *) info->par; 258 struct i810fb_par *par = info->par;
258 259
259 if (begin_iring(info, 8 + IRING_PAD)) return; 260 if (begin_iring(info, 8 + IRING_PAD)) return;
260 261
@@ -296,7 +297,7 @@ static inline void i810fb_iring_enable(struct i810fb_par *par, u32 mode)
296 297
297void i810fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) 298void i810fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
298{ 299{
299 struct i810fb_par *par = (struct i810fb_par *) info->par; 300 struct i810fb_par *par = info->par;
300 u32 dx, dy, width, height, dest, rop = 0, color = 0; 301 u32 dx, dy, width, height, dest, rop = 0, color = 0;
301 302
302 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 303 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
@@ -322,7 +323,7 @@ void i810fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
322 323
323void i810fb_copyarea(struct fb_info *info, const struct fb_copyarea *region) 324void i810fb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
324{ 325{
325 struct i810fb_par *par = (struct i810fb_par *) info->par; 326 struct i810fb_par *par = info->par;
326 u32 sx, sy, dx, dy, pitch, width, height, src, dest, xdir; 327 u32 sx, sy, dx, dy, pitch, width, height, src, dest, xdir;
327 328
328 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 329 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
@@ -361,7 +362,7 @@ void i810fb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
361 362
362void i810fb_imageblit(struct fb_info *info, const struct fb_image *image) 363void i810fb_imageblit(struct fb_info *info, const struct fb_image *image)
363{ 364{
364 struct i810fb_par *par = (struct i810fb_par *) info->par; 365 struct i810fb_par *par = info->par;
365 u32 fg = 0, bg = 0, size, dst; 366 u32 fg = 0, bg = 0, size, dst;
366 367
367 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 368 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
@@ -397,7 +398,7 @@ void i810fb_imageblit(struct fb_info *info, const struct fb_image *image)
397 398
398int i810fb_sync(struct fb_info *info) 399int i810fb_sync(struct fb_info *info)
399{ 400{
400 struct i810fb_par *par = (struct i810fb_par *) info->par; 401 struct i810fb_par *par = info->par;
401 402
402 if (!info->var.accel_flags || par->dev_flags & LOCKUP) 403 if (!info->var.accel_flags || par->dev_flags & LOCKUP)
403 return 0; 404 return 0;
@@ -407,7 +408,7 @@ int i810fb_sync(struct fb_info *info)
407 408
408void i810fb_load_front(u32 offset, struct fb_info *info) 409void i810fb_load_front(u32 offset, struct fb_info *info)
409{ 410{
410 struct i810fb_par *par = (struct i810fb_par *) info->par; 411 struct i810fb_par *par = info->par;
411 u8 __iomem *mmio = par->mmio_start_virtual; 412 u8 __iomem *mmio = par->mmio_start_virtual;
412 413
413 if (!info->var.accel_flags || par->dev_flags & LOCKUP) 414 if (!info->var.accel_flags || par->dev_flags & LOCKUP)
@@ -427,7 +428,7 @@ void i810fb_load_front(u32 offset, struct fb_info *info)
427 */ 428 */
428void i810fb_init_ringbuffer(struct fb_info *info) 429void i810fb_init_ringbuffer(struct fb_info *info)
429{ 430{
430 struct i810fb_par *par = (struct i810fb_par *) info->par; 431 struct i810fb_par *par = info->par;
431 u32 tmp1, tmp2; 432 u32 tmp1, tmp2;
432 u8 __iomem *mmio = par->mmio_start_virtual; 433 u8 __iomem *mmio = par->mmio_start_virtual;
433 434