NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/54167: Xorg wsfb server "Rotate" does not work on NetBSD 8.0



The following reply was made to PR xsrc/54167; it has been noted by GNATS.

From: Michael <macallan%netbsd.org@localhost>
To: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: xsrc/54167: Xorg wsfb server "Rotate" does not work on NetBSD
 8.0
Date: Tue, 17 Dec 2019 12:06:00 -0500

 Hello,
 
 On Wed, 18 Dec 2019 01:33:48 +0900
 Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
 
 > >Synopsis:       Xorg wsfb server "Rotate" does not work on NetBSD 8.0  
 > 
 > I've confirmed xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
 > rev 1.29 causes this problem in rotate cases:
 >  http://cvsweb.netbsd.org/bsdweb.cgi/xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c#rev1.29
 > 
 > >> support WSFB_VRAM_IS_SPLIT workaround for wildcat boards - use a shadow fb
 > >> and copy dirty areas into both framebuffers
 > >> now we can use X on Sun XVR-1200
 > >> should work on XVR-500 and others as well  
 > 
 > ---
 > @@ -957,8 +972,7 @@ WsfbScreenInit(SCREEN_INIT_ARGS_DECL)
 >  #endif
 >  
 >  	if (fPtr->shadowFB) {
 > -		fPtr->shadow = calloc(1, pScrn->virtualX * pScrn->virtualY *
 > -		    pScrn->bitsPerPixel/8);
 > +		fPtr->shadow = calloc(1, fPtr->fbi.fbi_stride * pScrn->virtualY);
 >  
 >  		if (!fPtr->shadow) {
 >  			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 > @@ -984,7 +998,9 @@ WsfbScreenInit(SCREEN_INIT_ARGS_DECL)
 >  		    fPtr->shadowFB ? fPtr->shadow : fPtr->fbstart,
 >  		    pScrn->virtualX, pScrn->virtualY,
 >  		    pScrn->xDpi, pScrn->yDpi,
 > -		    pScrn->displayWidth, pScrn->bitsPerPixel);
 > +		    /* apparently fb wants stride in pixels, not bytes */
 > +		    fPtr->fbi.fbi_stride / (pScrn->bitsPerPixel >> 3),
 > +		    pScrn->bitsPerPixel);
 >  		break;
 >  	default:
 >  		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 > ---
 > 
 > The following patch (use pScrn->virtualX instead of hardware fbi_stride
 > in "rotate" cases) fixes CW case on Zaurus SL-C1000 and SL-C3000.
 > 
 > Michael, could you confirm?
 
 I'll dig up the wildcat and test. If I can't get to it please go ahead
 and commit, I think your use case is far more common than mine.
 
 > -		    /* apparently fb wants stride in pixels, not bytes */
 
 There has to be a reason why I left that comment in there, I'll investigate.
 
 thanks
 Michael
 


Home | Main Index | Thread Index | Old Index