DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers
need to include dpmsconst.h if xextproto 7.1 is available.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Previously maxxfbmem had to be configured by the user via xorg.conf in
order for DRI to work. maxxfbmem is now set to the required size for
the virtual display. This allows DRI to work without additional user
intervention.
In addition, code was added to detect the case there no additional
framebuffer memory is available. In this case, DRI is disabled. This
prevents mysterious lock-ups when trying to use DRI without video
memory for back buffers, etc.
Move code that selects the maximum wait iterations out of Volari_Wait
into Volari_SetDefaultIdleWait. This function is called from
XGIModeInit. The win here is that we can eliminate the Current*
global variables.
Previously DRI was only enabled when XGIfb was available. This was
done because XGIfb was the only place that initialized the framebuffer
memory manager. However, there is an ioctl for this purpose. Code
was added to xgi_dri.c to call this ioctl.
This matches the way the SiS driver works.
Replace all the tests of DualHeadMode and SecondHead with macros that
evaluate to FALSE when XGIDUALHEAD is not set. This allows the
elimination of many of the occurances of '#ifdef XGIDUALHEAD' in the
code.
There are some differences between these functions. Some were moved
over to XGI_SetATTRegs. For the others, I'm *assuming* the more
recent code drop from XGI (i.e., XGI_SetATTRegs) is correct for the
Volari parts.
MCLKData and ECLKData were supposed to get this treatment along with
the other structure fields in commit
a3597f0de3. They were overlooked at
that time, and this brings them in line.
Previously, the VB_DEVICE_INFO was recreated each time certain
functions were called. In order to have persistent storage across
calls, VB_DEVICE_INFO contained pointers to writable global data.
Since the VB_DEVICE_INFO structure is no longer recreated on each
call, there is no reason to have this global data. All data is stored
in the VB_DEVICE_INFO structure. It is copied from const globals when
the structure is initialized.
These two structures are nearly identical, and there is a lot of
duplicate infrastructure between them. This patch simply replaces
"struct _XGI_Private" with a typedef to "struct _VB_DEVICE_INFO".
Future changes will remove the duplicate infrastructure and unite the
code more cleanly.