Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3795302pxk; Tue, 8 Sep 2020 02:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoJAsnDBxrW29nsowtC5yhfYCy8DO57zNsDuwDK53Rwud+zV+94s8yFSy4IPiV6kJQUBmZ X-Received: by 2002:a17:906:150b:: with SMTP id b11mr24757114ejd.234.1599558150787; Tue, 08 Sep 2020 02:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599558150; cv=none; d=google.com; s=arc-20160816; b=BS66cgLwPVr6J8lCNSXV4ho8putp2TwTXlMrHUWFXpF5yYHhkmv4pfZuxGJXuOw+RA Ww/7QzVpUO0L81RKqYGYrLVEEdRjL2L13lNBaK/qey1XXZYNd6aEigl8MwKrEm4Ae8Nm 9lk2NcyAm/k1kEhtdt6EouX76l80v0AJJw6oYKn7EsGLjRQQlPoNg5XTMuXK/9g7C8kk mO8xtJc28zF1HmBj2YH3WdAVrDCsII4YL8eRuUSt1ckKnnoy4SYlWq9byEtcgEZlqrYV ATglkBmW2S85+LW3z69z+jY5T2r47m4wLs/v9F5hvM610YlBQb750zWzj7iN3w1m6mQw 22Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qVxNUAokGN2H9v5wGwILALSBb04DCoerMCl0Uhq5roc=; b=Uo645qfmRF7ZKVeG4/vlwuanJywSJJSYQr2y19C1yPpejVLrY5BEOIYhIWYSF3/dB7 kqbQtZjeoxs0YRdPdr7g3mdxfPjW7rUDcDQP2quPAFquxH7F288ZG9RxZ5+jM1CrGEPg MjUDqNimuhu73fTfTMd22Gb6dOUVAOtCP1agWEq4ud95YeMY7/lButE/cP+NbDS4xnvY 1MKrFSMFCOBY4srAonK2ZrT4Bp+ESt4zYA/NK4oSoEMoaAsIc5eN+5bOEFzUC/P6Asl/ m0sEMP6CXl7dzpvusXkBBcXD107PmXslsoGmYIF/GyX1wRMpa86CfBxNAZkPu0bWnsEe t63w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iL+zFXvQ; 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 bu5si12071360ejb.750.2020.09.08.02.42.08; Tue, 08 Sep 2020 02:42:30 -0700 (PDT) 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=iL+zFXvQ; 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 S1729054AbgIHJjX (ORCPT + 99 others); Tue, 8 Sep 2020 05:39:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22078 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728936AbgIHJjW (ORCPT ); Tue, 8 Sep 2020 05:39:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599557959; 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=qVxNUAokGN2H9v5wGwILALSBb04DCoerMCl0Uhq5roc=; b=iL+zFXvQuCtbah/aceoCyjsT3insFQr4RPwKA6EK0OK6AqJvdi7YSbq6BwdEWN0n20+51/ 9bf4xQAmxVX+OPDCz/xvlHNx9F8iHAcy2VCXL4Ddw2Cyj62p5tEactV5NmA5YCnimvOyaf WIDgabrn/4j4kVhv0ouGX0PvGA1Jwv4= 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-29-JDmDoVkDM4umrjseKisarA-1; Tue, 08 Sep 2020 05:39:18 -0400 X-MC-Unique: JDmDoVkDM4umrjseKisarA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DC5C1091065; Tue, 8 Sep 2020 09:39:16 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FC395C1BB; Tue, 8 Sep 2020 09:39:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7B678204AD; Tue, 8 Sep 2020 11:39:12 +0200 (CEST) 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 2/3] drm/qxl: release shadow on shutdown Date: Tue, 8 Sep 2020 11:39:11 +0200 Message-Id: <20200908093912.26792-3-kraxel@redhat.com> In-Reply-To: <20200908093912.26792-1-kraxel@redhat.com> References: <20200908093912.26792-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org 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 4be04eaf7f37..85dcb7fe56a9 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1224,5 +1224,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.27.0