summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Rozenfeld <vrozenfe@redhat.com>2014-06-30 21:46:52 +1000
committerVadim Rozenfeld <vrozenfe@redhat.com>2014-06-30 21:46:52 +1000
commit6a37c24fcebd6c211fd3a53eeed5eb9858440585 (patch)
treee1cd95ba18cef88921ae232a0d3e89d07cadea58
parenta64e05f525a5ef89e293ad881066fcf0b4e0b8b9 (diff)
fix pointer activation handler
-rwxr-xr-xqxldod/QxlDod.cpp13
-rwxr-xr-xqxldod/QxlDod.h17
2 files changed, 21 insertions, 9 deletions
diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 7d9c10a..d11de27 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -290,7 +290,7 @@ NTSTATUS QxlDod::SetPowerState(_In_ ULONG HardwareUid,
m_AdapterPowerState = DevicePowerState;
// There is nothing to do to specifically power up/down the display adapter
- return STATUS_SUCCESS;
+ return m_pHWDevice->SetPowerState(DevicePowerState, &(m_CurrentModes[0].DispInfo));
}
// TODO: This is where the specified monitor should be powered up/down
m_pHWDevice->SetPowerState(ActionType);
@@ -396,11 +396,12 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAda
pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2;
pDriverCaps->HighestAcceptableAddress.QuadPart = -1;
- pDriverCaps->MaxPointerWidth = 64;
- pDriverCaps->MaxPointerHeight = 64;
- pDriverCaps->PointerCaps.Monochrome = 1;
- pDriverCaps->PointerCaps.Color = 1;
-
+ if (m_pHWDevice->GetType() == DEVICE_QXL) {
+ pDriverCaps->MaxPointerWidth = POINTER_SIZE;
+ pDriverCaps->MaxPointerHeight = POINTER_SIZE;
+ pDriverCaps->PointerCaps.Monochrome = 1;
+ pDriverCaps->PointerCaps.Color = 1;
+ }
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s 1\n", __FUNCTION__));
return STATUS_SUCCESS;
}
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index f5686cd..a1a0063 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -7,6 +7,8 @@
#define MAX_VIEWS 1
#define BITS_PER_BYTE 8
+#define POINTER_SIZE 64
+
typedef struct _QXL_FLAGS
{
UINT DriverStarted : 1; // ( 1) 1 after StartDevice and 0 after StopDevice
@@ -206,9 +208,14 @@ typedef struct _CURRENT_BDD_MODE
} CURRENT_BDD_MODE;
class QxlDod;
-
-class HwDeviceIntrface
-{
+
+enum DevType {
+ DEVICE_INTERFACE,
+ DEVICE_VGA,
+ DEVICE_QXL
+};
+
+class HwDeviceIntrface {
public:
virtual NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode) = 0;
virtual NTSTATUS SetCurrentMode(ULONG Mode) = 0;
@@ -225,6 +232,7 @@ public:
USHORT GetModeNumber(USHORT idx) {return m_ModeNumbers[idx];}
USHORT GetCurrentModeIndex(void) {return m_CurrentMode;}
VOID SetCurrentModeIndex(USHORT idx) {m_CurrentMode = idx;}
+ DevType GetType(void) { return DEVICE_INTERFACE;}
virtual NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@@ -262,6 +270,7 @@ public:
NTSTATUS SetPowerState(POWER_ACTION ActionType);
NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWClose(void);
+ DevType GetType(void) { return DEVICE_VGA;}
NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@@ -414,6 +423,7 @@ public:
NTSTATUS SetPowerState(POWER_ACTION ActionType);
NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWClose(void);
+ DevType GetType(void) { return DEVICE_QXL;}
NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@@ -472,6 +482,7 @@ private:
void FreeMem(UINT32 mspace_type, void *ptr);
UINT64 ReleaseOutput(UINT64 output_id);
void WaitForReleaseRing(void);
+ void EmptyReleaseRing(void);
BOOL SetClip(const RECT *clip, QXLDrawable *drawable);
void AddRes(QXLOutput *output, Resource *res);
void DrawableAddRes(QXLDrawable *drawable, Resource *res);