Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp548338pxb; Wed, 3 Feb 2021 11:21:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzts12RV5GmMrR3Je/xPtdZfrugAyQzmL+E3jKTtAWLtXDcM6Qv4LTj8prmaj/AkqLPRlhR X-Received: by 2002:a50:cd8c:: with SMTP id p12mr4685707edi.114.1612380073728; Wed, 03 Feb 2021 11:21:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612380073; cv=none; d=google.com; s=arc-20160816; b=bg3rSZtdiclzPRQ3N0rD0rb6HL8G8w/4A2v9B+WtRGxGUNcfSYllECSfAZGDhuxdQI PEh7Z4ALzcrqoLr3xCYewTH5ykp+hm6VGsSvlkiSqhaMM7RCayONFmmOEkThmEj7uAtY lCyiWJkThE5DyAV0GLj4KsBkzCf/lF2XImtcZ/DPXnF9SKxgi+dEp7Vce/0vMpz6lXcz n8nvoxyDXbgJmlTp2fOzviBjX65cLWfCkYogTicmLPjsz9GkmzqpObn3C0I3xp1ctIEd 83ZHGZO52C5sdun3FvQNPuVkfswFMNGsELX9ey+jbTTcPTxSi5xVUMlEF+bdSb4AbuVv tQEA== 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=OGBP4H/3/2+OJOR5T6tl2IqqC+dn4jYmHqKwNUy3/5KCScUz7doVeDP29lgtmNj7nx rCOfsNBj8DSZbvQYKUpWx3PwqpOyN17YNvQ+oWop7GhT8Q1XM3wSsXDFl0djSX6xVkfI EHsh4nIVhbHG1SXg468yPCzZfuQB1mh2UKxV/GXifnPAohEq64BrsiRPIUeM+D6XsohS mqQRKHPr19Bu9FNUxL/5PtYwjD3GRDjkAoERlEGg1Tr6CL12+/P91cIvjEhjWmiSm+7I H4v/eiKiuQAJOqlYIvzr8RinggHgh195lY8JrdIL1aHjjcYL+7oM2fQH5Du2SOlFIxJS oMBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dMqyU84K; 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 dn4si2356034ejc.205.2021.02.03.11.20.47; Wed, 03 Feb 2021 11:21:13 -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=dMqyU84K; 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 S231322AbhBCNRw (ORCPT + 99 others); Wed, 3 Feb 2021 08:17:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44413 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbhBCNRt (ORCPT ); Wed, 3 Feb 2021 08:17:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612358183; 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=dMqyU84KW5AQXL8yXqWJBm2ZyilbwdwdDy25yDgEVqtsCL8LiimPfgFnM+4+1DhpOhq+rQ NKkGqBzSvilCgJJKUhYzQP/i4ycNlLusrA9f+X6lVi8zaku8QN9xi2IgumjeecfOBXoL0Y 7FuMrgXTYaKRM3Db/PUCpbYYftepfAg= 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-210-hM2SqXu8OUSHBuPiOn25xQ-1; Wed, 03 Feb 2021 08:16:21 -0500 X-MC-Unique: hM2SqXu8OUSHBuPiOn25xQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 42B011800D41; 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 2DC1D19C59; Wed, 3 Feb 2021 13:16:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 80ABE1800857; 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 3/6] drm/qxl: release shadow on shutdown Date: Wed, 3 Feb 2021 14:16:12 +0100 Message-Id: <20210203131615.1714021-4-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.84 on 10.5.11.23 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