From patchwork Fri Jul 1 18:52:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903616 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 56AC3C433EF for ; Fri, 1 Jul 2022 18:53:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EC3D18ACA0; Fri, 1 Jul 2022 18:53:14 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8442F18ACA9 for ; Fri, 1 Jul 2022 18:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h/eGVHzjhye4tUiS8VCyJS+YtTUEyz7/sK1IBUUWWhM=; b=eBc/wSJhnIrqprJs//KLUu4iyxDowJ+iJbomoal+AyTUyApzrZQgde0rYvymxhHcCcyIRG hnXDyS7gDi3hTvGqVlxTAUmXFp0GHQxu2HKJX6TDPrsAJh7xiO+eQWyFUaYeUOKRjwslHb z8ovWG1Se8mjIb5to3jLCFI2YQsuaXE= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-203-yMAXBnsuN7-pfcmMdRpwBA-1; Fri, 01 Jul 2022 14:53:11 -0400 X-MC-Unique: yMAXBnsuN7-pfcmMdRpwBA-1 Received: by mail-ed1-f70.google.com with SMTP id i9-20020a05640242c900b004373cd1c4d5so2302191edc.2 for ; Fri, 01 Jul 2022 11:53:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h/eGVHzjhye4tUiS8VCyJS+YtTUEyz7/sK1IBUUWWhM=; b=oLkhlkKT3abVr/vGiUsud6aOAppBpxRlw8qvyapIc6Y5UlPgegYHjtqVnPWpZb6/oN vTmi+Zv3MEjw/Pq4dnu2tnMb8Yia+ZOJpMEowrBAOBIdRVfxtKYQ00C6g2uLXG9n6G8v yhcOu1B+p6QEb7AHIzydhQpWARz9sNHo1KK6Nj+KMuPLtwNQ/Fk8b4rPlzOc271fuERd Hw9jVXo5zEyB/CP4ZAaQklZDWWlPj+J2jrrSGdmHXc9wJnV+aI2WoqMkn0Z52ADQpcJX aNW6A7gTO1cO4e/07xsSWZiwR0SCvwpn50kjB88/Wq6YzlhJDDSO6zwESgjBBTuH+xQc A+LQ== X-Gm-Message-State: AJIora+y2wsxR3tkP1Gn3fpO2kdRXvEjpsvETOkmHdVjrqWPOvYZkI8K 5k/ZJDeZJc3KUe7+G/LfbgsWNtCm7cV0SNArtxv8CqEDZp7yMXO16fl1bJ9kMSt/mm/AOih1zFj Yk1SlvzGarjBaEwx+6yctyrkHJKRe X-Received: by 2002:a17:907:9488:b0:722:e5c8:c647 with SMTP id dm8-20020a170907948800b00722e5c8c647mr15451430ejc.291.1656701590532; Fri, 01 Jul 2022 11:53:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twrosMg5ykAMCjALhx0tb7xsAbjXTCVpYQRYG7l64S4JJBJdRhEr/kbxeM0Y3ZOyHI+W5ZJQ== X-Received: by 2002:a17:907:9488:b0:722:e5c8:c647 with SMTP id dm8-20020a170907948800b00722e5c8c647mr15451417ejc.291.1656701590372; Fri, 01 Jul 2022 11:53:10 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:10 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 01/10] drm/amdgpu: use idr_init_base() to initialize mgr->ctx_handles Date: Fri, 1 Jul 2022 20:52:54 +0200 Message-Id: <20220701185303.284082-2-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 7dc92ef36b2b..cc87c3809a8d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -841,7 +841,7 @@ void amdgpu_ctx_mgr_init(struct amdgpu_ctx_mgr *mgr, mgr->adev = adev; mutex_init(&mgr->lock); - idr_init(&mgr->ctx_handles); + idr_init_base(&mgr->ctx_handles, 1); for (i = 0; i < AMDGPU_HW_IP_NUM; ++i) atomic64_set(&mgr->time_spend[i], 0); From patchwork Fri Jul 1 18:52:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903620 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 79C68C433EF for ; Fri, 1 Jul 2022 18:53:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C2C218ACC3; Fri, 1 Jul 2022 18:53:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 43F5418ACC3 for ; Fri, 1 Jul 2022 18:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=63rX3ptgchfOBbW8BmUq0MeFehoHIgkdOiFcVPPOAq4=; b=JvY8vEY94MlXRj02Cl3xeIR0nMzmkIu5UOQ8nEv2WuFu2PdP99BL9hCRrmKSJ80r3eFjGW qC84SUXM9A/ju9qcxDLtrVNVai+9aBivH09EqlVBuaHKYUBpX+CdZA2BKKRkuxeqYhCPlJ 28usOWeuo5hEMVtXGwUs6Sg8zb7w5nM= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-448-pMmPVl2-P0elFkYBdkOUFA-1; Fri, 01 Jul 2022 14:53:13 -0400 X-MC-Unique: pMmPVl2-P0elFkYBdkOUFA-1 Received: by mail-ed1-f72.google.com with SMTP id h16-20020a05640250d000b00435bab1a7b4so2305094edb.10 for ; Fri, 01 Jul 2022 11:53:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=63rX3ptgchfOBbW8BmUq0MeFehoHIgkdOiFcVPPOAq4=; b=kE9TTJo5DFwQPJNwh9QGkCSabiaUSDucutKvmFz5gfxG9Ypo2FrULqDcIibVF6DtcA ouTDeFd9x611ki9JmYXNc5nnqfJjRyeCYcRin+bFfk/rYb87Il1RWA6uubyQSjInVq89 mF6oZT0FpX5ZEuv53i/9IgsArK37Ayeyaoq29EShUNCT5jsAOoQtxBMMJ9M4fGQiVfgQ ByEuce906jTMZVArrE7Hf3VS+oUNY58nlK74RK0n4OCACdFwhPlwVIXuVqul2vtsSKVl YB0y3JIqzYpDlckZR3MQPJCaPJM/Hvc9gcZ37ZMLrVmhN4/DAZkdx4RmzdqhLFjF9bim ahMQ== X-Gm-Message-State: AJIora979/vGJhQN6ZWQD9o0uBxIbH4hu3JIbHYEEgHqgUihJgL1CdoZ oNFk6AUxgx8X4DqUpxDOm5bDQjCjQNYlcHP2FuE3KrDFqRT1k8PjgBD/QOXjqDnalABb4uZ6p4Q GMN400sNtnotYmOGRyLA4jS1idr0p X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr15143277ejc.617.1656701591431; Fri, 01 Jul 2022 11:53:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2CRyy1sngD6eC2nYuVt9TTA6P9z7wTWn5nnIISMwguXpv2JkANsqjZQx9hF16u8hYh17A3A== X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr15143268ejc.617.1656701591277; Fri, 01 Jul 2022 11:53:11 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:10 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 02/10] drm/amdgpu: use idr_init_base() to initialize fpriv->bo_list_handles Date: Fri, 1 Jul 2022 20:52:55 +0200 Message-Id: <20220701185303.284082-3-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 6de63ea6687e..103927c48d05 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -1148,7 +1148,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) } mutex_init(&fpriv->bo_list_lock); - idr_init(&fpriv->bo_list_handles); + idr_init_base(&fpriv->bo_list_handles, 1); amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev); From patchwork Fri Jul 1 18:52:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903618 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 0E157C433EF for ; Fri, 1 Jul 2022 18:53:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51A6E18ACA7; Fri, 1 Jul 2022 18:53:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2056D18ACB3 for ; Fri, 1 Jul 2022 18:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CdygpZqh9NvpmiEiKhKOinbjqxdLDChD2fJR1JgBJ3I=; b=RbaJ91tub7EaXgMFhqNn32xfbqQ6p6nGEsZMI7rikDorxS5nDZPW7fKuTzw8gw5uWEKjPv EgDvC/XcOSGFO7kgTdDQv9YIusgHCj7QMFKfgy5pZc3QCwt9MJVB/UlIkbH4+kXq8WJuhz Vd462ZvibOYTEz93kQ3R0DXSDi8+f2Q= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-396-OR3mvfU6MnaG1C1IrqyfPA-1; Fri, 01 Jul 2022 14:53:14 -0400 X-MC-Unique: OR3mvfU6MnaG1C1IrqyfPA-1 Received: by mail-ed1-f72.google.com with SMTP id q18-20020a056402519200b004358ce90d97so2274757edd.4 for ; Fri, 01 Jul 2022 11:53:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CdygpZqh9NvpmiEiKhKOinbjqxdLDChD2fJR1JgBJ3I=; b=6L3IqDUbYoeLnGeQVcU9rWGKRd38buRAUNxnUPOub4gake139iegRF/H9h733O3pTk Lrm5B6TTDyq09rvF5Eg8IJViqwkp+wgGkBPIaGhoAVsA3YXNI0tP9ZUT/NSGqNIbrfnF 7N7S40ogzdWJG38/CmufANLX+UzaRFve/KkVA6wUVwhdaHiU89651cngkN43Vwx57MS+ 7BBxfjcEH6fzkNWsGUMInBAhmXgwb9h+fZrPxvw530nHx1awz5AAQ9OC3SbpbgXnnI6B l1U547nTFnMaE9mMYMV3TtY27KQYbPLJ+K0HTRDVXXMIYFZXsVP4fndCEr5RtsEdJ/gK ip6g== X-Gm-Message-State: AJIora8nKoBISrjvbnfyt6pbYH7WNmNSXt97aqOU9c7UYZCKocZO7zY1 86lOlEz/zm68MKHIuL8nTy5Mr3LHv4s4bvc1jcMAwLx/8HgXe96Grx2PXXZv6Lahz4ppX6Fx1Pp VRLa5GaVZFRwzjvSXiirUilIHZhd0 X-Received: by 2002:a17:907:1c11:b0:726:851e:179e with SMTP id nc17-20020a1709071c1100b00726851e179emr16035592ejc.39.1656701593201; Fri, 01 Jul 2022 11:53:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s0Fdu/TsECHntNJrudLVig+OOZhMwqESCp2Ml9dWHu45h34F9jhd9i+N3vVzxtmd/q3deigw== X-Received: by 2002:a17:907:1c11:b0:726:851e:179e with SMTP id nc17-20020a1709071c1100b00726851e179emr16035577ejc.39.1656701593048; Fri, 01 Jul 2022 11:53:13 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:12 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 03/10] drm: use idr_init_base() to initialize master->magic_map Date: Fri, 1 Jul 2022 20:52:56 +0200 Message-Id: <20220701185303.284082-4-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 6e433d465f41..63395bebaa6b 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -140,7 +140,7 @@ struct drm_master *drm_master_create(struct drm_device *dev) kref_init(&master->refcount); drm_master_legacy_init(master); - idr_init(&master->magic_map); + idr_init_base(&master->magic_map, 1); master->dev = dev; /* initialize the tree of output resource lessees */ From patchwork Fri Jul 1 18:52:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903619 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 9B254C433EF for ; Fri, 1 Jul 2022 18:53:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1139E18ACC4; Fri, 1 Jul 2022 18:53:19 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29CEE18ACB4 for ; Fri, 1 Jul 2022 18:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lD0UgE3dxvQIzw1sirJUBY/8o36UmN7hqjArgRHfL+E=; b=fvDIgO9fzccydrxYH1fmjcQuwU97JbiXUShqAzB02LxO7GBWUG5DASI4NIx3LJFe6MnDJJ FGhSU4ObnwVUt1Dnf8IEtbpZLzFw7plXi9s5r1/Fd9qQYKTGxTj91Ei7OdeeXj0tYN0grt 2qNYD6TGp2NrBQErJqgiMYG8LRwFOnc= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-219-71smLnfHOH-_aaJmZOlPAA-1; Fri, 01 Jul 2022 14:53:15 -0400 X-MC-Unique: 71smLnfHOH-_aaJmZOlPAA-1 Received: by mail-ed1-f69.google.com with SMTP id b7-20020a056402350700b00435bd1c4523so2304902edd.5 for ; Fri, 01 Jul 2022 11:53:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lD0UgE3dxvQIzw1sirJUBY/8o36UmN7hqjArgRHfL+E=; b=cCyBhp4SUb1azKCVdP9OsoUAf5Ux+yOnw9loHRUDGQJQUt0EoFRR1PMi4Xev+d/5mF Ta4Swm14aWsCCf/5TOApDsnO5rWHIij5U/joCbRtlpSVOcX10Zb+OBhaMjOksDFIFDEE nsVdbXnVZaaFUq2g2dc2jPHtjGl73IDdcsNzlryGwP0BgfQcBPuj7RyumlnnYF/YlwHM VFfsNhhwMaAk/2RAdIDYkB5p4E9Y47kqHXyOwuryVq4Wl4as8JGe1MR8Xfjl4kY5qV+9 XMFA3xIaL4ipWiZq/e0EiGymPVT/R5hpSsmrCtlfJE18/vFbpFdUeV6fn5KRJjKdQTvw ejqw== X-Gm-Message-State: AJIora/klpmaiz4pyhQWqz5a4UwBlqh3yANoK+5llbxNnbQ5dbDoGVsJ gH/zJxxg6DiFRU2ZKvcIPED/9rvlRAgdp6gyumbAps8R4jnQ/guFBsP2MpmpiTxqgfoySAAWSWt BmFyRlWVPLYjgzRohNuLax+bv6ubX X-Received: by 2002:a17:906:1b01:b0:726:be5e:7125 with SMTP id o1-20020a1709061b0100b00726be5e7125mr15735027ejg.678.1656701594156; Fri, 01 Jul 2022 11:53:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tpE4potQHDaod4k+BwhozruburD50UmURvnLAMEsNDMRIJU1naqj6jrZJomh6q2+TomW/yPg== X-Received: by 2002:a17:906:1b01:b0:726:be5e:7125 with SMTP id o1-20020a1709061b0100b00726be5e7125mr15735005ejg.678.1656701593960; Fri, 01 Jul 2022 11:53:13 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:13 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 04/10] drm: use idr_init_base() to initialize master->lessee_idr Date: Fri, 1 Jul 2022 20:52:57 +0200 Message-Id: <20220701185303.284082-5-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 63395bebaa6b..cf92a9ae8034 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -147,7 +147,7 @@ struct drm_master *drm_master_create(struct drm_device *dev) INIT_LIST_HEAD(&master->lessees); INIT_LIST_HEAD(&master->lessee_list); idr_init(&master->leases); - idr_init(&master->lessee_idr); + idr_init_base(&master->lessee_idr, 1); return master; } From patchwork Fri Jul 1 18:52:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903621 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 4DED6C433EF for ; Fri, 1 Jul 2022 18:53:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A09218ACAF; Fri, 1 Jul 2022 18:53:20 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED01818ACC0 for ; Fri, 1 Jul 2022 18:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=122qxecwdqzJ8Ugfz+kvOKIEtAtbHr1tJgGRsr7PPpU=; b=AvjvoYYnMLmqwseQRu1vgpGmQijxHHpy+nbzqjnJlT8EYYhLIYHP4dmZ+K5INhCf6IkceM gx1nw6W43z8YQbKfUFrrGMsxWE532w4zv/Mco22TZ/YlSRSssq3VASPgUaECrN5zBJAnNP XhPKzkGig4fxoA48BAPXnWbhE/ebOVA= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-92-UTTew-esN6uYm_sNgz552Q-1; Fri, 01 Jul 2022 14:53:16 -0400 X-MC-Unique: UTTew-esN6uYm_sNgz552Q-1 Received: by mail-ed1-f71.google.com with SMTP id z17-20020a05640235d100b0043762b1e1e3so2291607edc.21 for ; Fri, 01 Jul 2022 11:53:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=122qxecwdqzJ8Ugfz+kvOKIEtAtbHr1tJgGRsr7PPpU=; b=iNuWdcIfkfCuGok0rLj3IPGwLB1BZ9NJXOxscN8ge8LI/LhTwjVLItYtf3XSBriF/8 FYbzHXtQPp6MM6+x/huAuJGnzVGCLD0Aymt94Hfl7saNyJKogFq7OWloh8/1hLwshATw ZWT3KG2221PSzDVAFkBU0967UBvfic4TxhAt8pRFz/b0zV5A9SAm+1b3HP9vQuFfOYqW //VxR/gxrxWuwNnveMGF5DAprwwXcegOx9atpNWyVfHLfx/tl0R6lb25zbew6bZl5d0d 2nd5RF3gF6uXpb4Xbi+vU2GgjPB+Wxg/iXsocgwr9HkmXky69tHAgn9JPgXgfBWkrEz+ B3Wg== X-Gm-Message-State: AJIora8DQPx2fRyTJ23QgN46zr/nDRtisR4Z6CZW24EW0Zs3oMAYYvHA robAH5uR3IpE8alaWTP0ylUI4X06WQowCsZICeLTDvXHdpPK7NfZ7H7di4gbhcWDvhZlyhyVYPM 5Jggi0ASzMLitX06FQqw/7x9Igf+l X-Received: by 2002:a05:6402:498:b0:435:daf0:915b with SMTP id k24-20020a056402049800b00435daf0915bmr20387351edv.322.1656701595155; Fri, 01 Jul 2022 11:53:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tfkBYtuvcwm4VYGQy9UccCKu7Qvni141Sl+kLC2NT5OI/FHv0D+4sTupIA3MUcMStiXF0FVw== X-Received: by 2002:a05:6402:498:b0:435:daf0:915b with SMTP id k24-20020a056402049800b00435daf0915bmr20387327edv.322.1656701594973; Fri, 01 Jul 2022 11:53:14 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:14 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 05/10] drm: use idr_init_base() to initialize mode_config.object_idr Date: Fri, 1 Jul 2022 20:52:58 +0200 Message-Id: <20220701185303.284082-6-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_mode_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 37b4b9f0e468..e2a295a4ee0b 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -411,7 +411,7 @@ int drmm_mode_config_init(struct drm_device *dev) INIT_LIST_HEAD(&dev->mode_config.property_blob_list); INIT_LIST_HEAD(&dev->mode_config.plane_list); INIT_LIST_HEAD(&dev->mode_config.privobj_list); - idr_init(&dev->mode_config.object_idr); + idr_init_base(&dev->mode_config.object_idr, 1); idr_init(&dev->mode_config.tile_idr); ida_init(&dev->mode_config.connector_ida); spin_lock_init(&dev->mode_config.connector_list_lock); From patchwork Fri Jul 1 18:52:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903622 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 EB7F3C433EF for ; Fri, 1 Jul 2022 18:53:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D901318ACA8; Fri, 1 Jul 2022 18:53:21 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC54318ACC3 for ; Fri, 1 Jul 2022 18:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UvErFdRb+yQ6d7xkP3vZiS7WsAN0qxK+4nKZEOvYY58=; b=g9F7jGqCUiFMh0RfUN5QtxwBFTIRvJCdbOP0U2S4Kkn10gQ5iZBUqSJbiNj+JMZSQCxdmF dLEDpRR2WmXgkOqJC014GuAftc6tzvOTEyBnudY5Yqbbp7KnqNQVKKl91o5DyaZR44Pjn4 +DQQKRph4mhK8PzBbaZWzh9+IE+JkAE= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-645-1I7sbil8NA66gt8uOElCbQ-1; Fri, 01 Jul 2022 14:53:17 -0400 X-MC-Unique: 1I7sbil8NA66gt8uOElCbQ-1 Received: by mail-ed1-f70.google.com with SMTP id m8-20020a056402430800b00435cfa7c6d1so2298233edc.9 for ; Fri, 01 Jul 2022 11:53:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UvErFdRb+yQ6d7xkP3vZiS7WsAN0qxK+4nKZEOvYY58=; b=yfp3EHgEO7UCnLJ3kkxNeoQCkh1zr1nP/0ds9zUlsTGpv+atITUPlsSdEqQoE8xVrZ HnSGIK4whJNtIqQI4iTLkYkFQ/qE/kPJ0jwgk2CHep2JHZd13S0ajTCejbzNclhOmGLY eOF5dSA9FeWlYCDN+oe1+rdoKga3eMsUnG2sDgvceTaiG7x4SbXacyGoax3fL+dfDke8 KrRPYsh3ZDyonK+7Bxu6Sx4qwCV40n2j4GbquB4Rz5QCZCROkJactw5m+f3tLIuWLTgy 1leaioag1SS0GG8DF/Gcdhl3lt2Pnxp84QVUA9lQRoccvbcATx9dS6DIWmVlxfuRxoHL XUmg== X-Gm-Message-State: AJIora9jumyh9kQFm6UU01sLx5X2z1i8glb4S5GqjKP9e2y2cDXTNNuD c8FbOB2mFWV7+kYxo4jHbT6Rs+TcLIsV1W8ZsyLq7AGv5NA6joIpdkgu5hWKpv8YeALTDmV55DI lrMYxCz/A8l2EqSjAs91CBqhHqp0l X-Received: by 2002:a17:907:75ee:b0:72a:a01c:b33e with SMTP id jz14-20020a17090775ee00b0072aa01cb33emr188077ejc.357.1656701596074; Fri, 01 Jul 2022 11:53:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1veRfvTxLKnAHR14bR+YyLNsxQ1zyfx/tMaPFdQz2XxgjELs/czmewOir+5HUN/vin0c0W+zw== X-Received: by 2002:a17:907:75ee:b0:72a:a01c:b33e with SMTP id jz14-20020a17090775ee00b0072aa01cb33emr188064ejc.357.1656701595883; Fri, 01 Jul 2022 11:53:15 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:15 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 06/10] drm: use idr_init_base() to initialize mode_config.tile_idr Date: Fri, 1 Jul 2022 20:52:59 +0200 Message-Id: <20220701185303.284082-7-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/drm_mode_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index e2a295a4ee0b..3d1c1ade5a25 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -412,7 +412,7 @@ int drmm_mode_config_init(struct drm_device *dev) INIT_LIST_HEAD(&dev->mode_config.plane_list); INIT_LIST_HEAD(&dev->mode_config.privobj_list); idr_init_base(&dev->mode_config.object_idr, 1); - idr_init(&dev->mode_config.tile_idr); + idr_init_base(&dev->mode_config.tile_idr, 1); ida_init(&dev->mode_config.connector_ida); spin_lock_init(&dev->mode_config.connector_list_lock); From patchwork Fri Jul 1 18:53:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903623 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 AD00ECCA47B for ; Fri, 1 Jul 2022 18:53:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47C1D18ACB9; Fri, 1 Jul 2022 18:53:32 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F46218ACAE for ; Fri, 1 Jul 2022 18:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656701609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N35X8EVl6N4eTj7vgsDHIfuc6TYftLr3sZ8XvRt4V9Q=; b=OW029XiGOIVIvG6C1mNaiKouMRJTLEADNcW9sLTp6sHtK5CGTEn442MtNip2H6yJ2EU54z T4uQRvqrrE3MwMz0vCprrF5Rx3ZFIxzIGp2H4YoE24orX4V5N+PtGn6+OAWctNfV3zHpop lv2v7URkUo9hsfLmttWRbQezDQwiNBs= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-cQI_vZvUO0qBR9jds-SmAQ-1; Fri, 01 Jul 2022 14:53:18 -0400 X-MC-Unique: cQI_vZvUO0qBR9jds-SmAQ-1 Received: by mail-ed1-f71.google.com with SMTP id g8-20020a056402090800b00433940d207eso2307089edz.1 for ; Fri, 01 Jul 2022 11:53:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N35X8EVl6N4eTj7vgsDHIfuc6TYftLr3sZ8XvRt4V9Q=; b=Xd82ulvvEjAhzEzhhYf6quwN5zTlf0QDnM0ubaXUokAWHduCEKFEh0K9PcHZE+ZD2t huh+IaL1EUEo26c1FDcRMl8D15MiW1+AvaIwHGB1RzGq6EUn8TImKPc8ssQxE7nTdQE8 V5TlVksx2IyKDBF0amo7VHYziF0M7XqX0iXgvWvQ11PQW7IcuSH4XtF5S4TPuKZg+CDp 4OK5SgmyFg/Ee4IqJOasXJSkp+Q9/iysshy5fKoVLnHOzPYkZBNrKe8l2E0KBofTBLgN L3gX3LZZ6ZM1HJDn8eaFfChVA64VzhMos4vnpCQ6c5ogXLaA+jiaRUFqsD4COhKKr7v0 /mpQ== X-Gm-Message-State: AJIora/tlX5jBPprYkfg0XjMfWNW6uaR6PggAS7h9n7o0Iyjw0vax9/B CYx8a/k0DZrkcd9NKjIWOCX+o/twXM2mCUSFeH/+ts3sM/BUk5OeyncVXwOFG8g7goHa4zqe8ul xmhFlxeDYGmm96DTXyKRpr6aUGmrm X-Received: by 2002:a17:907:c0a:b0:726:22b1:9734 with SMTP id ga10-20020a1709070c0a00b0072622b19734mr15870864ejc.195.1656701597029; Fri, 01 Jul 2022 11:53:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v0XHDYfm4r0XmFgHtm8gNeedy8AUdmxbSBjIkcJqyzr9E+jWJqK2lf61vNX6ItKlHcWiTFng== X-Received: by 2002:a17:907:c0a:b0:726:22b1:9734 with SMTP id ga10-20020a1709070c0a00b0072622b19734mr15870857ejc.195.1656701596880; Fri, 01 Jul 2022 11:53:16 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b004359dafe822sm15406658edb.29.2022.07.01.11.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 11:53:16 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 07/10] drm/sis: use idr_init_base() to initialize dev_priv->object_idr Date: Fri, 1 Jul 2022 20:53:00 +0200 Message-Id: <20220701185303.284082-8-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/sis/sis_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index e35e719cf315..6173020a9bf5 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c @@ -50,7 +50,7 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) if (dev_priv == NULL) return -ENOMEM; - idr_init(&dev_priv->object_idr); + idr_init_base(&dev_priv->object_idr, 1); dev->dev_private = (void *)dev_priv; dev_priv->chipset = chipset; From patchwork Fri Jul 1 19:02:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903624 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 1F687C433EF for ; Fri, 1 Jul 2022 19:02:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 212D418AD7B; Fri, 1 Jul 2022 19:02:41 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F54F18AD7C for ; Fri, 1 Jul 2022 19:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656702158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5LWfDQABAaX6JpmqkFhW71LBBJJ2YX+O6PnBrulbv00=; b=QbO2glVdHRRRaeephBAIkF4ZKKCXv8YVg30iHHxt0JhU4gC4GijWVwhpy1ez2UYRtq3DDC IbmgjDf53wM7rJRasiTarxW3Mbobz4HlryLlo19fWlTHdl6NvA9rEyQWYPf/tGKpEhF6hq eAhOUDjXMgAXJIvxbWaL4rO5FjxQRxs= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-292-i7qYTWxEM7Kl7EFBYW6kSw-1; Fri, 01 Jul 2022 15:02:37 -0400 X-MC-Unique: i7qYTWxEM7Kl7EFBYW6kSw-1 Received: by mail-wm1-f70.google.com with SMTP id e24-20020a05600c219800b003a0471b1904so3422769wme.1 for ; Fri, 01 Jul 2022 12:02:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5LWfDQABAaX6JpmqkFhW71LBBJJ2YX+O6PnBrulbv00=; b=6/dTgZofI4iVFP03zbHac1YHVNcHKu3hWDtvXViBbCdbFdvKeZNZ+u7H06ypReEF7U Wr0ziCQe5tiiRpiMw7d12oQWa8vPksI+afrPI73ERg4UDprBBMVPNg0jmdmpWJI5fnEa di+zF87uffUezNbn3+Xvs+T422qgDyHE+VEEyPvF7Uwe7XoBtovZVJfKva6pKZ7isReO EoT4amVUOIVqQcoh/Pah7ktZuGTIMWV+szhziV5cLJPN0qycS677/wDhR4c8xNzn91va YLZlrp/WycgmOjsWGCnAOGMTyD1QjhjOFhWVE0makQnnhgJ0393HGd3vrJkZtgRJEHUQ kMqw== X-Gm-Message-State: AJIora+6tbLdb/QWHl/8Ae+r/PPRnS3CT6P0zVA2bqyC1R/MK8yEYtPV TvV29Y147ta8RAwUgoSvvdbSlUWa5lflzY/tUowt4zRx6RYHSSOHJuVdJqFqWLDxGjQiPsgfJsF Tn6kHvR77PpS+IlLCMZ8d/BFd/2nd X-Received: by 2002:a5d:420f:0:b0:21d:54a1:691c with SMTP id n15-20020a5d420f000000b0021d54a1691cmr599963wrq.40.1656702156601; Fri, 01 Jul 2022 12:02:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slXnmlpnnf2Fh346beEHXPcik49nkXMKD8QypwkLs3wJX8XDvqeUcc8EozNRusoL1OG6yUpQ== X-Received: by 2002:a5d:420f:0:b0:21d:54a1:691c with SMTP id n15-20020a5d420f000000b0021d54a1691cmr599950wrq.40.1656702156446; Fri, 01 Jul 2022 12:02:36 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0039c5642e430sm12535470wmq.20.2022.07.01.12.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 12:02:36 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 08/10] drm/v3d: use idr_init_base() to initialize v3d_priv->perfmon.idr Date: Fri, 1 Jul 2022 21:02:25 +0200 Message-Id: <20220701190227.284783-1-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701185303.284082-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/v3d/v3d_perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/v3d/v3d_perfmon.c b/drivers/gpu/drm/v3d/v3d_perfmon.c index f6a88abccc7d..48aaaa972c49 100644 --- a/drivers/gpu/drm/v3d/v3d_perfmon.c +++ b/drivers/gpu/drm/v3d/v3d_perfmon.c @@ -95,7 +95,7 @@ struct v3d_perfmon *v3d_perfmon_find(struct v3d_file_priv *v3d_priv, int id) void v3d_perfmon_open_file(struct v3d_file_priv *v3d_priv) { mutex_init(&v3d_priv->perfmon.lock); - idr_init(&v3d_priv->perfmon.idr); + idr_init_base(&v3d_priv->perfmon.idr, 1); } static int v3d_perfmon_idr_del(int id, void *elem, void *data) From patchwork Fri Jul 1 19:02:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903625 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 44FD4C433EF for ; Fri, 1 Jul 2022 19:02:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12D2818AD87; Fri, 1 Jul 2022 19:02:43 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AF9918AD7C for ; Fri, 1 Jul 2022 19:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656702160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jrqIOUaKKQbWi9G365N+s7BAFB2QpummhvZ1Qj6rHlE=; b=JKoy+YCd2xVIq13MDcAFEdyNIZsnb0Oin9x6PU1ldGOX1Mb4OcllxtlL2sNt8tXrFTRO5K moeMvSDVPcVrIVYLNVmCL8ZIeppRxYXCQ4mVhDnK5l0VeAxD2ZzzRWvAGAXRzeZkU60+Bs LWVulp0QChtxgHCFxXo7iROJsX+dPqs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-335-Efyt-I2qN3-6HDnvG32VqA-1; Fri, 01 Jul 2022 15:02:39 -0400 X-MC-Unique: Efyt-I2qN3-6HDnvG32VqA-1 Received: by mail-wm1-f72.google.com with SMTP id m17-20020a05600c3b1100b003a04a2f4936so1758314wms.6 for ; Fri, 01 Jul 2022 12:02:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jrqIOUaKKQbWi9G365N+s7BAFB2QpummhvZ1Qj6rHlE=; b=u0L1v3Eq1HHYcY0Bhm+LWOhJbvRk+tGMnIvCF/F0gAmS2OFVtK7z6cillgdDS88Fb0 qk2R1ZpIuWkAcVVE3nE2fNPMaqq/k2eK/SNcHTjv1NKjcG9Cfba2mtAdN55+Hj570cFM G8iugXQ4qq/YZJJ83FwSuFdBfwIZ6elKDbGSiPELfA6CMyMbqHldzxHk/oULWveEqdRU 9ixCjpSid9Fgify2EF2RXVcQrhY6EJIaKTLDkaydP7Dw2UmC7gvZ4em/apeNFMfZEv13 GLXDiXbEnL7x2tvCgAwA9f25pqGhsoYgUIVi6xExUbSMw2x9jNOKZfBfcKKitCcmtWpe 181w== X-Gm-Message-State: AJIora9mSZysn1MjJHoT26skpkaLX5FTTosHU2fRYK4h3CI8iMAslHTQ YO5AICWVXAMEqPxoj9Q1VLm1W29VGlF+fO10Ay+XYD3NEKyFEtwPy1O3oACAP3kLdpO9Hyp1Vfx E89scOOwCuPEAOW8FK/wS24Fj8fuX X-Received: by 2002:a05:600c:4f81:b0:39c:809c:8a9e with SMTP id n1-20020a05600c4f8100b0039c809c8a9emr20291077wmq.39.1656702158839; Fri, 01 Jul 2022 12:02:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vV8/aKK46I0XwYmtYH6nEdafsMBLfquMnfV6l0ttdxxkjxJCItV0d0EK67aRhPcMUKsTmmuQ== X-Received: by 2002:a05:600c:4f81:b0:39c:809c:8a9e with SMTP id n1-20020a05600c4f8100b0039c809c8a9emr20291062wmq.39.1656702158674; Fri, 01 Jul 2022 12:02:38 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0039c5642e430sm12535470wmq.20.2022.07.01.12.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 12:02:38 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 09/10] drm/via: use idr_init_base() to initialize dev_priv->object_idr Date: Fri, 1 Jul 2022 21:02:26 +0200 Message-Id: <20220701190227.284783-2-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701190227.284783-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> <20220701190227.284783-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich idr_init_base(), implemented by commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient"), let us set an arbitrary base other than idr_init(), which uses base 0. Since, for this IDR, no ID < 1 is ever requested/allocated, using idr_init_base(&idr, 1) avoids unnecessary tree walks. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/via/via_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c index a9f6b0c11966..c20bb20c0e09 100644 --- a/drivers/gpu/drm/via/via_map.c +++ b/drivers/gpu/drm/via/via_map.c @@ -106,7 +106,7 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) if (dev_priv == NULL) return -ENOMEM; - idr_init(&dev_priv->object_idr); + idr_init_base(&dev_priv->object_idr, 1); dev->dev_private = (void *)dev_priv; dev_priv->chipset = chipset; From patchwork Fri Jul 1 19:02:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 12903626 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 1E49EC43334 for ; Fri, 1 Jul 2022 19:02:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6282618AD7C; Fri, 1 Jul 2022 19:02:45 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEFAE18AD84 for ; Fri, 1 Jul 2022 19:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656702162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YteOKhi7iNsOx5ZA+OArdj5sj8Ut6l24ccYKF/bIe0s=; b=VXx/USzMKZIntZtXG2GN98e5Hh8AQLbJLe+dqqYpzwVgIyKcxXerd1oDxMQ06AX1ocGt0F gXV6C5CeKM48+dWtRgcUsj0l5miINUMLSbdaNfrgKE+MnW9Y6/BloKktuCKHJhUgG9alaZ +rGJfLfzWwBC4JVmwAsWfSv6Zo2YKFg= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-540-31HXSk0RPd6Igs1VnEWrQQ-1; Fri, 01 Jul 2022 15:02:42 -0400 X-MC-Unique: 31HXSk0RPd6Igs1VnEWrQQ-1 Received: by mail-wr1-f71.google.com with SMTP id t13-20020adfe10d000000b0021bae3def1eso545243wrz.3 for ; Fri, 01 Jul 2022 12:02:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YteOKhi7iNsOx5ZA+OArdj5sj8Ut6l24ccYKF/bIe0s=; b=x1/pewyDzux4jhmO7MTX8ue8XFevhTKrnEORhirZWmxwFY1kJKKvfC3IMm0oikxFtE mLhD4shKBZimm7T0asQxr4Z2ZJGjg5CupgMry0mP5PrgykqQJkhBg5xZSacex2cjN22w RbUYr0xUl3BMHTpufiEDJf0uM9lXkLMFgTqzdc9R9DjPvkxQd+39TflOzp3FHZ2QdmoH vPGhxvtQ7LaafxyxEUpEzstigle4YCwJWCmaV1x5j/rIBX8gBpGgwgA+j081I++2lhYz KM6z8URaOYRWMp+7ObeP0TTllBJ03xB7Y3CVW6ZLtAyxaU9BTNwEvDx6XWi27hxckzTz vaLg== X-Gm-Message-State: AJIora8SSlSo3npauvY2krQCa/FCSglUt1lHlTiV1Ui5Q4ErKv9eD+jK SttyvSUORH+GEJaXLbu0mn0le3FuK2l26h8UWrUm/PYHv1r/frJFgXOp01cU1dI/LyyYCrXC8Hy 3B4keTBOpU5yOsgiM9WsyMnqRjnfX X-Received: by 2002:a05:600c:b51:b0:3a1:71b0:a115 with SMTP id k17-20020a05600c0b5100b003a171b0a115mr16121969wmr.41.1656702160942; Fri, 01 Jul 2022 12:02:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uM3icFRTP2WMGCU6/6wGy4YIyCDDU2SZS7oL9gjBlUFUHGDew/1gHUbRgopnBmk7qSWOngag== X-Received: by 2002:a05:600c:b51:b0:3a1:71b0:a115 with SMTP id k17-20020a05600c0b5100b003a171b0a115mr16121946wmr.41.1656702160728; Fri, 01 Jul 2022 12:02:40 -0700 (PDT) Received: from pollux.redhat.com ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0039c5642e430sm12535470wmq.20.2022.07.01.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 12:02:40 -0700 (PDT) From: dakr@redhat.com To: airlied@linux.ie, daniel@ffwll.ch, christian.koenig@amd.com, emma@anholt.net Subject: [PATCH 10/10] drm/todo: remove task for idr_init_base() Date: Fri, 1 Jul 2022 21:02:27 +0200 Message-Id: <20220701190227.284783-3-dakr@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701190227.284783-1-dakr@redhat.com> References: <20220701185303.284082-1-dakr@redhat.com> <20220701190227.284783-1-dakr@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dakr@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Cc: Danilo Krummrich , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Danilo Krummrich All IDRs in the DRM core and drivers which are applicable for using idr_init_base() over idr_init() should be set up to use a proper base in order to avoid unnecessary tree walks. Signed-off-by: Danilo Krummrich --- Documentation/gpu/todo.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 10bfb50908d1..de226ccc2c54 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -322,18 +322,6 @@ Contact: Daniel Vetter, Noralf Tronnes Level: Advanced -idr_init_base() ---------------- - -DRM core&drivers uses a lot of idr (integer lookup directories) for mapping -userspace IDs to internal objects, and in most places ID=0 means NULL and hence -is never used. Switching to idr_init_base() for these would make the idr more -efficient. - -Contact: Daniel Vetter - -Level: Starter - struct drm_gem_object_funcs ---------------------------