Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3794720pxk; Tue, 8 Sep 2020 02:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6qjPMMFT3fj06EemHYdTlLo4zO7pqp6rrmAlD4+JreOCYQYcDebrk8h2Yv6Obxov4Ofmr X-Received: by 2002:a17:906:e216:: with SMTP id gf22mr16563625ejb.2.1599558072974; Tue, 08 Sep 2020 02:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599558072; cv=none; d=google.com; s=arc-20160816; b=yn0zM6KMyGX2+3Z7I0HYULQ8t/06HEUSqGPzROeXxT7K457XqR7wHznXeteREO7aq2 xgsTX1LWGqSElJ/NFytXdFVzuZcA9FHgq0f2aPdSzSssdJC3HnzJWxhmgpRLk+DPOYBu /C0ywdGlV5udR7W7E0tVlKsg/Y11Cb5aGfdfEpBNyDDRA2wiB/ldFM7bGrUV6simGQ/d VEtvrZmGkxqpf7C1ZIq46fj6roEA1lIFogzHjI0uxGaVT6BqRFB9TsnVmhRFeU/0jCsR d4pR/EmwdN4egQmxkTu3PMJ8zEPTXflLQhUvW+coq0kcN1sjGpJC/jVxWc8mRgHm3Opc MzUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0KEVHWP2GiLQz9DhPmZh/HeQE3DHcZKHvJrF/RegTIU=; b=OBdHKkf0b4l8d79tIGs4h5iZkSlimt+tl9ZJU7IxKI2sKgSg6WTIcXlph+6FXV57BS TZtMaBKPcCHtY2iwtx5O3GDmGZMHRetQWkVWTBTJ5xTxfcxU5HnhcsZHylwBFGZYdrZY iDohaHqIEXwJ4iWmH7vbwgvZzgqhefhfhko7vLh+EOVys+ltcbTGMKb9xJWjEd5JW+JI g3q65APEpkfmBX5qPdSLAxA2O3n1acWpaocJMFOUfIydcjozqke2RXLfudavUieJuwEO VScxL3Cy6HevAQNgvV6YLj7JP3Ms1VuGURO4piMw41sYG79U1IZfGeRCGBxKiq25tNG3 SYog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QUfq8M92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si10393693edw.38.2020.09.08.02.40.50; Tue, 08 Sep 2020 02:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QUfq8M92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728963AbgIHJjX (ORCPT + 99 others); Tue, 8 Sep 2020 05:39:23 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:43632 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727995AbgIHJjU (ORCPT ); Tue, 8 Sep 2020 05:39:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599557959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0KEVHWP2GiLQz9DhPmZh/HeQE3DHcZKHvJrF/RegTIU=; b=QUfq8M92LX7WvSdzzdvWIMmeoKsqcIvz+fQGzdV63UccYDv5SvGJzvo8OVGEldAXJCw4yv bqJ3Vgf244u/ZXuXRvzBYn56BUB0awbalnHQSD3gxzhTzP+82Hp0x1WrM4Pdr7dtjQA4EO H+lpTm6Sjv/V/FgMJJe/DPiFqSgSTTM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-FQLYQ8IjMDq3GhQpyAEKYw-1; Tue, 08 Sep 2020 05:39:18 -0400 X-MC-Unique: FQLYQ8IjMDq3GhQpyAEKYw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 856CF802B61; Tue, 8 Sep 2020 09:39:16 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59DF060C15; Tue, 8 Sep 2020 09:39:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 95CBC204AE; Tue, 8 Sep 2020 11:39:12 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , Dave Airlie , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), spice-devel@lists.freedesktop.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/3] drm/qxl: handle shadow in primary destroy Date: Tue, 8 Sep 2020 11:39:12 +0200 Message-Id: <20200908093912.26792-4-kraxel@redhat.com> In-Reply-To: <20200908093912.26792-1-kraxel@redhat.com> References: <20200908093912.26792-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 85dcb7fe56a9..3dcbb359e0f5 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -560,6 +560,8 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane, if (old_state->fb) { struct qxl_bo *bo = gem_to_qxl_bo(old_state->fb->obj[0]); + if (bo->shadow) + bo = bo->shadow; if (bo->is_primary) { qxl_io_destroy_primary(qdev); bo->is_primary = false; -- 2.27.0