diff options
Diffstat (limited to 'drivers/video/ps3fb.c')
-rw-r--r-- | drivers/video/ps3fb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 069a6ed6e75b..229727a5bc75 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -287,15 +287,8 @@ static const struct fb_videomode ps3fb_modedb[] = { | |||
287 | #define HEAD_A | 287 | #define HEAD_A |
288 | #define HEAD_B | 288 | #define HEAD_B |
289 | 289 | ||
290 | #define X_OFF(i) (ps3fb_res[i].xoff) /* left/right margin (pixel) */ | ||
291 | #define Y_OFF(i) (ps3fb_res[i].yoff) /* top/bottom margin (pixel) */ | ||
292 | #define WIDTH(i) (ps3fb_res[i].xres) /* width of FB */ | ||
293 | #define HEIGHT(i) (ps3fb_res[i].yres) /* height of FB */ | ||
294 | #define BPP 4 /* number of bytes per pixel */ | 290 | #define BPP 4 /* number of bytes per pixel */ |
295 | 291 | ||
296 | /* Start of the virtual frame buffer (relative to fullscreen ) */ | ||
297 | #define VP_OFF(i) ((WIDTH(i) * Y_OFF(i) + X_OFF(i)) * BPP) | ||
298 | |||
299 | 292 | ||
300 | static int ps3fb_mode; | 293 | static int ps3fb_mode; |
301 | module_param(ps3fb_mode, int, 0); | 294 | module_param(ps3fb_mode, int, 0); |
@@ -611,7 +604,10 @@ static int ps3fb_set_par(struct fb_info *info) | |||
611 | 604 | ||
612 | par->width = info->var.xres; | 605 | par->width = info->var.xres; |
613 | par->height = info->var.yres; | 606 | par->height = info->var.yres; |
614 | offset = VP_OFF(i); | 607 | |
608 | /* Start of the virtual frame buffer (relative to fullscreen) */ | ||
609 | offset = ps3fb_res[i].yoff * ddr_line_length + ps3fb_res[i].xoff * BPP; | ||
610 | |||
615 | par->fb_offset = GPU_ALIGN_UP(offset); | 611 | par->fb_offset = GPU_ALIGN_UP(offset); |
616 | par->full_offset = par->fb_offset - offset; | 612 | par->full_offset = par->fb_offset - offset; |
617 | par->pan_offset = info->var.yoffset * xdr_line_length + | 613 | par->pan_offset = info->var.yoffset * xdr_line_length + |