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 4BA60C61DA4 for ; Thu, 23 Feb 2023 10:58:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 13D0D10E4BE; Thu, 23 Feb 2023 10:58:31 +0000 (UTC) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1727610E050; Thu, 23 Feb 2023 10:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677149907; x=1708685907; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kr4Gibachqc50LHT0/5OHvALc9AoVbDI9Bb5Gx47wNE=; b=ZOiXpXm8Zzoah23xY54odcC3WUOPWludeslAPqA/JbkGtoPsv7VjiHJQ PUdAvybyB8mjtl1woRyjL5/i4bIVQuNmSZrRkouZ5vk+hfLyDu02FNfeg DqPf+5DQLRLFGsHYVGb3X6ce7wKaGSJvD3+dS/xNwLFymZoEzOcLvkJy8 L9b89MKgVa4055DDaSUMQ2X1GqitvFgoSJK+jHVOdifLCwoAUlj7qNImx 3Pd5C+IzIiPcIuvkuz/4v88gJkQR7/j/OXG4DKodE+OBjzcUuT3631QWR h8G9W7wbWd8gyA0991ZuuLuCr5w6M9KcfloNMvlqZOTvNtmO8WxxOaGj7 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="395665800" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="395665800" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 02:58:26 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="741225466" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="741225466" Received: from skallurr-mobl1.ger.corp.intel.com (HELO thellstr-mobl1.intel.com) ([10.249.254.84]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 02:58:24 -0800 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= To: dri-devel@lists.freedesktop.org Date: Thu, 23 Feb 2023 11:57:42 +0100 Message-Id: <20230223105747.4719-1-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH 0/3] drm/helpers: Make the suballocation manager drm generic X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Maarten Lankhorst , Christian Koenig , Dave Airlie , intel-xe@lists.freedesktop.org Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" This series (or at least the suballocator helper) is a prerequisite for the new Xe driver. There was an unresolved issue when the series was last up for review, and that was the per allocation aligment. Last message was from Maarten Lankhorst arguing that the larger per-driver alignment used would only incur a small memory cost. This new variant resolves that. The generic suballocator has been tested with the Xe driver, and a kunit test is under development. The amd- and radeon adaptations are only compile-tested. Maarten Lankhorst (3): drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper drm/amd: Convert amdgpu to use suballocation helper. drm/radeon: Use the drm suballocation manager implementation. drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 3 + drivers/gpu/drm/amd/amdgpu/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 23 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 324 +-------------- drivers/gpu/drm/drm_suballoc.c | 457 +++++++++++++++++++++ drivers/gpu/drm/radeon/radeon.h | 55 +-- drivers/gpu/drm/radeon/radeon_ib.c | 12 +- drivers/gpu/drm/radeon/radeon_object.h | 25 +- drivers/gpu/drm/radeon/radeon_sa.c | 316 ++------------ drivers/gpu/drm/radeon/radeon_semaphore.c | 4 +- include/drm/drm_suballoc.h | 106 +++++ 15 files changed, 672 insertions(+), 693 deletions(-) create mode 100644 drivers/gpu/drm/drm_suballoc.c create mode 100644 include/drm/drm_suballoc.h -- 2.34.1 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 E42DAC636D6 for ; Thu, 23 Feb 2023 10:58:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1302010E050; Thu, 23 Feb 2023 10:58:29 +0000 (UTC) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1727610E050; Thu, 23 Feb 2023 10:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677149907; x=1708685907; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kr4Gibachqc50LHT0/5OHvALc9AoVbDI9Bb5Gx47wNE=; b=ZOiXpXm8Zzoah23xY54odcC3WUOPWludeslAPqA/JbkGtoPsv7VjiHJQ PUdAvybyB8mjtl1woRyjL5/i4bIVQuNmSZrRkouZ5vk+hfLyDu02FNfeg DqPf+5DQLRLFGsHYVGb3X6ce7wKaGSJvD3+dS/xNwLFymZoEzOcLvkJy8 L9b89MKgVa4055DDaSUMQ2X1GqitvFgoSJK+jHVOdifLCwoAUlj7qNImx 3Pd5C+IzIiPcIuvkuz/4v88gJkQR7/j/OXG4DKodE+OBjzcUuT3631QWR h8G9W7wbWd8gyA0991ZuuLuCr5w6M9KcfloNMvlqZOTvNtmO8WxxOaGj7 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="395665800" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="395665800" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 02:58:26 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="741225466" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="741225466" Received: from skallurr-mobl1.ger.corp.intel.com (HELO thellstr-mobl1.intel.com) ([10.249.254.84]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 02:58:24 -0800 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/3] drm/helpers: Make the suballocation manager drm generic Date: Thu, 23 Feb 2023 11:57:42 +0100 Message-Id: <20230223105747.4719-1-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Daniel Vetter , Christian Koenig , Dave Airlie , intel-xe@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This series (or at least the suballocator helper) is a prerequisite for the new Xe driver. There was an unresolved issue when the series was last up for review, and that was the per allocation aligment. Last message was from Maarten Lankhorst arguing that the larger per-driver alignment used would only incur a small memory cost. This new variant resolves that. The generic suballocator has been tested with the Xe driver, and a kunit test is under development. The amd- and radeon adaptations are only compile-tested. Maarten Lankhorst (3): drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper drm/amd: Convert amdgpu to use suballocation helper. drm/radeon: Use the drm suballocation manager implementation. drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 3 + drivers/gpu/drm/amd/amdgpu/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 23 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 324 +-------------- drivers/gpu/drm/drm_suballoc.c | 457 +++++++++++++++++++++ drivers/gpu/drm/radeon/radeon.h | 55 +-- drivers/gpu/drm/radeon/radeon_ib.c | 12 +- drivers/gpu/drm/radeon/radeon_object.h | 25 +- drivers/gpu/drm/radeon/radeon_sa.c | 316 ++------------ drivers/gpu/drm/radeon/radeon_semaphore.c | 4 +- include/drm/drm_suballoc.h | 106 +++++ 15 files changed, 672 insertions(+), 693 deletions(-) create mode 100644 drivers/gpu/drm/drm_suballoc.c create mode 100644 include/drm/drm_suballoc.h -- 2.34.1