From patchwork Wed Jul 13 08:12:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12916192 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 CBA1CCCA479 for ; Wed, 13 Jul 2022 08:14:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BF9A95D0B; Wed, 13 Jul 2022 08:12:52 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 117D59536C; Wed, 13 Jul 2022 08:12:35 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D991061B01; Wed, 13 Jul 2022 08:12:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DB5EC36AF6; Wed, 13 Jul 2022 08:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657699952; bh=cek8uuJCsBV9acCHN6Py4rPGTwRaYdkk3T9/tHIBSPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V3/I4po2XZFKDYXmAwUF7rpr4fWvqBpcWvvmCcYQJ3UD7WVeBM/Vmtc4THACX0n4a T3B/Oase/GG28x4wmKNEttXdZdrAxWd3amGxpOqh+rWET93h9r8aWICwmL0q42PGPj lfuSzFhwgzo+UX6m8V/m3vFwRuEFVEL8G+KCzyLtz2Ew1NIVXRhHrdGiL4VC6LBA3P FvD0M9GKD7ctbEF7N0DyJ9peyImvcVmrkbhBuqXwdzmx8uySnLGwNZ1vY4BlUl03Wl 4Ga4S4ja1029U7I2XfhOc8/rLIH5DrjO41zx5cni5fm2B9WkJFsaNBhiMsTFbxRYNN c/oVYaLtki7DA== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBXTy-004zud-1u; Wed, 13 Jul 2022 09:12:30 +0100 From: Mauro Carvalho Chehab To: Date: Wed, 13 Jul 2022 09:12:24 +0100 Message-Id: <6bdbfc5a739deceba57175269cc8e129ca481ed9.1657699522.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2 36/39] drm/i915 i915_gem_object_types.h: document struct i915_lut_handle X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thomas_Hellstr=C3=B6m?= , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Matthew Auld , Rodrigo Vivi , Mauro Carvalho Chehab , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" commit d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") added a rbtree list to allow searching for obj/ctx. Document it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Rodrigo Vivi --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v2 00/39] at: https://lore.kernel.org/all/cover.1657699522.git.mchehab@kernel.org/ drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h index 5cf36a130061..ceed0d220ce3 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h @@ -21,9 +21,15 @@ struct drm_i915_gem_object; struct intel_fronbuffer; struct intel_memory_region; -/* - * struct i915_lut_handle tracks the fast lookups from handle to vma used - * for execbuf. Although we use a radixtree for that mapping, in order to +/** + * struct i915_lut_handle - tracks the fast lookups from handle to vma used + * for execbuf. + * + * @obj_link: link to the object associated with the @handle. + * @ctx: context associated with the @handle. + * @handle: a rbtree handle to lookup context for specific obj/vma. + * + * Although we use a radixtree for that mapping, in order to * remove them as the object or context is closed, we need a secondary list * and a translation entry (i915_lut_handle). */