Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp165194pxb; Wed, 20 Jan 2021 04:06:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjgJGEjwT146WHiTxGmRy765QleiYdr7vmdFEgd0dd3b+C8fsYSZlPlSmS3ap1pHwjFFmS X-Received: by 2002:a17:906:3401:: with SMTP id c1mr6152614ejb.156.1611144254268; Wed, 20 Jan 2021 04:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611144254; cv=none; d=google.com; s=arc-20160816; b=ePNJvQ2dKYwCdvMcQCz1/G0jwYSVukWBEt39y89c/ACGiSVTTaFp7PJBCl4qf+ZSY0 0aNdm1e+2DtRX6iGfYjuEcCSuIdnnCl+/QMmWX0Shz9+37pJi/+3kf6vxYc/X3Ylmdd/ d025ihP8Y/y/XxnHRBX4h8aPfDW+CMudnXYwu6C1H7gIErsTLlSUK4t7QGy+RnJA3lZ5 Fk+de3Ae0a/AUf18ECYRFbuW7quWLPc+B7fWNknKxAJHXp0rmrDAuEb6qYnO2m/bi+H3 Zz8n1qPPm/rfLICg6nvMG502XJ65AypN41FYe+guWycnYxjrqQXqvsGNPHAcCKl2ptb4 WRQw== 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=c+bjvbGMwoHRf420n511vRSIAl4Ux6JZNKftCQI+ib6caNEzC/9N30ZBZC6qlcDjJd fjivcxuU3iHLvETt8FsiH5XtCFvLNjupZ92vSFL72MFVHfIdi8P35ocvysibVQLGsbQQ bxSW1uztN4CfBSwQFwj/O/xZ8CfquQyjliEekDM3EFWRJrRtGshAMSujnlVNfzu1+4/g p94Vm+edDJlVxKeRmCnWUyW7dH61cyXbQxHjynERkpcGs1BET3YXjHn5z+x7alSq8NBt YVbkpYYXtNT0IEOfA6DDUc1Vwj9wVUtldocmfD+UYpd7Y2/azYASs5e+AUIMHHdZLxZH Bh8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SuHkpJGv; 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 c26si611851ejm.600.2021.01.20.04.03.40; Wed, 20 Jan 2021 04:04:14 -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=SuHkpJGv; 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 S2387897AbhATLmR (ORCPT + 99 others); Wed, 20 Jan 2021 06:42:17 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30576 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388968AbhATLO2 (ORCPT ); Wed, 20 Jan 2021 06:14:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611141170; 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=SuHkpJGvplJuTQZdko0WHiJJwNPJTUEi93UtcX5OGDMaWmtaRGD3V7WVALez/caCFkOWk5 fOwF0mC9Hd1hkVGiTkKd2tBQ/j7u9btaq/qlTmoe+Xn7zqs4okKhXd0oTiN0bCVTbSb5il AsSnUKRhtua7Uw+nWKi61geMPgMgFiY= 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-276-op8VI5H6PlC8nk3DST0_Hg-1; Wed, 20 Jan 2021 06:12:49 -0500 X-MC-Unique: op8VI5H6PlC8nk3DST0_Hg-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 E925915720; Wed, 20 Jan 2021 11:12:47 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F2185D6AD; Wed, 20 Jan 2021 11:12:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 447E91800629; Wed, 20 Jan 2021 12:12:41 +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 v3 4/4] drm/qxl: handle shadow in primary destroy Date: Wed, 20 Jan 2021 12:12:40 +0100 Message-Id: <20210120111240.2509679-5-kraxel@redhat.com> In-Reply-To: <20210120111240.2509679-1-kraxel@redhat.com> References: <20210120111240.2509679-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