FW: xf86 vid mode extensions incorrectly report screen sizes when using wsfb and rotate landscape

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FW: xf86 vid mode extensions incorrectly report screen sizes when using wsfb and rotate landscape

asmith-4
-----Original Message-----
From: Andrew Smith [mailto:[hidden email]]
Sent: 09 February 2006 23:34
To: 'Matthieu Herrb'
Subject: RE: xf86 vid mode extensions incorrectly report screen sizes when
using wsfb and rotate landscape

Matthieu,

I have a feeling they will tell me to implement XrandR and petition the
libSDL folk to implement rotation checks based upon XrandR :P

I will have a think about fixing this somehow.

- Andy

-----Original Message-----
From: Matthieu Herrb [mailto:[hidden email]]
Sent: 09 February 2006 20:29
To: Andrew Smith
Cc: [hidden email]
Subject: Re: xf86 vid mode extensions incorrectly report screen sizes when
using wsfb and rotate landscape

Andrew Smith wrote:
> Apologies if this does come through on the bug queue itself, it's the
> first time I used sendbug and I'm not sure if I need to configure the
> box in anyway before using it.
>
> I thought the problem was important enough not to be missed so please
> excuse the duplication (if any).

Apparently your message didn't make it to the gnats database. Only to
tech@.

> - Andy
>
> SENDBUG: -*- sendbug -*-
> SENDBUG: Lines starting with `SENDBUG' will be removed automatically, as
> SENDBUG: will all comments (text enclosed in `<' and `>').
> SENDBUG:
> SENDBUG: Choose from the following categories:
> SENDBUG:
> SENDBUG: system user library documentation ports kernel alpha amd64 arm
> i386 m68k m88k mips ppc sgi sparc sparc64 vax
> SENDBUG:
> SENDBUG:
> To: [hidden email]
> Subject:
> From: [hidden email]
> Cc:
> Reply-To: [hidden email]
> X-sendbug-version: 3.97
>
>
>> Submitter-Id:  andys
>> Originator:    Andrew Smith
>> Organization:
> none
>> Synopsis:      xf86 vid mode extensions incorrectly report screen sizes
>> Severity:      serious
>> Priority:      medium
>> Category:      library
>> Class:         sw-bug
>> Release:       3.9 beta from snapshot tarballs of X dated 02/03/06
>> Environment:
>         System      : OpenBSD 3.9
>         Architecture: OpenBSD.arm
>         Machine     : zaurus
>         Library     : xf86vm from Xorg 6.9 and wsfb driver
>> Description:
>         When using the wsfb driver on the Zaurus the default parameters
> must
>         state Option "Rotate" "CCW" which causes rotation from the
> default
>         portrait mode to landscape.
>
>         Although the basic Xlib DisplayWidth and DisplayHeight calls
> return
>         the rotated screen co-ordinates (640x480) if an application or
> library
>         calls the XFVidMode extensions to enumerate display mode lines
>         (i.e. XF86VidModeGetAllModeLines) the geometry is returned
> untranslated
>         i.e. 480x640.
>
>         This has a particular effect on libSDL since in full screen the
> layout
>         is returned by this call to the applications and typically this
> causes
>         layout problems. (for example ScummVM will centre the display
>         vertically and since it is using 640 returned as the display
> height
>         the display starts midscreen and ends off screen)
>> How-To-Repeat:
>         Functional examples of SDL failures are :-
>
>         i. run scummvm -f (for fullscreen).
>         ii. run testwm with the -fullscreen option (from the sdl test
> directory)
>         Evidence of the nature of the issue...
>         Compile and run this short test program
>
> #include <stdio.h>
> #include <X11/Xlib.h>
> #include <X11/extensions/xf86vmode.h>
>
> main()
> {
>         Display* dpy;
>         int nXScreen;
>         int nWidth,nHeight;
>         int vm_event, vm_error, vm_major, vm_minor;
>         int vm_modecount;
>         XF86VidModeModeInfo **pModeLines;
>         int nCounter;
>
>         if (dpy=XOpenDisplay(NULL)) {
>
>
> /* Perform a basic X co-ordinate check first */
>
>                 nXScreen=XDefaultScreen(dpy);
>                 nWidth=DisplayWidth(dpy,nXScreen);
>                 nHeight=DisplayHeight(dpy,nXScreen);
>                 printf("Basic X11 calls - Display WIDTH = %d, Display
> HEIGHT = %d\n", \
>                                 nWidth,nHeight);
>
> /* Now we move onto the XF86VidMode extension for full screen */
>
>                 if (XF86VidModeQueryExtension(dpy,&vm_event,&vm_error))
> {
>
> XF86VidModeQueryVersion(dpy,&vm_major,&vm_minor);
>                         printf("XF86 VidMode extension version %d.%d\n",
> \
>                                 vm_major,vm_minor);
>                         if (XF86VidModeGetAllModeLines(dpy,nXScreen,
> &vm_modecount, \
>                                 &pModeLines)) {
>                                         printf("XF86 available extended
> VidModes\n");
>                                         for
> (nCounter=0;nCounter<vm_modecount;nCounter++)
>                                                 printf("Mode %d :
> Display WIDTH
> = %d, Display HEIGHT = %d\n", \
>                                                         nCounter,
> pModeLines[nCounter]->hdisplay, \
>
> pModeLines[nCounter]->vdisplay);
>                         } else {
>                                 printf("Failed to get extended video
> modes\n");
>                         }
>
>                 } else {
>                         printf("XF86 VidMode extension not supported
> \n");
>                 }
>
>                 XCloseDisplay(dpy);
>         } else {
>                 printf("Couldn't open the display, please make sure \
>                         DISPLAY variable is set\n");
>         }
> }
>
>         Output on Zaurus running in default (landscape mode)..
>
>         Basic X11 calls - Display WIDTH = 640, Display HEIGHT = 480
>         XF86 VidMode extension version 2.2
>         XF86 available extended VidModes
>         Mode 0 : Display WIDTH = 480, Height = 640
>
>         Output on Zaurus running in portrait mode..
>
>         Basic X11 calls - Display WIDTH = 480, Display HEIGHT = 640
>
>
>         XF86 VidMode extension version 2.2
>         XF86 available extended VidModes
>         Mode 0 : Display WIDTH = 480, Height = 640
>> Fix:
>         Correct geometry reporting from the XF86 extensions, may require
> that
>         either wsfb always reports translated geometry or that specific
> handling        added to Xorgs xf86 entensions.
>
>
>
This is not specific to wsfb. It's a general bug/feature in X.Org.
Please file a report in X.Org's bugzilla,
<https://bugs.freedesktop.org/>, choose 'xorg' as the product.

Thank you.
--
Matthieu Herrb