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>