Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp271418pxb; Wed, 3 Feb 2021 05:20:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFi0ebCJcdot4YiA24voNnAVcWfPMIEaKKx9asbgHm9T2DbEegvHyWcUYJTTgN2g3GFXnz X-Received: by 2002:a17:906:c0d7:: with SMTP id bn23mr3181989ejb.94.1612358454551; Wed, 03 Feb 2021 05:20:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612358454; cv=none; d=google.com; s=arc-20160816; b=UT3ul23ADbiHXkficYhEvBXYdPe0XmaaBko6dzV6fcfeGfQTUirFs6v1UKjnBQcfNZ WzbxO9TBTwFImFLuJH8jDmX31ZOw2Fl9eVxpt2suXUMRMXD8KBQVTnDyUBR3bBB9C+O8 NEG5HRhSO8pZgVVdRxtqePZ5pQ8X3j6TJIoJfoUVW27rP0OYYHvVujja/9iXXxoVUJiF WLkiwKCQZ0VrocPzlLwy1xPdIcUiIDTc37a+BIhJzZvjJ7o7aPkhvQeNABfU1qQbNT6X 3+u4LVdyfJFpbZfcztzsraxowkLnpfNRrH/ITdbqPUXhQTcanAK2NaEjw0AwSSg/I3s0 0ZtA== 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=S9YYWXcN78HBxl18/4KCj5/LqW10+zH4gUEGqAo44INwW/tvmmwIJc6xvkabU3OSLv mPFKvZ+gZe3ownfBzb+tgRxjIj0cD6ox2Kk80RDekrng1w6MpOB5h4LU7d6GSfl4lvgG lCp1Q11aB8sAdwg85caxR9S1AYTTJfuVuixBLWMkXzZxOlIEhONwyx2VF4X4o+71JVd/ hZzp90NLUBS0XbWkNt0y/h5wcyB86pkhTxcZ6rh2UTHlWw3r3HYa5ERRKooyZCwMJqsU C+7xAMMrgAvIxzbbViaXR1wKPze8yoVSc2feE4Fz853DGmmeoBoqAu6l8CTcIaNaRtXq HQbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MRR6nNV8; 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 fx4si1307464ejb.157.2021.02.03.05.20.30; Wed, 03 Feb 2021 05:20:54 -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=MRR6nNV8; 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 S230027AbhBCNRu (ORCPT + 99 others); Wed, 3 Feb 2021 08:17:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60867 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbhBCNRt (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=1612358182; 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=MRR6nNV8bbLrqOmycjzIXVdNJBSCWlmDmyjiJMJEFGVLAGqIT3qvf2bkkw5mcr64aZzuW1 3BY1eqJJA0hYGEA2MFpiJI4jaLc8i/UcBPTriUQC6DYc9bN9kruJMxRZqPGL8LK7tDoeFM Wd6EU63gbZw+5PHfdTzjd1k/D1T5T1o= 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-445-WHC9MSlGM_yZ_0gATXBYzA-1; Wed, 03 Feb 2021 08:16:21 -0500 X-MC-Unique: WHC9MSlGM_yZ_0gATXBYzA-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 1C401801960; 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 239EB5F9D7; Wed, 3 Feb 2021 13:16:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6087D1800856; 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 2/6] drm/qxl: unpin release objects Date: Wed, 3 Feb 2021 14:16:11 +0100 Message-Id: <20210203131615.1714021-3-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.79 on 10.5.11.16 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