[Spice-devel] [qxl-wddm-dod PATCH 1/2] Normalise line ending
Frediano Ziglio
fziglio at redhat.com
Thu Sep 8 11:27:03 UTC 2016
>
> 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 at redhat.com>
> ---
> qxldod/QxlDod.cpp | 58
> +++++++++++++++++++++++++--------------------------
> qxldod/QxlDod.h | 2 +-
> qxldod/driver.h | 2 +-
> qxldod/qxldod.vcxproj | 2 +-
> 4 files changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
> index 2793a1d..e150fb4 100755
> --- a/qxldod/QxlDod.cpp
> +++ b/qxldod/QxlDod.cpp
> @@ -3006,10 +3006,10 @@ BOOL QxlDevice::SetVideoModeInfo(UINT Idx, QXLMode*
> pModeInfo)
> void QxlDevice::UpdateVideoModeInfo(UINT Idx, UINT xres, UINT yres, UINT
> bpp)
> {
> PVIDEO_MODE_INFORMATION pMode = NULL;
> - UINT bytes_pp = (bpp + 7) / 8;
> + UINT bytes_pp = (bpp + 7) / 8;
> ULONG color_bits;
> PAGED_CODE();
> -
> +
> pMode = &m_ModeInfo[Idx];
> pMode->VisScreenWidth = xres;
> pMode->VisScreenHeight = yres;
> @@ -4395,7 +4395,7 @@ NTSTATUS QxlDevice::SetPointerShape(_In_ CONST
> DXGKARG_SETPOINTERSHAPE* pSetPoi
> now = chunk->data;
> end = (UINT8 *)res + CURSOR_ALLOC_SIZE;
>
> - src_end = src + (pSetPointerShape->Pitch * pSetPointerShape->Height *
> (pSetPointerShape->Flags.Monochrome ? 2 : 1));
> + src_end = src + (pSetPointerShape->Pitch * pSetPointerShape->Height *
> (pSetPointerShape->Flags.Monochrome ? 2 : 1));
> for (; src != src_end; src += pSetPointerShape->Pitch) {
> PutBytesAlign(&chunk, &now, &end, src, line_size,
> PAGE_SIZE, 1);
> @@ -4436,39 +4436,39 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE*
> pEscap)
> {
> DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
> QXLEscapeSetCustomDisplay *custom_display;
> - UINT xres;
> - UINT yres;
> - UINT bpp;
> + UINT xres;
> + UINT yres;
> + UINT bpp;
>
> if (pEscap->PrivateDriverDataSize != sizeof(QXLEscapeSetCustomDisplay))
> {
> DbgPrint(TRACE_LEVEL_ERROR, ("<--> %s Incorrect buffer size %d
> instead of %d\n", __FUNCTION__, pEscap->PrivateDriverDataSize,
> sizeof(QXLEscapeSetCustomDisplay)));
> return STATUS_INVALID_BUFFER_SIZE;
> }
> custom_display = (QXLEscapeSetCustomDisplay*)pEscap->pPrivateDriverData;
> - xres = custom_display->xres & ~0x3;
> - yres = custom_display->yres & ~0x3;
> - bpp = custom_display->bpp;
> - if (bpp != QXL_BPP)
> - {
> - bpp = QXL_BPP;
> - }
> - if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE)
> - {
> + xres = custom_display->xres & ~0x3;
> + yres = custom_display->yres & ~0x3;
> + bpp = custom_display->bpp;
> + if (bpp != QXL_BPP)
> + {
> + bpp = QXL_BPP;
> + }
> + if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE)
> + {
> DbgPrint(TRACE_LEVEL_ERROR, ("%s: xres = %d, yres = %d\n",
> __FUNCTION__, xres, yres));
> - return ERROR_INVALID_DATA;
> - }
> -
> - if (m_CustomMode == (m_ModeCount - 1))
> - m_CustomMode = (USHORT)(m_ModeCount - 2);
> - else
> - m_CustomMode = (USHORT)(m_ModeCount - 1);
> -
> - if ((xres * yres * bpp / 8) > m_RomHdr->surface0_area_size) {
> - DbgPrint(TRACE_LEVEL_ERROR, ("%s: Mode (%dx%d#%d) doesn't fit in
> memory (%d)\n",
> - __FUNCTION__, xres, yres, bpp,
> m_RomHdr->surface0_area_size));
> - return STATUS_INVALID_PARAMETER;
> - }
> - UpdateVideoModeInfo(m_CustomMode, xres, yres, bpp);
> + return ERROR_INVALID_DATA;
> + }
> +
> + if (m_CustomMode == (m_ModeCount - 1))
> + m_CustomMode = (USHORT)(m_ModeCount - 2);
> + else
> + m_CustomMode = (USHORT)(m_ModeCount - 1);
> +
> + if ((xres * yres * bpp / 8) > m_RomHdr->surface0_area_size) {
> + DbgPrint(TRACE_LEVEL_ERROR, ("%s: Mode (%dx%d#%d) doesn't fit in
> memory (%d)\n",
> + __FUNCTION__, xres, yres, bpp,
> m_RomHdr->surface0_area_size));
> + return STATUS_INVALID_PARAMETER;
> + }
> + UpdateVideoModeInfo(m_CustomMode, xres, yres, bpp);
> DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
> return STATUS_SUCCESS;
> }
> diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
> index d3d9202..d28e84d 100755
> --- a/qxldod/QxlDod.h
> +++ b/qxldod/QxlDod.h
> @@ -273,7 +273,7 @@ public:
> NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState,
> DXGK_DISPLAY_INFORMATION* pDispInfo);
> NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
> pDispInfo);
> NTSTATUS HWClose(void);
> - BOOLEAN EnablePointer(void) { return TRUE; }
> + BOOLEAN EnablePointer(void) { return TRUE; }
> NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
> _In_ UINT DstBitPerPixel,
> _In_ BYTE* SrcAddr,
> diff --git a/qxldod/driver.h b/qxldod/driver.h
> index e64c098..c1ed7e3 100755
> --- a/qxldod/driver.h
> +++ b/qxldod/driver.h
> @@ -212,7 +212,7 @@ DodSystemDisplayWrite(
> extern int nDebugLevel;
> void DebugPrintFuncSerial(const char *format, ...);
>
> -void DebugPrintFunc(const char *format, ...);
> +void DebugPrintFunc(const char *format, ...);
>
> #define DbgPrint(level, line) \
> if (level > nDebugLevel) {} \
> diff --git a/qxldod/qxldod.vcxproj b/qxldod/qxldod.vcxproj
> index c6a8ebb..a76f604 100755
> --- a/qxldod/qxldod.vcxproj
> +++ b/qxldod/qxldod.vcxproj
> @@ -336,4 +336,4 @@
> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
> <ImportGroup Label="ExtensionTargets">
> </ImportGroup>
> -</Project>
> +</Project>
As you can see git send-email has some problems (is seems there are
no changes).
See https://gitlab.com/freddy77/qxl-wddm-dod/commit/a8120e103a6b8f454b64eeae8ee077575912fc08
(better to apply the commit patch and do the diff by yourself).
Frediano
More information about the Spice-devel
mailing list