Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp452054pxb; Wed, 27 Jan 2021 11:46:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxljls4600sqzEVqv7QJL9YsD8OWsQDks88Whu6rps9/WeD0A0sgG9je9ey2vDr29X2qbRC X-Received: by 2002:a17:906:ae9b:: with SMTP id md27mr8257066ejb.357.1611776811771; Wed, 27 Jan 2021 11:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611776811; cv=none; d=google.com; s=arc-20160816; b=kw2p+0pLVl8VwsxNF99TG4wysdnPttun8pLBm7DYt4DIW8uUzfwzz6xMfyaYVaXYIP zk2txmH9fJOxMMPzTAt4VsrZN3nHfBiMr+IsM/Ttba7+XbL4Bf2gE69e3ejCPPiFx7MK udBoaADS4i7k6C3p6ApVN4WKsnnDBALss5lsE8cPZgyZJI5Gc3KFiLZBs19EB3jsqLGP ZZH/DoLNrprriQ3r7EQk0Uw5aFcN9u9FPiFL/qfQyuVZBGdxq7O91orvSUpjs7TCPYuX rWNQKMBfu7lJ9rp5+BxzvaBOw0qtFiqRaX4mbLZ3BLhVEHEJrElCtbwmlinFxUnrNGMv wAuA== 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=MZEflyF1dwhYzK+trMWmGhMpiUlZ0r/+H0hd8wKKx1w=; b=tGzX9I2BWjkBzsbbw/+J+kfAQvcHXX2SjxwiQ/viafgter6gRWo1uRs1RhUEZvoPwl j/At0I9DtiggNZnjJ1xZ6f2Q8oxxCzAps2K/kmXv95milMkWpJ95hwEjj623IcFLKAPD D07m6XdTf3pbUmLfyfdfWvchgnMpXBJOZ5BDV07a5RyhE7/ANuVyRkS2i8G1WliwQ/RC XY4NRT0GTQ0t5y7XMx7TOq4JXnmVzhE8UWNMu0y3nn/bargBX/SG3jGELsPet74Bss2S 6rr6Sjhvfe3LpnLKCm4qBf49BQcaNf52Kk1+3LLyqc5HlC2JvoJoQZXTbZS0MENEY0Bl PQHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aPrwt8BI; 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 bh14si1259235ejb.45.2021.01.27.11.46.24; Wed, 27 Jan 2021 11:46:51 -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=aPrwt8BI; 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 S317214AbhAZXnh (ORCPT + 99 others); Tue, 26 Jan 2021 18:43:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35668 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387932AbhAZQ7t (ORCPT ); Tue, 26 Jan 2021 11:59:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611680302; 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=MZEflyF1dwhYzK+trMWmGhMpiUlZ0r/+H0hd8wKKx1w=; b=aPrwt8BIwZ7SlpvfCPhrVk8+4GTmIH9ml1lRcXsDQ2RqwUNkENkFqDzAf+9sbdtHJAPXMr 3elxJHa6G+8ZJ6SiQLdgV23ri1n9usfNA0+JbfcwaTALCvaPr++S2j5D/FiEfTr8uBDpyw DgB1SirRloNFvcSk8YRsrMCr9wb7AYU= 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-407-YJgdJSw_PMaw0iQ-Fb1CJQ-1; Tue, 26 Jan 2021 11:58:20 -0500 X-MC-Unique: YJgdJSw_PMaw0iQ-Fb1CJQ-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 3104A1005504; Tue, 26 Jan 2021 16:58:19 +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 DA4DC19D61; Tue, 26 Jan 2021 16:58:15 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 294FE180038A; Tue, 26 Jan 2021 17:58:13 +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 v4 2/5] drm/qxl: unpin release objects Date: Tue, 26 Jan 2021 17:58:09 +0100 Message-Id: <20210126165812.1661512-3-kraxel@redhat.com> In-Reply-To: <20210126165812.1661512-1-kraxel@redhat.com> References: <20210126165812.1661512-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 Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index c52412724c26..28013fd1f8ea 100644 --- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -347,6 +347,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, mutex_lock(&qdev->release_mutex); if (qdev->current_release_bo_offset[cur_idx] + 1 >= releases_per_bo[cur_idx]) { + qxl_bo_unpin(qdev->current_release_bo[cur_idx]); qxl_bo_unref(&qdev->current_release_bo[cur_idx]); qdev->current_release_bo_offset[cur_idx] = 0; qdev->current_release_bo[cur_idx] = NULL; -- 2.29.2