aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ps3/ps3av.c42
-rw-r--r--drivers/ps3/ps3av_cmd.c20
2 files changed, 29 insertions, 33 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 5a418b1b1659..1393e64335f9 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr)
176 else 176 else
177 printk(KERN_ERR 177 printk(KERN_ERR
178 "%s: failed event packet, cid:%08x size:%d\n", 178 "%s: failed event packet, cid:%08x size:%d\n",
179 __FUNCTION__, hdr->cid, hdr->size); 179 __func__, hdr->cid, hdr->size);
180 return 1; /* receive event packet */ 180 return 1; /* receive event packet */
181 } 181 }
182 return 0; 182 return 0;
@@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
198 if (res < 0) { 198 if (res < 0) {
199 dev_dbg(&ps3av_dev.core, 199 dev_dbg(&ps3av_dev.core,
200 "%s: ps3av_vuart_write() failed (result=%d)\n", 200 "%s: ps3av_vuart_write() failed (result=%d)\n",
201 __FUNCTION__, res); 201 __func__, res);
202 return res; 202 return res;
203 } 203 }
204 204
@@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
211 if (res != PS3AV_HDR_SIZE) { 211 if (res != PS3AV_HDR_SIZE) {
212 dev_dbg(&ps3av_dev.core, 212 dev_dbg(&ps3av_dev.core,
213 "%s: ps3av_vuart_read() failed (result=%d)\n", 213 "%s: ps3av_vuart_read() failed (result=%d)\n",
214 __FUNCTION__, res); 214 __func__, res);
215 return res; 215 return res;
216 } 216 }
217 217
@@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
221 if (res < 0) { 221 if (res < 0) {
222 dev_dbg(&ps3av_dev.core, 222 dev_dbg(&ps3av_dev.core,
223 "%s: ps3av_vuart_read() failed (result=%d)\n", 223 "%s: ps3av_vuart_read() failed (result=%d)\n",
224 __FUNCTION__, res); 224 __func__, res);
225 return res; 225 return res;
226 } 226 }
227 res += PS3AV_HDR_SIZE; /* total len */ 227 res += PS3AV_HDR_SIZE; /* total len */
@@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
231 231
232 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) { 232 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
233 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n", 233 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
234 __FUNCTION__, recv_buf->cid); 234 __func__, recv_buf->cid);
235 return -EINVAL; 235 return -EINVAL;
236 } 236 }
237 237
@@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
293 if (res < 0) { 293 if (res < 0) {
294 printk(KERN_ERR 294 printk(KERN_ERR
295 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n", 295 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
296 __FUNCTION__, res); 296 __func__, res);
297 goto err; 297 goto err;
298 } 298 }
299 299
@@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
302 usr_buf_size); 302 usr_buf_size);
303 if (res < 0) { 303 if (res < 0) {
304 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n", 304 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
305 __FUNCTION__, res); 305 __func__, res);
306 goto err; 306 goto err;
307 } 307 }
308 308
@@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
311 311
312 err: 312 err:
313 mutex_unlock(&ps3av.mutex); 313 mutex_unlock(&ps3av.mutex);
314 printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res); 314 printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
315 return res; 315 return res;
316} 316}
317 317
@@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
522 if (res == PS3AV_STATUS_NO_SYNC_HEAD) 522 if (res == PS3AV_STATUS_NO_SYNC_HEAD)
523 printk(KERN_WARNING 523 printk(KERN_WARNING
524 "%s: Command failed. Please try your request again. \n", 524 "%s: Command failed. Please try your request again. \n",
525 __FUNCTION__); 525 __func__);
526 else if (res) 526 else if (res)
527 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n"); 527 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");
528 528
@@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot)
715 715
716 size = ARRAY_SIZE(video_mode_table); 716 size = ARRAY_SIZE(video_mode_table);
717 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) { 717 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
718 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__, 718 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
719 id);
720 return -EINVAL; 719 return -EINVAL;
721 } 720 }
722 721
@@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot)
725 if ((id & PS3AV_MODE_MASK) == 0) { 724 if ((id & PS3AV_MODE_MASK) == 0) {
726 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot); 725 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
727 if (id < 1) { 726 if (id < 1) {
728 printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__, 727 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
729 id);
730 return -EINVAL; 728 return -EINVAL;
731 } 729 }
732 id |= option; 730 id |= option;
@@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id)
786 id = id & PS3AV_MODE_MASK; 784 id = id & PS3AV_MODE_MASK;
787 size = ARRAY_SIZE(video_mode_table); 785 size = ARRAY_SIZE(video_mode_table);
788 if (id > size - 1 || id < 0) { 786 if (id > size - 1 || id < 0) {
789 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 787 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
790 return -EINVAL; 788 return -EINVAL;
791 } 789 }
792 return video_mode_table[id].interlace; 790 return video_mode_table[id].interlace;
@@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
801 id = id & PS3AV_MODE_MASK; 799 id = id & PS3AV_MODE_MASK;
802 size = ARRAY_SIZE(video_mode_table); 800 size = ARRAY_SIZE(video_mode_table);
803 if (id > size - 1 || id < 0) { 801 if (id > size - 1 || id < 0) {
804 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 802 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
805 return -EINVAL; 803 return -EINVAL;
806 } 804 }
807 return video_mode_table[id].freq; 805 return video_mode_table[id].freq;
@@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
817 id = id & PS3AV_MODE_MASK; 815 id = id & PS3AV_MODE_MASK;
818 size = ARRAY_SIZE(video_mode_table); 816 size = ARRAY_SIZE(video_mode_table);
819 if (id > size - 1 || id < 0) { 817 if (id > size - 1 || id < 0) {
820 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 818 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
821 return -EINVAL; 819 return -EINVAL;
822 } 820 }
823 *xres = video_mode_table[id].x; 821 *xres = video_mode_table[id].x;
@@ -853,7 +851,7 @@ int ps3av_dev_open(void)
853 status = lv1_gpu_open(0); 851 status = lv1_gpu_open(0);
854 if (status) { 852 if (status) {
855 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n", 853 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
856 __FUNCTION__, status); 854 __func__, status);
857 ps3av.open_count--; 855 ps3av.open_count--;
858 } 856 }
859 } 857 }
@@ -870,13 +868,13 @@ int ps3av_dev_close(void)
870 868
871 mutex_lock(&ps3av.mutex); 869 mutex_lock(&ps3av.mutex);
872 if (ps3av.open_count <= 0) { 870 if (ps3av.open_count <= 0) {
873 printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__); 871 printk(KERN_ERR "%s: GPU already closed\n", __func__);
874 status = -1; 872 status = -1;
875 } else if (!--ps3av.open_count) { 873 } else if (!--ps3av.open_count) {
876 status = lv1_gpu_close(); 874 status = lv1_gpu_close();
877 if (status) 875 if (status)
878 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n", 876 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
879 __FUNCTION__, status); 877 __func__, status);
880 } 878 }
881 mutex_unlock(&ps3av.mutex); 879 mutex_unlock(&ps3av.mutex);
882 880
@@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
926 /* init avsetting modules */ 924 /* init avsetting modules */
927 res = ps3av_cmd_init(); 925 res = ps3av_cmd_init();
928 if (res < 0) 926 if (res < 0)
929 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__, 927 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
930 res); 928 res);
931 929
932 ps3av_get_hw_conf(&ps3av); 930 ps3av_get_hw_conf(&ps3av);
@@ -978,7 +976,7 @@ static int ps3av_module_init(void)
978 if (error) { 976 if (error) {
979 printk(KERN_ERR 977 printk(KERN_ERR
980 "%s: ps3_vuart_port_driver_register failed %d\n", 978 "%s: ps3_vuart_port_driver_register failed %d\n",
981 __FUNCTION__, error); 979 __func__, error);
982 return error; 980 return error;
983 } 981 }
984 982
@@ -986,7 +984,7 @@ static int ps3av_module_init(void)
986 if (error) 984 if (error)
987 printk(KERN_ERR 985 printk(KERN_ERR
988 "%s: ps3_vuart_port_device_register failed %d\n", 986 "%s: ps3_vuart_port_device_register failed %d\n",
989 __FUNCTION__, error); 987 __func__, error);
990 988
991 return error; 989 return error;
992} 990}
diff --git a/drivers/ps3/ps3av_cmd.c b/drivers/ps3/ps3av_cmd.c
index bc70e81f8cb0..0145ea173c42 100644
--- a/drivers/ps3/ps3av_cmd.c
+++ b/drivers/ps3/ps3av_cmd.c
@@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u32 head, int video_vid, int video_fmt,
395 video_mode->video_order = ps3av_video_fmt_table[video_fmt].order; 395 video_mode->video_order = ps3av_video_fmt_table[video_fmt].order;
396 396
397 pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n", 397 pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
398 __FUNCTION__, video_vid, video_mode->width, video_mode->height, 398 __func__, video_vid, video_mode->width, video_mode->height,
399 video_mode->pitch, video_mode->video_out_format, 399 video_mode->pitch, video_mode->video_out_format,
400 video_mode->video_format, video_mode->video_order); 400 video_mode->video_format, video_mode->video_order);
401 return sizeof(*video_mode); 401 return sizeof(*video_mode);
@@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs)
477 if (ps3av_cnv_mclk_table[i].fs == fs) 477 if (ps3av_cnv_mclk_table[i].fs == fs)
478 return ps3av_cnv_mclk_table[i].mclk; 478 return ps3av_cnv_mclk_table[i].mclk;
479 479
480 printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); 480 printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
481 return 0; 481 return 0;
482} 482}
483 483
@@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
526 d = 4; 526 d = 4;
527 break; 527 break;
528 default: 528 default:
529 printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__, 529 printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid);
530 video_vid);
531 break; 530 break;
532 } 531 }
533 532
534 if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K) 533 if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K)
535 printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); 534 printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
536 else 535 else
537 ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d]; 536 ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d];
538 537
@@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, const u8 *enable)
555 ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) | 554 ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) |
556 0x01; 555 0x01;
557 } else 556 } else
558 printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__, 557 printk(KERN_ERR "%s failed, source:%x\n", __func__, source);
559 source);
560 return ret; 558 return ret;
561} 559}
562 560
@@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
585 ret = PS3AV_CMD_AV_INPUTLEN_24; 583 ret = PS3AV_CMD_AV_INPUTLEN_24;
586 break; 584 break;
587 default: 585 default:
588 printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__, 586 printk(KERN_ERR "%s failed, word_bits:%x\n", __func__,
589 word_bits); 587 word_bits);
590 break; 588 break;
591 } 589 }
@@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
595static u8 ps3av_cnv_layout(u32 num_of_ch) 593static u8 ps3av_cnv_layout(u32 num_of_ch)
596{ 594{
597 if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) { 595 if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) {
598 printk(KERN_ERR "%s failed, num_of_ch:%x\n", __FUNCTION__, 596 printk(KERN_ERR "%s failed, num_of_ch:%x\n", __func__,
599 num_of_ch); 597 num_of_ch);
600 return 0; 598 return 0;
601 } 599 }
@@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len)
864 862
865 res = get_status(avb); 863 res = get_status(avb);
866 if (res) 864 if (res)
867 pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __FUNCTION__, 865 pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __func__,
868 res); 866 res);
869 867
870 out: 868 out:
@@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
1013 return size; 1011 return size;
1014 if (error != -EAGAIN) { 1012 if (error != -EAGAIN) {
1015 printk(KERN_ERR "%s: ps3_vuart_read failed %d\n", 1013 printk(KERN_ERR "%s: ps3_vuart_read failed %d\n",
1016 __FUNCTION__, error); 1014 __func__, error);
1017 return error; 1015 return error;
1018 } 1016 }
1019 msleep(POLLING_INTERVAL); 1017 msleep(POLLING_INTERVAL);