Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp271565pxb; Wed, 3 Feb 2021 05:21:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwX+01ByTK9Fx0xV2ySxP4HzZFaMe3vZd0srIrzyYX9JkUbGoneYRD1ipql0IinYRktTtD1 X-Received: by 2002:a05:6402:208:: with SMTP id t8mr2853603edv.189.1612358471971; Wed, 03 Feb 2021 05:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612358471; cv=none; d=google.com; s=arc-20160816; b=lg3Kn25BsVY79n58311INTRIpit1M5jxfhWkPkx3pgJSY664kgjIN+lCaL5MEOp1NL gG2OeTcgt0Xx5tzeQgzxrrkp+dYn+ro4xZsYeoBM+IQCl4+L7uhIC5QGWjfoRlMGsmoY 7m5NSRUK8cNdNUGS+yYfpcYtc4V3zFZ8c6NuBfTAFA0lGrW1EL/rzeNh//tkmXgVWO4T 25IhaITfsAF8YJ3p8P2sXCNKAiBJ8/wSQV5ifRlL3UCxMr6OzP4+5KDpyFk2xw5evRhv vasLSkyAQkJlNeU9jTRXAtGs1MzSaUFx5tsyyEyZ5AMo0bHulP7CSro2QG9VYnjegtpW 0G5Q== 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=BKav954l+firQcFuSV95aFItPeeI4WgHVXMQBjGHng5vUBHxtz83ktCG9Cd7+AbRlI BePjOU/MyEtkaIAJubJ+XeUSNhK0xPY9GJlLbJZhHwi1WMVBrgTBvj0OlPY8tnnBQBhc wOJs5t2F0v2IfIKq01A2btEEx++CZMFTPmKfOlutIC1cFANeZbkNjZaWKHBl6Rb+a7x5 /yIzVAyPgQ4HChdvKSLytWay0xVinsopSQ7TXAkq2NsHXLR4ZKUemM5I8cpMY5pp9sm3 iiUJS/OXf8B8/R71vt3zrZNI2/02lcrBmgoo3YdGYGip+2LIVHB7Re0UCepjbyygwZGN Ns5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Fpm+/Ywl"; 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 g5si1199959edj.194.2021.02.03.05.20.47; Wed, 03 Feb 2021 05:21:11 -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="Fpm+/Ywl"; 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 S231624AbhBCNS1 (ORCPT + 99 others); Wed, 3 Feb 2021 08:18:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58948 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbhBCNRv (ORCPT ); Wed, 3 Feb 2021 08:17:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612358185; 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=Fpm+/Ywl2cVoHmuhpdNLpq2zPpo6/qnbLTtx/gYq+ms+lOO6jt1SqbsX+q55L146lLAuxh eFAR502pFuL1b8afT8dVype6UU7vJp2nL+uXxvWes+XgIjdCTcM+MsA6SUGlGOAfe29dtU Wf8lw+X+FiBz9JoygWSVwcx0/wsFtX8= 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-499-RhysqZJCMd-nE-yQVuoQPQ-1; Wed, 03 Feb 2021 08:16:21 -0500 X-MC-Unique: RhysqZJCMd-nE-yQVuoQPQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6564C801970; Wed, 3 Feb 2021 13:16:20 +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 2DBA75D723; Wed, 3 Feb 2021 13:16:17 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9D1E41800858; Wed, 3 Feb 2021 14:16:15 +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 v5 4/6] drm/qxl: handle shadow in primary destroy Date: Wed, 3 Feb 2021 14:16:13 +0100 Message-Id: <20210203131615.1714021-5-kraxel@redhat.com> In-Reply-To: <20210203131615.1714021-1-kraxel@redhat.com> References: <20210203131615.1714021-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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