Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2477011pxj; Mon, 10 May 2021 04:03:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHO9kzgKuGF1SjDe1ykMkeWV9+m6T5uGbx7IdcvXCwjqS3G4636YRzOS690y+zLhxHW+ah X-Received: by 2002:a17:906:170d:: with SMTP id c13mr24580134eje.491.1620644612824; Mon, 10 May 2021 04:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644612; cv=none; d=google.com; s=arc-20160816; b=I6USNVaVE7ImDssfu2XKGD7qBDrJnyrK0FtgWDDKrCykshlFe0CiYOul+fitF1q3Ic 6gJuLYQ3/7xocgzmZ3rZJgNQ4JuVwvamok8ZeAoSLqiQ/28xhPmLQjHROncYhinTQ8wn crCTTJMiktKohf6bSX7FluubJalxg2UbdWeRFVdiZdzM2QPehjj3nTIvIfUEq2uhEC1R UaXNvpiTM63RKwrlgLPtwXPWqCjQLvheNmyQdnrWH+y+6tNO0/Fx6EKMnrCcZwCoA6Oz PFTNPa7xgmCMZKNxLZNQbCBeST8hwODXDDSDvoA4qUhKytdcrV/CJetxir/GNwnzxGPp oSoQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZZf0EQ3po4pypQibsJXhwkRx1UFpyGFCh7Ft0pPzueI=; b=AN5wRWg55Nxh0lWhHQ59vKxBdCUq42qHaB/awkxPAmCf61mNwUIJ3HM7+/foAUzuVv Y1XaP3d4xDAbqlzKpYKyWW+il31nboHMw6ioW3fRnh+3xyaycogIXxjwWPkXuG8+Ae/r hGA62YPnRA/mYt3GFOntSpgSB5j1XYgxcGOxQLNYscRwJQrYX+9Fd1ATRFFJel2JeeaT taWnprdILf8QuTuN8XimxBjxUzcJ2gMCUyKzWYqDH9xkJhgibiOCCPHzBCtKt2kgtoet blRUNWmsMbtGgJcfjFhlAZPSjd3RXo3jDbmZ3YRMoA9hsmZ+/GaLuNos+65/OxJWmOBq k+2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uZQVJ8DT; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si12978864ejc.83.2021.05.10.04.03.09; Mon, 10 May 2021 04:03:32 -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=@linuxfoundation.org header.s=korg header.b=uZQVJ8DT; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233996AbhEJLCG (ORCPT + 99 others); Mon, 10 May 2021 07:02:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:32908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233304AbhEJKpg (ORCPT ); Mon, 10 May 2021 06:45:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 537C86198F; Mon, 10 May 2021 10:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642946; bh=FQ95+PVS9jyQVavZhWJcRl4uzYy8iOsxHCq9oDkNd8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uZQVJ8DT6oVmcIs72uSH1Lap2s85ukYrMrkL1quM39jeqho91hq7U/KYHUF58a0zf 2oWhSspyi04fHP/ZdGSPCUdgj5J2LlAQG/Fis3hqA0/LEfau84Wt/HnABazlmELSIT 9XygVzY3PD9b8+SEJ/nlT17FRRoxhk08u2reApIM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gerd Hoffmann , Thomas Zimmermann , Sasha Levin Subject: [PATCH 5.10 115/299] drm/qxl: release shadow on shutdown Date: Mon, 10 May 2021 12:18:32 +0200 Message-Id: <20210510102008.767521193@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gerd Hoffmann [ Upstream commit 4ca77c513537700d3fae69030879f781dde1904c ] In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-6-kraxel@redhat.com Signed-off-by: Sasha Levin --- 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 862ef59d4d03..1f0802f5d84e 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1224,6 +1224,10 @@ 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); drm_mode_config_cleanup(&qdev->ddev); } -- 2.30.2