diff options
author | Yuri Benditovich <yuri.benditovich@daynix.com> | 2020-07-12 11:01:06 +0300 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-07-15 07:56:27 +0100 |
commit | 8e835d7284b4be660c18ad52a731371cb6e10d57 (patch) | |
tree | cd5439930076e0a73e13f12fc7b1b58e697f9321 | |
parent | 418ccf52f0e485eaa1a5522f4cb933acd9139674 (diff) |
qxl-wddm-dod: fix behavior on v5 device
https://bugzilla.redhat.com/show_bug.cgi?id=1851845
v5 device requires explicit reset to switch to VGA mode.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rwxr-xr-x | qxldod/QxlDod.cpp | 4 | ||||
-rwxr-xr-x | qxldod/QxlDod.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 7f03ee1..341518e 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -134,6 +134,7 @@ NTSTATUS QxlDod::CheckHardware() Header.DeviceID == 0x0100 &&
Header.RevisionID >= 4)
{
+ m_Revision = Header.RevisionID;
Status = STATUS_SUCCESS;
}
@@ -4795,7 +4796,8 @@ NTSTATUS QxlDevice::HWClose(void) {
PAGED_CODE();
QxlClose();
- if (m_bUefiMode)
+ /* QXL device rev 5+ requires explicit reset to switch to VGA mode */
+ if (m_bUefiMode || m_pQxlDod->Revision() > 4)
{
DbgPrint(TRACE_LEVEL_INFORMATION, ("%s: Resetting the device\n", __FUNCTION__));
WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_RESET), 0);
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h index 016b1aa..24cbd39 100755 --- a/qxldod/QxlDod.h +++ b/qxldod/QxlDod.h @@ -720,6 +720,7 @@ private: KTIMER m_VsyncTimer;
KDPC m_VsyncTimerDpc;
BOOLEAN m_bVsyncEnabled;
+ UCHAR m_Revision = 0;
LONG m_VsyncFiredCounter;
public:
QxlDod(_In_ DEVICE_OBJECT* pPhysicalDeviceObject);
@@ -819,6 +820,7 @@ public: return m_DxgkInterface.DxgkCbAcquirePostDisplayOwnership(m_DxgkInterface.DeviceHandle, &DispInfo);
}
VOID EnableVsync(BOOLEAN bEnable);
+ UCHAR Revision() const { return m_Revision; }
private:
VOID CleanUp(VOID);
NTSTATUS CheckHardware();
|