Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4410115pxb; Tue, 26 Jan 2021 22:44:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIMrNeJHlo11so+F9Js8RUyQpi4Mq9URtIDRJZWUl3VxWdLlI9GDD9P7TxvJAvwno5bWNL X-Received: by 2002:a17:906:a851:: with SMTP id dx17mr5447958ejb.537.1611729875258; Tue, 26 Jan 2021 22:44:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611729875; cv=none; d=google.com; s=arc-20160816; b=lD9mun2/LUQUI4B3SVfXlXP6oLoKH0JHxmkvwL0Ro2LYUZuxoM8ZBkH/sjuvV0y3Ug EoODfJyVbDmUJF1Xm3Se41+SC1kUzdqFrheSfT/6rpHPsoyRyIkm00SL5u9dwbvD8itu T/6HukK+h9NZNLJ9lvmCmsQRyU9u6jZfmQxwlGmigB5t4B1l2uClwt8GQl8s5+OlYKu9 VhdrnKY7IVdtFBmljDqKHCQaDB1kh+/oXf0XcSqSvp+p+DUQ1QLT7+yI3fQfmHVC9blC l10fKScItkad0keL/RFZ5rSxTwZm/2IH/cXyLaKaHv+hQJ62DQ7cgurlMR9LNbfR/OL4 oxcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sBAg1Nnn8mCK0HII6yCiJKJYmpbU//Rjg5zt6wDEZpc=; b=tvJIdN3P/rmRAS1QSmavv9/Udml2X7+EBrHx/54tdokEAg/JYrJHFK2ZwVOOPiQC3L qwfWFp0nSgeScttnaxzVyUf2vfONsVlZtDe+ovqirZzZoY+pg7bhgALV/NXKqGzu4urW hL5tmjTmtOaCh0q2JWEtzoAtCDjrI22Fk4Bu0bSo9BiSKULWUMKQrbacJ2N7RJWAWc6o zZ8HQYZJiMfX+9J5sH8xOIo02aiUVahIwckaOv9xjaQ87SOIl6Lb4gNn6zIrEeR24KHo gmQHlXs61zrHO5Sz/xm09tVufnMb/FO4gdZtHpxZeuqCVaCMA/dK2bwk8EsOCrpgXsSw 2kyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dx5+bOEL; 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 os5si416248ejb.629.2021.01.26.22.44.10; Tue, 26 Jan 2021 22:44:35 -0800 (PST) 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=Dx5+bOEL; 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 S2388877AbhAZXjU (ORCPT + 99 others); Tue, 26 Jan 2021 18:39:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52779 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388004AbhAZQ7t (ORCPT ); Tue, 26 Jan 2021 11:59:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611680303; 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=sBAg1Nnn8mCK0HII6yCiJKJYmpbU//Rjg5zt6wDEZpc=; b=Dx5+bOEL2zVvJoMjlX7LgjrYQSd7jIyjAIC9db1pu1tPeqTZRuhgPP9YEX5WpLi4rzpE35 ftyJEezqufD5UZiNWjWeGlhxPJ3/K7hVE9pBfwWmJ7x3fTWOFFZ/BFnJytJ8mfAb3V4qZL Z13ATa2p66sf7wkkOImS9tSTYUt7TBs= 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-80-uUpLjgtOPbK6GvtIVBDmzg-1; Tue, 26 Jan 2021 11:58:20 -0500 X-MC-Unique: uUpLjgtOPbK6GvtIVBDmzg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 097841DDE0; Tue, 26 Jan 2021 16:58:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9BCC10013C1; Tue, 26 Jan 2021 16:58:15 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6320218003A2; Tue, 26 Jan 2021 17:58:13 +0100 (CET) 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 v4 4/5] drm/qxl: handle shadow in primary destroy Date: Tue, 26 Jan 2021 17:58:11 +0100 Message-Id: <20210126165812.1661512-5-kraxel@redhat.com> In-Reply-To: <20210126165812.1661512-1-kraxel@redhat.com> References: <20210126165812.1661512-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 60331e31861a..f5ee8cd72b5b 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -562,6 +562,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.29.2