Commit 8ca0bf750b7d9b7e859f2f40516b914827e7afd8
Committed by
Linus Torvalds
1 parent
779121e9f1
ps3: Fix black and white stripes
Fix the black and white stripes issue with WUXGA monitor via HDMI. It seems that when we use a VESA resolution from boot up, the AV settings driver could not be initialized correctly. In that case we need a dummy packet before VESA setting. [Geert] Refactored to reduce code duplication. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> CC: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 38 additions and 20 deletions Side-by-side Diff
drivers/ps3/ps3av.c
... | ... | @@ -491,10 +491,10 @@ |
491 | 491 | return 0; |
492 | 492 | } |
493 | 493 | |
494 | -static void ps3av_set_videomode_cont(u32 id, u32 old_id) | |
494 | +static void ps3av_set_videomode_packet(u32 id) | |
495 | 495 | { |
496 | 496 | struct ps3av_pkt_avb_param avb_param; |
497 | - int i; | |
497 | + unsigned int i; | |
498 | 498 | u32 len = 0, av_video_cs; |
499 | 499 | const struct avset_video_mode *video_mode; |
500 | 500 | int res; |
... | ... | @@ -507,24 +507,6 @@ |
507 | 507 | ps3av->av_hw_conf.num_of_avmulti; |
508 | 508 | avb_param.num_of_av_audio_pkt = 0; |
509 | 509 | |
510 | - /* video signal off */ | |
511 | - ps3av_set_video_disable_sig(); | |
512 | - | |
513 | - /* Retail PS3 product doesn't support this */ | |
514 | - if (id & PS3AV_MODE_HDCP_OFF) { | |
515 | - res = ps3av_cmd_av_hdmi_mode(PS3AV_CMD_AV_HDMI_HDCP_OFF); | |
516 | - if (res == PS3AV_STATUS_UNSUPPORTED_HDMI_MODE) | |
517 | - dev_dbg(&ps3av->dev->core, "Not supported\n"); | |
518 | - else if (res) | |
519 | - dev_dbg(&ps3av->dev->core, | |
520 | - "ps3av_cmd_av_hdmi_mode failed\n"); | |
521 | - } else if (old_id & PS3AV_MODE_HDCP_OFF) { | |
522 | - res = ps3av_cmd_av_hdmi_mode(PS3AV_CMD_AV_HDMI_MODE_NORMAL); | |
523 | - if (res < 0 && res != PS3AV_STATUS_UNSUPPORTED_HDMI_MODE) | |
524 | - dev_dbg(&ps3av->dev->core, | |
525 | - "ps3av_cmd_av_hdmi_mode failed\n"); | |
526 | - } | |
527 | - | |
528 | 510 | /* video_pkt */ |
529 | 511 | for (i = 0; i < avb_param.num_of_video_pkt; i++) |
530 | 512 | len += ps3av_cmd_set_video_mode(&avb_param.buf[len], |
... | ... | @@ -555,6 +537,42 @@ |
555 | 537 | __func__); |
556 | 538 | else if (res) |
557 | 539 | dev_dbg(&ps3av->dev->core, "ps3av_cmd_avb_param failed\n"); |
540 | +} | |
541 | + | |
542 | +static void ps3av_set_videomode_cont(u32 id, u32 old_id) | |
543 | +{ | |
544 | + static int vesa = 0; | |
545 | + int res; | |
546 | + | |
547 | + /* video signal off */ | |
548 | + ps3av_set_video_disable_sig(); | |
549 | + | |
550 | + /* | |
551 | + * AV backend needs non-VESA mode setting at least one time | |
552 | + * when VESA mode is used. | |
553 | + */ | |
554 | + if (vesa == 0 && (id & PS3AV_MODE_MASK) >= 11) { | |
555 | + /* vesa mode */ | |
556 | + ps3av_set_videomode_packet(2); /* 480P */ | |
557 | + } | |
558 | + vesa = 1; | |
559 | + | |
560 | + /* Retail PS3 product doesn't support this */ | |
561 | + if (id & PS3AV_MODE_HDCP_OFF) { | |
562 | + res = ps3av_cmd_av_hdmi_mode(PS3AV_CMD_AV_HDMI_HDCP_OFF); | |
563 | + if (res == PS3AV_STATUS_UNSUPPORTED_HDMI_MODE) | |
564 | + dev_dbg(&ps3av->dev->core, "Not supported\n"); | |
565 | + else if (res) | |
566 | + dev_dbg(&ps3av->dev->core, | |
567 | + "ps3av_cmd_av_hdmi_mode failed\n"); | |
568 | + } else if (old_id & PS3AV_MODE_HDCP_OFF) { | |
569 | + res = ps3av_cmd_av_hdmi_mode(PS3AV_CMD_AV_HDMI_MODE_NORMAL); | |
570 | + if (res < 0 && res != PS3AV_STATUS_UNSUPPORTED_HDMI_MODE) | |
571 | + dev_dbg(&ps3av->dev->core, | |
572 | + "ps3av_cmd_av_hdmi_mode failed\n"); | |
573 | + } | |
574 | + | |
575 | + ps3av_set_videomode_packet(id); | |
558 | 576 | |
559 | 577 | msleep(1500); |
560 | 578 | /* av video mute */ |