xf86-video-wsfb doesn't adjust pitch after mode setup

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

xf86-video-wsfb doesn't adjust pitch after mode setup

>Synopsis:      xf86-video-wsfb doesn't adjust pitch after mode setup
>Category:      system
        System      : OpenBSD 5.6
        Details     : OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8
00:20:21 MDT 2014

[hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64

        When ShadowFB is off, wsfb doesn't adjust the pitch after mode
was set. This leads to a garbled image on some video cards.
Fbdev currently does the following quirk:


if(fPtr->rotate==FBDEV_ROTATE_CW || fPtr->rotate==FBDEV_ROTATE_CCW)
} else if (!fPtr->shadowFB) {
/* FIXME: this doesn't work for all cases, e.g. when each scanline
has a padding which is independent from the depth (controlfb) */
pScrn->displayWidth = fbdevHWGetLineLength(pScrn) /
     (pScrn->bitsPerPixel / 8);

if (pScrn->displayWidth != pScrn->virtualX) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
  "Pitch updated to %d after ModeInit\n",

So something similar should be implemented.