mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 09:50:07 +01:00
Merge branch 'vidmode-resize-fb' into 'master'
WIP: vidmode: Let the driver resize the framebuffer when switching modes See merge request xorg/xserver!113
This commit is contained in:
commit
1a0da2f677
1 changed files with 6 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include "os.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
#include "xf86Crtc.h"
|
||||
#include "extinit.h"
|
||||
|
||||
#ifdef XF86VIDMODE
|
||||
|
|
@ -247,11 +248,16 @@ xf86VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
|
|||
{
|
||||
ScrnInfoPtr pScrn;
|
||||
DisplayModePtr pTmpMode;
|
||||
xf86CrtcConfigPtr config;
|
||||
Bool retval;
|
||||
|
||||
pScrn = xf86ScreenToScrn(pScreen);
|
||||
/* save in case we fail */
|
||||
pTmpMode = pScrn->currentMode;
|
||||
/* let the driver resize the framebuffer */
|
||||
config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
if (!(*config->funcs->resize) (pScrn, mode->HDisplay, mode->VDisplay))
|
||||
return FALSE;
|
||||
/* Force a mode switch */
|
||||
pScrn->currentMode = NULL;
|
||||
retval = xf86SwitchMode(pScrn->pScreen, mode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue