From patchwork Mon Jul 24 21:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 13325334 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 A5290EB64DD for ; Mon, 24 Jul 2023 21:15:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B6CE10E356; Mon, 24 Jul 2023 21:15:17 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id C883E10E356; Mon, 24 Jul 2023 21:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690233315; x=1721769315; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=B6id4GPlRwNQMBPfGUFjOIgWBk04MtAGDGnMFKfF4U8=; b=ILABV0PgswBThC5LSVT4+KM1tGcfEddSNDuDb+Qpj7sa/z0ANi0LUCrB OEucB7/mmiCOB1P6BUbIC1WOxXrFjJKz7EP4ogrr3E3Sedn/p9qYJAkv6 oYEjL2vIT0A1V/SgIrWCtS+fvUpOsdGvprjNw0MUrC1JMZiNb4v+U0V54 BFPuGbUZA98ULyzZ/4KpYE/knrCk6nIlBHClpaCEVaa/EvFO+j5HEnj1F LrLLdbNEnWymv9ea7HR2xn1FjplCkL5n1NG/F34GpqiYTozHKy88dAIyc D6z9O2cTrDrATP1ITHdBgCyqFluiuJV0a5ZmWrennTVdT4p9DsxdMuxVG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="367579156" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="367579156" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2023 14:15:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="791111256" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="791111256" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 24 Jul 2023 14:15:15 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 24 Jul 2023 14:15:14 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 24 Jul 2023 14:15:14 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 24 Jul 2023 14:15:14 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Mon, 24 Jul 2023 14:15:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UnTppDci07MNFg+G5Em+o1IaXQQhxk+7MwFJGZMMKSXL+4afw0lLiC7DIYyytu8zifzVjt6vXhC//2KHfDM8IGOGHDulxv6iYXfwB8PmW5Xde6N8N2x/RMlcMwdtmY0KSxEqS3APGhGT/0ZwitM/WSfTPraFh/4ejEkBUVAY30i9/jkPl7AGO+p9G4blHtoGobtZuU8cuIBcC4Zz9IZlIVW/t1mbfSEQEDnI5wSJ8LruC/R1T2uDHcaC0/Ub1y4UJw0ZrSXnp/m6oR9WXGlVcyBRboniX4M4ZC2vnPIuk3fsdKRzsH5XU8M7hsukjASbJ0LHIXkBhAaRSL3CkcqHXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F0ySB63ikAtIPbbSJkzGZy5qAk+y2IDV6KCkuJ8M//E=; b=NHRh6q5oTS0e91yz971bj+UzWg9GeVuiT4fqGbg+Aatci322NF79/gKsvUxk7U2qBmBCFTR8S1KPrzSPK0/SLPR78en5638k5w6B6lgSHcMQsxNUq07NeuHWWyJf0dAdJg0YvsSe9XHhBwt0wny/Efe/tQH7JZ0WankzTZYgfPanRi/NQemnfRuTWxlVwVqy+7BwsqEAVwq3PY0w9GKfdg8sy3BpyK3p09LQQxmKZlntZTKX4063xwaVvR5Ep8LvTBO4JKFpUa89QonFIVTx3/8ZxGdf1CiNkeYv+0aQt00oyuoKyz0GDLFRz5qVKxAU+SaoJwUI7UsChluc0KsvEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 21:15:12 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::1127:c109:d888:f6d1]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::1127:c109:d888:f6d1%5]) with mapi id 15.20.6609.031; Mon, 24 Jul 2023 21:15:10 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= To: , , Date: Mon, 24 Jul 2023 23:14:24 +0200 Message-ID: <20230724211428.3831636-1-michal.winiarski@intel.com> X-Mailer: git-send-email 2.41.0 X-ClientProxiedBy: BE1P281CA0323.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:87::8) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|MW5PR11MB5809:EE_ X-MS-Office365-Filtering-Correlation-Id: bff82bf3-b5dd-4a6b-3086-08db8c8b1048 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xlcYFWwlg6ZYRvSsQIvZiSoXFEAY3JYAQBvshUNsihQIjz675qM0hllqYTeWHI/rU8mjNwJt1hm6kms+W1QSv754g3h0s0mYDtighVbRn6lSpwaf6S9AizuiOv4Qn/u95AxJXdWPZOfLReF+jq0YZaDNFuRCulfWLthZ/0LiF6d/RBat4x7hsxFGI7/zoqcQEAHFxQJEdhW3TJSZrvXPXSbMoLEAxAMYnmo8dLnjcJccFiebnoB85OmSF1sleRAzAW9uN7DABRx5i7P2yx2BC4fcqqYFDziORM6u+gSXoSl7E24OUTh3sFg+6+JuFvnbJREN5sCJruHhGFv1Y9aZB4q1QqSDrKERYLLB/l25RCNlA4iRIGKNQaivdBlFGjXiKxKP+BYpNrGLn+jmpBP6QnA/4vwG4oyiw6cL2KOgERODcK/VTHJxv0u7FdFS5X8K7k+jlsGehVYB3srFZ7VrzLs5QRejtUX89fKT0aTDIv5ynr1sp2KmzH6BEwLiLSyaTOsArgRMQ8ddED59qbdZVTzg0LbCk+KXlc4nUFy+5MM9K/EBGoV7ENvm0uUG4esy X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5373.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(346002)(376002)(39860400002)(396003)(366004)(451199021)(83380400001)(38100700002)(36756003)(82960400001)(86362001)(54906003)(2906002)(186003)(6506007)(1076003)(26005)(6666004)(6512007)(6486002)(8936002)(5660300002)(8676002)(7416002)(478600001)(316002)(41300700001)(66476007)(66946007)(66556008)(4326008)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tBO+GyIMlrotScBZO+VzAYkYKL1P?= =?utf-8?q?Z+1mmi/UtJwHyzCzjOl6YTi/VaYxxEZZDuv3RXB4hBoMLRtabDCBmQeKQ0LqBLQNK?= =?utf-8?q?ed/RQm6bD/NX84ya2MvIM1wcNuLle83ygriQrHjv2Gif4dZ2NWUHJFDOcn283Rhy2?= =?utf-8?q?/8Dz10yEog8G8DFLRO3jmUZzeGrs/ha2YpxHemi9VqblSAPRDJkyS3YoG1LuqDQvY?= =?utf-8?q?W5nTEYznl0BcsVxHPRkesxRqzsFhQ6oKkMFgNUqqSt56TRXAVS3J0ReN/U+0B2e//?= =?utf-8?q?SN21Uwfv5lYuw91s6Zf6PO4VQb+heMo24Fcbhk/RwPey0RPRhcNoM9bSFPHobfakW?= =?utf-8?q?mbu4rJI0+ydwL1EE/rU2Dn7vros6FnId1faynjkeOvBgKM1vGDoBswfnJ7PMDlYhG?= =?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8Lt32xaE?= =?utf-8?q?Ddm3pEz++8IDyK9TgV1QPawBaZUH84MDNl6A9f0h16QunG6Xv3ozSSnWd+MZHmQMX?= =?utf-8?q?GQ72lMVFwyskkwWzhw6sxKa/FUbfwyZnSWp38HRH1+W0VtMEQvkH3F45dxY+uBbvi?= =?utf-8?q?r2uK/goTSJ17UZmodjGF8IMTNn3Y2mGq2rOaBZ633D0AZ0glU542i1dIV81430yiY?= =?utf-8?q?GxDv0+uH1nun36xFijPRj4Bn1ETlCVlddPGDlrHOGZli1hDj203cWRgq/NvOE34wR?= =?utf-8?q?nHWVmdrWFp9ktcedlir11mTMOvOUPMqISQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bff82bf3-b5dd-4a6b-3086-08db8c8b1048 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 21:15:10.6054 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u2nSljDzDgpTW+SdOQEagzR+D3ls0d91AXLkeMYBH/N14x47tXy7oLfHZGubu5P1BAN5t/iuXjnvt//X0V4dU0AtxLmWRYz58VweTN5yxVs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5809 X-OriginatorOrg: intel.com Subject: [Intel-gfx] [PATCH v6 0/4] drm: Use full allocated minor range for DRM 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: Pekka Paalanen , Daniel Vetter , David Airlie , Simon Ser , Oded Gabbay , Maxime Ripard , Matthew Wilcox , Thomas Zimmermann , =?utf-8?q?Micha=C5=82_Winiarski?= , James Zhu , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 64 DRM device nodes is not enough for everyone. Upgrade it to ~512K (which definitely is more than enough). To allow testing userspace support for >64 devices, add additional DRM modparam (force_extended_minors) which causes DRM to skip allocating minors in 0-192 range. Additionally - convert minors to use XArray instead of IDR to simplify the locking. v1 -> v2: Don't touch DRM_MINOR_CONTROL and its range (Simon Ser) v2 -> v3: Don't use legacy scheme for >=192 minor range (Dave Airlie) Add modparam for testing (Dave Airlie) Add lockdep annotation for IDR (Daniel Vetter) v3 -> v4: Convert from IDR to XArray (Matthew Wilcox) v4 -> v5: Fixup IDR to XArray conversion (Matthew Wilcox) v5 -> v6: Also convert Accel to XArray Rename skip_legacy_minors to force_extended_minors MichaƂ Winiarski (4): drm: Use XArray instead of IDR for minors accel: Use XArray instead of IDR for minors drm: Expand max DRM device number to full MINORBITS drm: Introduce force_extended_minors modparam drivers/accel/drm_accel.c | 110 +++------------------------------ drivers/gpu/drm/drm_drv.c | 105 ++++++++++++++++--------------- drivers/gpu/drm/drm_file.c | 2 +- drivers/gpu/drm/drm_internal.h | 4 -- include/drm/drm_accel.h | 18 +----- include/drm/drm_file.h | 5 ++ 6 files changed, 69 insertions(+), 175 deletions(-) Tested-by:JamesZhu Acked-by:JamesZhufortheseries Acked-by: James Zhu for the series