[Spice-devel] [PATCH qxl-wddm-dod 09/26] Use SrcPitch when calculating size of memory to map PresentDisplayOnly

Frediano Ziglio fziglio at redhat.com
Wed Aug 17 10:02:53 UTC 2016


> 
> From: Sandy Stutsman <sstutsma at redhat.com>
> 
> Otherwise, can result in a BSOD.
> ---
>  qxldod/QxlDod.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
> index 9d13934..7b60e0c 100755
> --- a/qxldod/QxlDod.cpp
> +++ b/qxldod/QxlDod.cpp
> @@ -3606,7 +3606,7 @@ QxlDevice::ExecutePresentDisplayOnly(
>  
>      {
>          // Map Source into kernel space, as Blt will be executed by system
>          worker thread
> -        UINT sizeToMap = SrcBytesPerPixel * ctx->SrcWidth * ctx->SrcHeight;
> +        UINT sizeToMap = ctx->SrcPitch * ctx->SrcHeight;
>  
>          PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap,  FALSE, FALSE,
>          NULL);
>          if(!mdl)

I would add some comments like:
"This as the image would be mapped only partially causing page faults when
 accessing missing piece of the image."

otherwise

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Frediano


More information about the Spice-devel mailing list