Skip to content

Commit 38c38ed

Browse files
Merge pull request #3 from techflashYT/v4.4
full gcnfb fix
2 parents 705fe3b + 6a136dc commit 38c38ed

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

drivers/video/fbdev/gcnfb.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ static inline uint32_t rgbrgb16toycbycr(uint16_t rgb1, uint16_t rgb2)
599599
return 0x00800080; /* black, black */
600600

601601
/* RGB565 */
602-
r1 = ((rgb1 >> 11) & 0x1f);
602+
r1 = ((rgb1 >> 0) & 0x1f);
603603
g1 = ((rgb1 >> 5) & 0x3f);
604-
b1 = ((rgb1 >> 0) & 0x1f);
604+
b1 = ((rgb1 >> 11) & 0x1f);
605605

606606
/* fast (approximated) scaling to 8 bits, thanks to Masken */
607607
r1 = (r1 << 3) | (r1 >> 2);
@@ -618,9 +618,9 @@ static inline uint32_t rgbrgb16toycbycr(uint16_t rgb1, uint16_t rgb2)
618618
b = b1;
619619
} else {
620620
/* same as we did for r1 before */
621-
r2 = ((rgb2 >> 11) & 0x1f);
621+
r2 = ((rgb2 >> 0) & 0x1f);
622622
g2 = ((rgb2 >> 5) & 0x3f);
623-
b2 = ((rgb2 >> 0) & 0x1f);
623+
b2 = ((rgb2 >> 11) & 0x1f);
624624
r2 = (r2 << 3) | (r2 >> 2);
625625
g2 = (g2 << 2) | (g2 >> 4);
626626
b2 = (b2 << 3) | (b2 >> 2);
@@ -2006,17 +2006,16 @@ static int vifb_do_probe(struct device *dev,
20062006
vi_reset_video(ctl);
20072007
vi_detect_tv_mode(ctl);
20082008

2009-
if (!nostalgic) {
2010-
/* by default, start with overscan compensation */
2011-
info->var.xres = 576;
2012-
if (ctl->mode->height == 574)
2013-
info->var.yres = 516;
2014-
else
2015-
info->var.yres = 432;
2016-
} else {
2017-
info->var.xres = ctl->mode->width;
2018-
info->var.yres = ctl->mode->height;
2009+
info->var.xres = ctl->mode->width;
2010+
info->var.yres = ctl->mode->height;
2011+
2012+
if (info->var.yres > 448) {
2013+
info->var.yres = 448;
2014+
}
2015+
if (info->var.height > 448) {
2016+
info->var.height = 448;
20192017
}
2018+
// info->var.width;
20202019

20212020
ctl->visible_page = 0;
20222021
ctl->flip_pending = 0;

0 commit comments

Comments
 (0)