Solves failure of HLK "Test for EDID requirements"
EDID contains capabilities and manufacturer data of
the emulated display device. Parsed EDID data presented
in the source file.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1417448
When the OS does not provide physical address of the frame buffer,
the driver retrieves it from allocated PCI resource for BAR0.
https://msdn.microsoft.com/en-us/library/hh451339(v=vs.85).aspx
In DxgkCbAcquirePostDisplayOwnership OS not always fills
the DXGK_DISPLAY_INFORMATION structure with valid data.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
The driver uses fallback mode when it does not receive
startup display information from the OS. This change
allows solution for https://bugzilla.redhat.com/show_bug.cgi?id=1417448
without fix in qemu for video mode switch from 32 bpp to 24 bpp.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This is a follow up of 31ca5d035d
("Implements screen to screen move correctly").
As now we don't copy memory to implement moves there's no
reason to take into account these area for memory mappings
as memory is not accessed anymore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Yuri Benditovich <yuri.benditovich@daynix.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1411340
Do not set SupportNonVGA field for device rev.4 and higher.
Then the class driver will not call miniport's procedure
StopDeviceAndReleasePostDisplayOwnership upon PnP stop.
QXL device modes are not compatible with VGA ones; the
driver in this procedure returns display information related
to QXL mode which later used by BasicDisplay driver and causes
it to show the screen incorrectly or fail to show it at all.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Doing some fast check on Windows 8.1 you could note that
moving windows you got a weird effect were windows were a
bit misaligned.
As documented in DXGKARG_PRESENT_DISPLAYONLY page
NumMoves/pMoves fields point to an array of screen-to-screen
moves while our code implemented them as an image drawing
(the same implementation of dirty rects) causing the weird
effect mentioned.
This patch implement the moves using QXL_COPY_BITS operation
instead of a QXL_DRAW_COPY fixing the issue and avoiding sending
image to the server making the move/scroll operations on the
guest faster (and taking less bandwidth).
It seems that Windows 10 doesn't send the move commands but
instead send only dirty rects so you can't note this problem
using Windows 10.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Yuri Benditovich <yuri.benditovich@daynix.com>
This avoids having 2 pointers (client and server) if Windows decides
to render the mouse by itself. This happens, for instance, when moving
windows around.
Signed-off-by: Javier Celaya <javier.celaya@flexvdi.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Windows disables hw pointer acceleration and draws the cursor
in frame buffer if the driver does not report pointer capabilities
in QueryAdapterInfo. In this mode OS usually does not send pointer
commands to the driver or does it with pointer set to invisible
state. This mode of operation consumes CPU time and device-to-host
traffic. Now we enable pointer hardware acceleration.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
A more permissive licence is more in line with what Microsoft requires
for its WHQL certification
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Version information in INF file is configured by
environment variables.
The same version information placed in driver binary.
To set required version from external build engine,
define following environment variables:
VERSION_V1, VERSION_V2, VERSION_V3, VERSION_V4
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Currently the qxl device with id 0 is being set as an internal display
while all the rest are set as VGA connector. This commit solves this
issue that was discussed in detail here:
https://bugzilla.redhat.com/show_bug.cgi?id=1314600
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Remove specifier that was causing a warning.
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Disable execution bit on mapping improving security.
MmMapIoSpaceEx is available only in Windows 10 so
to provide binary compatibility detect the new
function dynamically.
Added a separate compatibility file.
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This make sure that these function goes into the non
paged section.
Also this change is much shorter than marking code if
can be paged as almost code can be paged.
It's also coherent with other source files.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Sameeh Jubran <sameeh@daynix.com>
Starting with Windows Display Driver Model (WDDM) 1.2, if the
DevicePowerState parameter is set to PowerDeviceD0, the display miniport
driver should call DxgkCbAcquirePostDisplayOwnership to query the
information about the display mode.
This patch fixies this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1202267
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
When qxl revision is 3, the vga driver is the one that is running.
While installing the driver the function VgaDevice::HWInit
has displayInfo structure zeroed out. The displayInfo should be
initialized using DxgkCbAcquirePostDisplayOwnership and thus it
should be called before calling HWInit.
Please note that we can't just move the call to "DxgkCbAcquirePostDisplayOwnership"
before calling HWInit as the m_Id isn't initialized for QxlDevice until the call to HWinit is over.
This patch fixes a bug similar to the one found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1202267
However this one occurs when installing the driver.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
The PAGED_CODE macro ensures that the calling thread is running at an
IRQL that is low enough to permit paging. A call to this macro should be
made at the beginning of every driver routine that either contains
pageable code or accesses pageable code
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Part of source image mapped by PresentDisplayOnly
should be big enough to cover all rectangles being
transferred.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This patch fixes 2 issues:
1. Framebuffer should only be used in vga mode,
therefore when QxlDevice is active
FrameBufferIsActive flag shouldn't be checked;
2. FrameBufferIsActive flag should be set true
on successfull frame buffer allocation only.
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Framebuffer should only be used in VGA mode, as WDDM DOD
driver doesn't use the frame buffer (bar0), so no
reason to map in into memory. However the mode is only known
at runtime therefore framebuffer logic should be active when the
driver is operating in vga mode only.
There were rare BSOD failures when the mapping failed.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
This call to BlackOutScreen is not needed since the actual
display surface is destroyed and created (redrawn) again.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Interrupts seem to arrive to the driver before the initialization phase
is over (m_pHWDevice = NULL), in that case we can't handle interrupts yet.
Even when m_pHWDevice isn't NULL, other fields aren't necessarily fully
initialized till the StartDevice function has finished initialization,
thus the flag DriverStarted should be checked upon interrupts.
Note: There is no way provided by Microsoft to disable interrupts in WDDM
drivers.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This patch adds support for arbitrary resolution and updating
monitor configurations using custom ioctls.
This patch doesn't make any restriction for minimal resolution at all
as Windows can handle low resolution just fine, moreover the old (XPDM)
driver behaves like this too.
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
The driver determines operation mode
(QXL or VGA) by checking device hardware
ids including revision id field.
Without this patch driver operates in VGA
mode for all revisions other than 4.
This patch makes driver operate in QXL
mode revision 4 and newer devices.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
As documented in MSDN, "DxgkDdiPresentDisplayOnly" should copy
each "move rectangle" from a given source point in the source buffer
to the destination. The current implementation doesn't take into account
the shift of the given source point at all. This patch fixies the issue.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This capability flag should be set in order
to indicate to the OS that callback
DxgkDdiStopDeviceAndReleasePostDisplayOwnership
is supported.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Git detect these files as binary which cause some issues with log and
other command.
The conversion allows different tools (git, VS and different editors)
to work correctly.
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
* Added Windows 10 Configurations and removed older ones.
* Migration to Visual Studio 2015.
* Set Allow Date, Time and Timestamp property for all builds/platforms.
* Fixed up project configuration names to be consistent.
* unified build output directories
* Simple build script added
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Allow for 1bpp bitmap followed by 1bpp XOR map.
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Some files had different line ending (some lines DOS while some others
UNIX). Use the same line ending using the nearest ending.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Passing the flag QXL_SURF_FLAG_KEEP_DATA to the new created surface
causes weird flickering, thus this should be set to 0.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
According to msdn, "The display miniport driver must set this
value to 0"
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Can result in a BSOD, as the image would be mapped only partially causing page faults when
accessing missing piece of the image.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Based on a patch by Sandy Stutsman <sstutsma@redhat.com>
Signed-off-by: Javier Celaya <javier.celaya@flexvdi.com>
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>