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>
This commit is contained in:
Yuri Benditovich 2020-07-12 11:01:06 +03:00 committed by Frediano Ziglio
parent 418ccf52f0
commit 8e835d7284
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -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();