From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5A86FCA178 for ; Mon, 9 Mar 2026 18:50:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15DBA10E125; Mon, 9 Mar 2026 18:50:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="D/x6fmxf"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6ACA10E125 for ; Mon, 9 Mar 2026 18:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:Sender:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=iOMWtsESmoEbZ5KQOERQCsxw0l6buAHhPbGmR+Cj2Y4=; b=D/x6fmxf3/5zH9BF1oEhXb/s7W UiU3S+qVMP+0urSOAy2YZRsD/0hb/AKI8KAzCBphcgSmfSi9DA2GTJc8JcY8gDj9eNOBd5wEcPzTx jVYAKk3Ju+uB1ijuZAqYH98LWTai08vGpPgAqDvtXTrUMcIjBZ9R7l1A3OKZ4aK/kr2FcoHieJxe+ hzB7TRyW5Z5qSuny1iKM1z8P9SsSLfwosdxFRA2jx+JIoMepYfyjGyu72Kkcw+uAdsPkI7xl7z0vb rw7Z9MGoYalV/nEQPoGiUk/RPsGbvMcWu3SMI6up0h/QgcDADiE4AaDRJHSmERQzjcqGRD8tXj9yN pcjpwiqQ==; Received: from 179-125-91-67-dinamico.pombonet.net.br ([179.125.91.67] helo=[127.0.0.1]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vzffy-00CBr7-Rg; Mon, 09 Mar 2026 19:49:59 +0100 From: Thadeu Lima de Souza Cascardo Date: Mon, 09 Mar 2026 15:49:52 -0300 Subject: [PATCH] drm/ttm: document that ttm_bo_swapout deals with pages MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260309-ttm_bo_swapout_doc-v1-1-eeb08176a00b@igalia.com> X-B4-Tracking: v=1; b=H4sIAE8Wr2kC/x3MSwqAIBRA0a3EGyeYkVBbiRA/z3qDMtQ+EO09a XgG9z6QMBImGKoHIp6UKGwFTV2BXfQ2IyNXDIILyVves5xXZYJKl97DkZULlhlh0VvXoRQGSrh H9HT/03F63w/8hvykZAAAAA== X-Change-ID: 20260309-ttm_bo_swapout_doc-b2cefcd5e62b To: dri-devel@lists.freedesktop.org Cc: Christian Koenig , Huang Rui , Matthew Auld , Matthew Brost , kernel-dev@igalia.com, Tvrtko Ursulin , Thadeu Lima de Souza Cascardo X-Mailer: b4 0.14.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Both the target parameter and return value of ttm_bo_swapout deal with pages, not bytes. Reported-by: Tvrtko Ursulin Signed-off-by: Thadeu Lima de Souza Cascardo --- drivers/gpu/drm/ttm/ttm_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 0765d69423d2f4028bf2effd21af53e117ee7a29..839ceb31135bc8e552f9add1357a64c6774aeee6 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1210,9 +1210,9 @@ const struct ttm_lru_walk_ops ttm_swap_ops = { * @man: The resource manager whose resources / buffer objects are * goint to be swapped out. * @gfp_flags: The gfp flags used for shmem page allocations. - * @target: The desired number of bytes to swap out. + * @target: The desired number of pages to swap out. * - * Return: The number of bytes actually swapped out, or negative error code + * Return: The number of pages actually swapped out, or negative error code * on error. */ s64 ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx, --- base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 change-id: 20260309-ttm_bo_swapout_doc-b2cefcd5e62b Best regards, -- Thadeu Lima de Souza Cascardo