WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: 答复: Re: [Xen-devel][PATCH]qemu-xen: let xenfb_guest_copy() handle de

To: <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: 答复: Re: [Xen-devel][PATCH]qemu-xen: let xenfb_guest_copy() handle depth=32 case
From: "Chun Yan Liu" <cyliu@xxxxxxxxxx>
Date: Fri, 29 Oct 2010 03:10:21 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 29 Oct 2010 02:11:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>  Could you please resubmit a patch with both changes and a signed-off-by
>  line?

Sure. Following is the patch with both changes.

Signed-off by Chunyan Liu <cyliu@xxxxxxxxxx>

diff -r 1e5cb7d6a96c hw/xenfb.c
--- a/hw/xenfb.c    Mon Oct 18 17:24:50 2010 +0100
+++ b/hw/xenfb.c    Sat Oct 30 00:48:45 2010 +0800
@@ -630,6 +630,18 @@
                 oops = 1;
             }
             break;
+    case 16:
+            if (bpp == 16) {
+                for (line = y; line < (y+h); line++) {
+                        memcpy (data + (line * linesize) + (x * bpp / 8), xenfb->pixels + xenfb->offset
+                              + (line * xenfb->row_stride) + (x * xenfb->depth / 8), w * xenfb->depth / 8);
+                }
+            } else if (bpp == 32) {
+                BLT(uint16_t, uint32_t,   5, 6, 5,   8, 8, 8);
+            } else {
+                oops = 1;
+            }
+            break;
         case 24:
             if (bpp == 16) {
                 BLT(uint32_t, uint16_t,  8, 8, 8,   5, 6, 5);
@@ -639,6 +651,18 @@
                 oops = 1;
             }
             break;
+        case 32:
+            if (bpp == 16) {
+                BLT(uint32_t, uint16_t,  8, 8, 8,   5, 6, 5);
+            } else if (bpp == 32) {
+                for (line = y; line < (y+h); line++) {
+                        memcpy (data + (line * linesize) + (x * bpp / 8), xenfb->pixels + xenfb->offset
+                              + (line * xenfb->row_stride) + (x * xenfb->depth / 8), w * xenfb->depth / 8);
+                }
+            } else {
+                oops = 1;
+            }
+            break;
         default:
             oops = 1;
     }
@@ -792,6 +816,7 @@
 static void xenfb_invalidate(void *opaque)
 {
     struct XenFB *xenfb = opaque;
+    xenfb->do_resize = 1;
     xenfb->up_fullscreen = 1;
 }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel