AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.
Clears autoconf warnings:
configure.ac:44: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:44: You should run autoupdate.
aclocal.m4:3515: AC_PROG_LIBTOOL is expanded from...
configure.ac:44: the top level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Will be needed for C23 builds, since C23 treats () as (void),
not as an unspecified argument list.
Fixes warning from Solaris Studio C compiler with -fd flag:
"dummy.h", line 55: warning: old style function declaration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Resolves issues reported by Oracle Parfait static analyzer:
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pixels allocated with malloc((pScrn->videoRam * 1024))
at line 803 of dummy_driver.c in function 'DUMMYScreenInit'.
pixels allocated at line 790 with malloc((pScrn->videoRam * 1024))
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pixels allocated with malloc((pScrn->videoRam * 1024))
at line 805 of dummy_driver.c in function 'DUMMYScreenInit'.
pixels allocated at line 790 with malloc((pScrn->videoRam * 1024))
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Add WIDTH_MM and HEIGHT_MM output properties to allow setting "physical"
size of the output. Normally this data is retrieved from EDID, but for
obvious reasons it can't be done in the VM.
This patch allows to set this properties from user space. This is later
reported as output size (the header line describing the output in
`xrandr` output).
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Properly initialize RandR extension, mostly with stubs. It creates four
virtual outputs (lets hope that nobody will need more at once...). By
default only the first one is in "connected" state, with preferred mode
from xorg.conf. Other outputs get "connected" at first mode set (and
left connected forever - you can always not use it).
So without any xrandr calls it should work as before.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
This patch makes it possible to start the server using the dummy driver
with a 30 bit depth. The colormap size is changed from 256 to 1024 to
prevent crashes.
Reviewed-by: Adam Jackson <ajax@redhat.com>
GCC's -Wmisleading-indentation complains about this
dummy_driver.c: In function ‘DUMMYGetRec’:
dummy_driver.c:181:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (pScrn->driverPrivate == NULL)
^~
dummy_driver.c:183:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
return TRUE;
^~~~~~
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
The pointer to the screen's pixels is stored in the screen pixmap's
devPrivate.ptr field. Just use that instead of storing it
redundantly.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Bob Terek <xorg@esoterek.com>
Tested-by: Antoine Martin <antoine@nagafix.co.uk>
These functions might be useful in a real driver, but with no
hardware, they're pointless. Get rid of them.
v2: Rebase, get rid of pointless calls to DUMMYAdjustFrame, return TRUE from
DUMMYSwitchMode.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
Tested-by: Antoine Martin <antoine@nagafix.co.uk>
If our server supports DGA and we want to build the dummy driver without it,
XFreeXDGA will be defined by the server and will be picked up rather than
our configuration option. This change forces us to honor our configuration
hoice.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>