Add function for drivers to change RandR's idea of the virtual screen size.
(This allows drivers to reserve a larger virtual size at start and
    change it later)
			
			
This commit is contained in:
		
							parent
							
								
									e921eec1c6
								
							
						
					
					
						commit
						fdbb3ea609
					
				| 
						 | 
				
			
			@ -140,7 +140,7 @@ int xf86GetPciEntity(int bus, int dev, int func);
 | 
			
		|||
Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
 | 
			
		||||
			EntityProc enter, EntityProc leave, pointer);
 | 
			
		||||
void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type);
 | 
			
		||||
resPtr xf86RegisterResources(int entityIndex, resList list, 
 | 
			
		||||
resPtr xf86RegisterResources(int entityIndex, resList list,
 | 
			
		||||
			     unsigned long Access);
 | 
			
		||||
Bool xf86CheckPciMemBase(pciVideoPtr pPci, memType base);
 | 
			
		||||
void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs,
 | 
			
		||||
| 
						 | 
				
			
			@ -192,7 +192,7 @@ GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus,
 | 
			
		|||
				    void *busData, int chipset);
 | 
			
		||||
GDevPtr xf86AddDeviceToConfigure(const char *driver, pciVideoPtr pVideo,
 | 
			
		||||
				 int chipset);
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
/* xf86Cursor.c */
 | 
			
		||||
 | 
			
		||||
void xf86LockZoom(ScreenPtr pScreen, int lock);
 | 
			
		||||
| 
						 | 
				
			
			@ -203,14 +203,14 @@ Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
 | 
			
		|||
void *xf86GetPointerScreenFuncs(void);
 | 
			
		||||
void xf86InitOrigins(void);
 | 
			
		||||
void xf86ReconfigureLayout(void);
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
/* xf86DPMS.c */
 | 
			
		||||
 | 
			
		||||
Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags);
 | 
			
		||||
 | 
			
		||||
/* xf86DGA.c */
 | 
			
		||||
 | 
			
		||||
Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, 
 | 
			
		||||
Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes,
 | 
			
		||||
			int num);
 | 
			
		||||
Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num);
 | 
			
		||||
xf86SetDGAModeProc xf86SetDGAMode;
 | 
			
		||||
| 
						 | 
				
			
			@ -262,7 +262,7 @@ void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
 | 
			
		|||
void xf86PrintChipsets(const char *drvname, const char *drvmsg,
 | 
			
		||||
		       SymTabPtr chips);
 | 
			
		||||
int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist);
 | 
			
		||||
int xf86MatchPciInstances(const char *driverName, int vendorID, 
 | 
			
		||||
int xf86MatchPciInstances(const char *driverName, int vendorID,
 | 
			
		||||
		      SymTabPtr chipsets, PciChipsets *PCIchipsets,
 | 
			
		||||
		      GDevPtr *devList, int numDevs, DriverPtr drvp,
 | 
			
		||||
		      int **foundEntities);
 | 
			
		||||
| 
						 | 
				
			
			@ -325,10 +325,10 @@ ScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, int scrnFlag,
 | 
			
		|||
				int entityIndex, IsaChipsets *i_chip,
 | 
			
		||||
				resList res, EntityProc init,
 | 
			
		||||
				EntityProc enter, EntityProc leave,
 | 
			
		||||
				pointer private); 
 | 
			
		||||
ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, 
 | 
			
		||||
			       int entityIndex, EntityProc init, 
 | 
			
		||||
			       EntityProc enter, EntityProc leave, 
 | 
			
		||||
				pointer private);
 | 
			
		||||
ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
 | 
			
		||||
			       int entityIndex, EntityProc init,
 | 
			
		||||
			       EntityProc enter, EntityProc leave,
 | 
			
		||||
			       pointer private);
 | 
			
		||||
/* Obsolete! don't use */
 | 
			
		||||
Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
 | 
			
		||||
| 
						 | 
				
			
			@ -341,7 +341,7 @@ Bool xf86ConfigActiveIsaEntity(ScrnInfoPtr pScrn,
 | 
			
		|||
				int entityIndex, IsaChipsets *i_chip,
 | 
			
		||||
				resList res, EntityProc init,
 | 
			
		||||
				EntityProc enter, EntityProc leave,
 | 
			
		||||
				pointer private); 
 | 
			
		||||
				pointer private);
 | 
			
		||||
void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip,
 | 
			
		||||
				 resList res, EntityProc init,
 | 
			
		||||
				 EntityProc enter, EntityProc leave,
 | 
			
		||||
| 
						 | 
				
			
			@ -350,8 +350,8 @@ void xf86ConfigIsaEntityInactive(EntityInfoPtr pEnt, IsaChipsets *i_chip,
 | 
			
		|||
				 resList res, EntityProc init,
 | 
			
		||||
				 EntityProc enter, EntityProc leave,
 | 
			
		||||
				 pointer private);
 | 
			
		||||
void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, 
 | 
			
		||||
				EntityProc enter, EntityProc leave, 
 | 
			
		||||
void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
 | 
			
		||||
				EntityProc enter, EntityProc leave,
 | 
			
		||||
				pointer private);
 | 
			
		||||
Bool xf86IsScreenPrimary(int scrnIndex);
 | 
			
		||||
int  xf86RegisterRootWindowProperty(int ScrnIndex, Atom	property, Atom type,
 | 
			
		||||
| 
						 | 
				
			
			@ -384,7 +384,7 @@ void xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v);
 | 
			
		|||
extern void xf86SPTimestamp(xf86TsPtr* timestamp, char* string);
 | 
			
		||||
extern void xf86STimestamp(xf86TsPtr* timestamp);
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
/* xf86Init.c */
 | 
			
		||||
 | 
			
		||||
PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
 | 
			
		||||
| 
						 | 
				
			
			@ -427,6 +427,9 @@ void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts);
 | 
			
		|||
Bool xf86RandRInit (ScreenPtr    pScreen);
 | 
			
		||||
void xf86RandRSetInitialMode (ScreenPtr pScreen);
 | 
			
		||||
Rotation xf86GetRotation(ScreenPtr pScreen);
 | 
			
		||||
Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
 | 
			
		||||
			int newvirtX, int newvirtY,
 | 
			
		||||
			int newmmWidth, int newmmHeight, Bool resetMode);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* xf86VidModeExtentionInit.c */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -326,6 +326,44 @@ xf86GetRotation(ScreenPtr pScreen)
 | 
			
		|||
    return XF86RANDRINFO(pScreen)->rotation;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Function to change RandR's idea of the virtual screen size */
 | 
			
		||||
Bool
 | 
			
		||||
xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
 | 
			
		||||
	int newvirtX, int newvirtY, int newmmWidth, int newmmHeight,
 | 
			
		||||
	Bool resetMode)
 | 
			
		||||
{
 | 
			
		||||
    XF86RandRInfoPtr randrp;
 | 
			
		||||
 | 
			
		||||
    if (xf86RandRIndex == -1)
 | 
			
		||||
	return FALSE;
 | 
			
		||||
 | 
			
		||||
    randrp = XF86RANDRINFO(pScreen);
 | 
			
		||||
    if (randrp == NULL)
 | 
			
		||||
	return FALSE;
 | 
			
		||||
 | 
			
		||||
    if (newvirtX > 0)
 | 
			
		||||
	randrp->virtualX = newvirtX;
 | 
			
		||||
 | 
			
		||||
    if (newvirtY > 0)
 | 
			
		||||
	randrp->virtualY = newvirtY;
 | 
			
		||||
 | 
			
		||||
    if (newmmWidth > 0)
 | 
			
		||||
	randrp->mmWidth = newmmWidth;
 | 
			
		||||
 | 
			
		||||
    if (newmmHeight > 0)
 | 
			
		||||
	randrp->mmHeight = newmmHeight;
 | 
			
		||||
 | 
			
		||||
    /* This is only for during server start */
 | 
			
		||||
    if (resetMode) {
 | 
			
		||||
	return (xf86RandRSetMode(pScreen,
 | 
			
		||||
		  XF86SCRNINFO(pScreen)->currentMode,
 | 
			
		||||
		  TRUE,
 | 
			
		||||
		  pScreen->mmWidth, pScreen->mmHeight));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Bool
 | 
			
		||||
xf86RandRInit (ScreenPtr    pScreen)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -373,3 +411,5 @@ xf86RandRInit (ScreenPtr    pScreen)
 | 
			
		|||
    pScreen->devPrivates[xf86RandRIndex].ptr = randrp;
 | 
			
		||||
    return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue