| .. | .. |
|---|
| 29 | 29 | #include <linux/freezer.h> |
|---|
| 30 | 30 | #include <linux/uaccess.h> |
|---|
| 31 | 31 | #include <linux/fb.h> |
|---|
| 32 | +#include <linux/fbcon.h> |
|---|
| 32 | 33 | #include <linux/init.h> |
|---|
| 33 | 34 | |
|---|
| 34 | 35 | #include <asm/cell-regs.h> |
|---|
| .. | .. |
|---|
| 44 | 45 | #define GPU_CMD_BUF_SIZE (2 * 1024 * 1024) |
|---|
| 45 | 46 | #define GPU_FB_START (64 * 1024) |
|---|
| 46 | 47 | #define GPU_IOIF (0x0d000000UL) |
|---|
| 47 | | -#define GPU_ALIGN_UP(x) _ALIGN_UP((x), 64) |
|---|
| 48 | +#define GPU_ALIGN_UP(x) ALIGN((x), 64) |
|---|
| 48 | 49 | #define GPU_MAX_LINE_LENGTH (65536 - 64) |
|---|
| 49 | 50 | |
|---|
| 50 | 51 | #define GPU_INTR_STATUS_VSYNC_0 0 /* vsync on head A */ |
|---|
| .. | .. |
|---|
| 824 | 825 | var = info->var; |
|---|
| 825 | 826 | fb_videomode_to_var(&var, vmode); |
|---|
| 826 | 827 | console_lock(); |
|---|
| 827 | | - info->flags |= FBINFO_MISC_USEREVENT; |
|---|
| 828 | 828 | /* Force, in case only special bits changed */ |
|---|
| 829 | 829 | var.activate |= FB_ACTIVATE_FORCE; |
|---|
| 830 | 830 | par->new_mode_id = val; |
|---|
| 831 | 831 | retval = fb_set_var(info, &var); |
|---|
| 832 | | - info->flags &= ~FBINFO_MISC_USEREVENT; |
|---|
| 832 | + if (!retval) |
|---|
| 833 | + fbcon_update_vcs(info, var.activate & FB_ACTIVATE_ALL); |
|---|
| 833 | 834 | console_unlock(); |
|---|
| 834 | 835 | } |
|---|
| 835 | 836 | break; |
|---|
| .. | .. |
|---|
| 934 | 935 | } |
|---|
| 935 | 936 | |
|---|
| 936 | 937 | |
|---|
| 937 | | -static struct fb_ops ps3fb_ops = { |
|---|
| 938 | +static const struct fb_ops ps3fb_ops = { |
|---|
| 938 | 939 | .fb_open = ps3fb_open, |
|---|
| 939 | 940 | .fb_release = ps3fb_release, |
|---|
| 940 | 941 | .fb_read = fb_sys_read, |
|---|
| .. | .. |
|---|
| 1015 | 1016 | } |
|---|
| 1016 | 1017 | #endif |
|---|
| 1017 | 1018 | |
|---|
| 1018 | | - max_ps3fb_size = _ALIGN_UP(GPU_IOIF, 256*1024*1024) - GPU_IOIF; |
|---|
| 1019 | + max_ps3fb_size = ALIGN(GPU_IOIF, 256*1024*1024) - GPU_IOIF; |
|---|
| 1019 | 1020 | if (ps3fb_videomemory.size > max_ps3fb_size) { |
|---|
| 1020 | 1021 | dev_info(&dev->core, "Limiting ps3fb mem size to %lu bytes\n", |
|---|
| 1021 | 1022 | max_ps3fb_size); |
|---|