[Spice-devel,3/4] qxl-wddm-dod: Allow easy modification of fallback setting

Submitted by Yuri Benditovich on Jan. 30, 2017, 1:25 p.m.

Details

Message ID 1485782738-155840-4-git-send-email-yuri.benditovich@daynix.com
State New
Headers show
Series "qxl-wddm-dod: fix for black screen after VGA driver enable" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Yuri Benditovich Jan. 30, 2017, 1:25 p.m.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
 qxldod/QxlDod.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 459fcb1..c107bd3 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -4829,10 +4829,10 @@  NTSTATUS HwDeviceInterface::AcquireDisplayInfo(DXGK_DISPLAY_INFORMATION& DispInf
 
     if (DispInfo.Width == 0)
     {
+        DispInfo.ColorFormat = D3DDDIFMT_R8G8B8;
         DispInfo.Width = MIN_WIDTH_SIZE;
         DispInfo.Height = MIN_HEIGHT_SIZE;
-        DispInfo.Pitch = MIN_WIDTH_SIZE * BPPFromPixelFormat(D3DDDIFMT_R8G8B8) / 8;
-        DispInfo.ColorFormat = D3DDDIFMT_R8G8B8;
+        DispInfo.Pitch = DispInfo.Width * BPPFromPixelFormat(DispInfo.ColorFormat) / BITS_PER_BYTE;
         DispInfo.TargetId = 0;
     }
     return Status;

Comments

> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>

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

> ---
>  qxldod/QxlDod.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
> index 459fcb1..c107bd3 100755
> --- a/qxldod/QxlDod.cpp
> +++ b/qxldod/QxlDod.cpp
> @@ -4829,10 +4829,10 @@ NTSTATUS
> HwDeviceInterface::AcquireDisplayInfo(DXGK_DISPLAY_INFORMATION& DispInf
>  
>      if (DispInfo.Width == 0)
>      {
> +        DispInfo.ColorFormat = D3DDDIFMT_R8G8B8;
>          DispInfo.Width = MIN_WIDTH_SIZE;
>          DispInfo.Height = MIN_HEIGHT_SIZE;
> -        DispInfo.Pitch = MIN_WIDTH_SIZE *
> BPPFromPixelFormat(D3DDDIFMT_R8G8B8) / 8;
> -        DispInfo.ColorFormat = D3DDDIFMT_R8G8B8;
> +        DispInfo.Pitch = DispInfo.Width *
> BPPFromPixelFormat(DispInfo.ColorFormat) / BITS_PER_BYTE;
>          DispInfo.TargetId = 0;
>      }
>      return Status;

Frediano