Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1184295pxb; Thu, 4 Feb 2021 07:03:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxawYyJndIvhI01SKuyaUOx2BxtLXR3nfMl2LoWwKToxteINjvlsSyMiAqaK6o1+kndzS4L X-Received: by 2002:a17:906:19c3:: with SMTP id h3mr8212400ejd.429.1612450999541; Thu, 04 Feb 2021 07:03:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612450999; cv=none; d=google.com; s=arc-20160816; b=zdC71ru2IMixOuS3EQb7JQkl+njj32YLQQ6kIepYQnOmqvIlnKR2VjWLXZ9vSatSnh VRmm3mkhOE077Nq206Wj2Y2QbSSqarNG9TIgmhUsbp1p1L1J+hmZsBiddFya5rJ83QYy 5LttY9xfmCYzSo+h++hfQyeLqnTrQ2KYgMvtr/kBqb+MKc7dMCs6YxvqdEwAvJfb2K7b sIvdhnTzObKId3VXGZJG9etkZAYTTIelYzNB5f45sfy1iR5DN7iT/IeI3dcrh0h2beYr 1w7RSWpDumg4SS7nxNUbrew9aEtoHEO24R9guoXdBQrbrm/IbrGpRQP7PI9qpc+NI0Da /XJQ== 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=21kTSpbci/GKul+97WxXMOEIvXz0qLwA8h+cgydNMqY=; b=OSlyA7Ohqx2VICoUP+NbKJZ1HhhhESr3gMJAnsI+QStW9XOjoZWosp5PL5cQOKOdPA gZKAzqyrW63PWnNHw1RB22hsgJS7nH8cojYRQ5ypBVOHsz3RT21k/eJU6B3otadyy67/ ZwISnbvcoW2z9nwCoQxBI9o0LQayI7cDoY83hxh3kS020NBKYji26vUeUJ4n1wx+krQa 2pX4YxamCH6SVKmVBKGY9eB+b6p6pOu88f7cNKOsbpj1neDw/l7+eJr3Mep1crFdDgVC TvC/+OOnBl2wp6mzLDbXqE2co68xAeYJzsz22KQfSuxduUv7Azz4NW9nqOMXTHs4xEk1 MuJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OnsVNR6I; 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 o22si3523330ejb.592.2021.02.04.07.02.53; Thu, 04 Feb 2021 07:03:19 -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=OnsVNR6I; 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 S236978AbhBDPAA (ORCPT + 99 others); Thu, 4 Feb 2021 10:00:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45731 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236989AbhBDO6s (ORCPT ); Thu, 4 Feb 2021 09:58:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612450642; 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=21kTSpbci/GKul+97WxXMOEIvXz0qLwA8h+cgydNMqY=; b=OnsVNR6Isn/Lyp8V0eC+WAqoqSuH3q1GVzWnvBjtnPIL2R7YbFP2X0DVEyAS+5wUorPUwL +2ExXujNeMaS7LIXM5dggv0PpXA45FEOroVwP0/5yleXSaFq3k/qJyU0lDjnPu3cjk54NQ DsVGqQnFxI92VAKK+vnYbC0ucMP5ozA= 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-307-cnLFCk8IOuGHiRtlyJv36w-1; Thu, 04 Feb 2021 09:57:20 -0500 X-MC-Unique: cnLFCk8IOuGHiRtlyJv36w-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 37967100C660; Thu, 4 Feb 2021 14:57:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-108.ams2.redhat.com [10.36.113.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0C875B695; Thu, 4 Feb 2021 14:57:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A19F51801021; Thu, 4 Feb 2021 15:57:12 +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 v6 05/10] drm/qxl: release shadow on shutdown Date: Thu, 4 Feb 2021 15:57:06 +0100 Message-Id: <20210204145712.1531203-6-kraxel@redhat.com> In-Reply-To: <20210204145712.1531203-1-kraxel@redhat.com> References: <20210204145712.1531203-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 In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 38d6b596094d..60331e31861a 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1229,5 +1229,9 @@ int qxl_modeset_init(struct qxl_device *qdev) void qxl_modeset_fini(struct qxl_device *qdev) { + if (qdev->dumb_shadow_bo) { + drm_gem_object_put(&qdev->dumb_shadow_bo->tbo.base); + qdev->dumb_shadow_bo = NULL; + } qxl_destroy_monitors_object(qdev); } -- 2.29.2