From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Mansfield Subject: [PATCH qxl.ko] Use surface_id 0 for primary surface on all monitors Date: Tue, 03 Jun 2014 10:56:05 -0400 Message-ID: <538DE205.7030304@dm.cobite.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050000000001070209000404" Return-path: Received: from sandy.cobite.com (67.221.182.5.static.nyinternet.net [67.221.182.5]) by gabe.freedesktop.org (Postfix) with ESMTP id 89C936E728 for ; Tue, 3 Jun 2014 08:04:38 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is a multi-part message in MIME format. --------------050000000001070209000404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit spice-server and downstream code expect that the primary surface will always have surface_id = 0, while in reality, once allocated, the surface_id in qxl.ko is NEVER 0. In a dual head environment, all monitors render portions of the primary surface. However, when the monitor config events are generated and sent, the primary surface is only mapped to the correct identifier (i.e. 0) for the primary head (where crtc index is 0). The fix is to look at the "primary" flag in the bo and always use id 0, irrespective of which head is being configured. -- Thanks, David Mansfield Cobite, INC. --------------050000000001070209000404 Content-Type: text/x-patch; name="qxl_force_primary_surface.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qxl_force_primary_surface.patch" --- qxl/qxl_display.c 2014-05-19 09:27:28.298217035 -0400 +++ qxl.orig/qxl_display.c 2014-05-19 09:31:00.327028070 -0400 @@ -574,6 +574,10 @@ bo->surf.height, bo->surf.stride, bo->surf.format); qxl_io_create_primary(qdev, base_offset, bo); bo->is_primary = true; + } + + if (bo->is_primary) { + DRM_DEBUG_KMS("setting surface_id to 0 for primary surface %d on crtc %d\n", bo->surface_id, qcrtc->index); surf_id = 0; } else { surf_id = bo->surface_id; --------------050000000001070209000404 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --------------050000000001070209000404--