diff options
Diffstat (limited to 'drivers/ps3/ps3av.c')
-rw-r--r-- | drivers/ps3/ps3av.c | 58 |
1 files changed, 13 insertions, 45 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 87b3493d88e5..9671d0cd18c6 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
@@ -78,23 +78,21 @@ static const struct avset_video_mode { | |||
78 | u32 aspect; | 78 | u32 aspect; |
79 | u32 x; | 79 | u32 x; |
80 | u32 y; | 80 | u32 y; |
81 | u32 interlace; | ||
82 | u32 freq; | ||
83 | } video_mode_table[] = { | 81 | } video_mode_table[] = { |
84 | { 0, }, /* auto */ | 82 | { 0, }, /* auto */ |
85 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480I, A_N, 720, 480, 1, 60}, | 83 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480I, A_N, 720, 480}, |
86 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480P, A_N, 720, 480, 0, 60}, | 84 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_480P, A_N, 720, 480}, |
87 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_60HZ, A_N, 1280, 720, 0, 60}, | 85 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_60HZ, A_N, 1280, 720}, |
88 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_60HZ, A_W, 1920, 1080, 1, 60}, | 86 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_60HZ, A_W, 1920, 1080}, |
89 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_60HZ, A_W, 1920, 1080, 0, 60}, | 87 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_60HZ, A_W, 1920, 1080}, |
90 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576I, A_N, 720, 576, 1, 50}, | 88 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576I, A_N, 720, 576}, |
91 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576P, A_N, 720, 576, 0, 50}, | 89 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_576P, A_N, 720, 576}, |
92 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_50HZ, A_N, 1280, 720, 0, 50}, | 90 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_720P_50HZ, A_N, 1280, 720}, |
93 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_50HZ, A_W, 1920, 1080, 1, 50}, | 91 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080I_50HZ, A_W, 1920, 1080}, |
94 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_50HZ, A_W, 1920, 1080, 0, 50}, | 92 | {YUV444, XRGB, PS3AV_CMD_VIDEO_VID_1080P_50HZ, A_W, 1920, 1080}, |
95 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WXGA, A_W, 1280, 768, 0, 60}, | 93 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WXGA, A_W, 1280, 768}, |
96 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_SXGA, A_N, 1280, 1024, 0, 60}, | 94 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_SXGA, A_N, 1280, 1024}, |
97 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WUXGA, A_W, 1920, 1200, 0, 60}, | 95 | { RGB8, XRGB, PS3AV_CMD_VIDEO_VID_WUXGA, A_W, 1920, 1200}, |
98 | }; | 96 | }; |
99 | 97 | ||
100 | /* supported CIDs */ | 98 | /* supported CIDs */ |
@@ -889,36 +887,6 @@ int ps3av_get_mode(void) | |||
889 | 887 | ||
890 | EXPORT_SYMBOL_GPL(ps3av_get_mode); | 888 | EXPORT_SYMBOL_GPL(ps3av_get_mode); |
891 | 889 | ||
892 | int ps3av_get_scanmode(int id) | ||
893 | { | ||
894 | int size; | ||
895 | |||
896 | id = id & PS3AV_MODE_MASK; | ||
897 | size = ARRAY_SIZE(video_mode_table); | ||
898 | if (id > size - 1 || id < 0) { | ||
899 | printk(KERN_ERR "%s: invalid mode %d\n", __func__, id); | ||
900 | return -EINVAL; | ||
901 | } | ||
902 | return video_mode_table[id].interlace; | ||
903 | } | ||
904 | |||
905 | EXPORT_SYMBOL_GPL(ps3av_get_scanmode); | ||
906 | |||
907 | int ps3av_get_refresh_rate(int id) | ||
908 | { | ||
909 | int size; | ||
910 | |||
911 | id = id & PS3AV_MODE_MASK; | ||
912 | size = ARRAY_SIZE(video_mode_table); | ||
913 | if (id > size - 1 || id < 0) { | ||
914 | printk(KERN_ERR "%s: invalid mode %d\n", __func__, id); | ||
915 | return -EINVAL; | ||
916 | } | ||
917 | return video_mode_table[id].freq; | ||
918 | } | ||
919 | |||
920 | EXPORT_SYMBOL_GPL(ps3av_get_refresh_rate); | ||
921 | |||
922 | /* get resolution by video_mode */ | 890 | /* get resolution by video_mode */ |
923 | int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres) | 891 | int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres) |
924 | { | 892 | { |