From patchwork Mon Feb 28 19:04:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Kasireddy, Vivek" X-Patchwork-Id: 12763669 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 1F548C433EF for ; Mon, 28 Feb 2022 19:21:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ABCD10E437; Mon, 28 Feb 2022 19:21:05 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0802510E27B; Mon, 28 Feb 2022 19:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646076051; x=1677612051; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=9In2ec8DM/wxb7wJtl2MJABaXmKdKkkYmsSHd4fYFE4=; b=NNFteoqLsXynC1ucYhPY+gIPa/2Rc0INhyiCGolvPTlcWzLYa/1xgRYf WaBlAYNRy2VLXTCi+O/iJBBEemZ0mcTDkwRvH+JQqMF6BkuWbmzs8RG0y NerbAC9hS1gjtZV2mlA6ZespW/EJzPazzbHKAgiFNj5OzQpo+7BiJWFnO +kQmA+Z/FiZjBCfel7vsqzTFSx1PITE7iNiqiNG3hl02G517PMBZ2jWoj V6+4aRyOk4e04juXWH3BMALnf6p2fvqOIzfTUrrr7Inxsqh0qklTplp1Y p/byVwIGg1fPsIjJugI+hu5iPQVWIbDZrY0ZVvvTugE+aGwOOm0ZGHbUS A==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="277628171" X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="277628171" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 11:20:50 -0800 X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="550374489" Received: from vkasired-desk2.fm.intel.com ([10.105.128.127]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 11:20:50 -0800 From: Vivek Kasireddy To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Mon, 28 Feb 2022 11:04:27 -0800 Message-Id: <20220228190429.1358951-1-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Intel-gfx] [CI 0/2] drm/mm: Add an iterator to optimally walk over holes suitable for an allocation 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The first patch is a drm core patch that replaces the for loop in drm_mm_insert_node_in_range() with the iterator and would not cause any functional changes. The second patch is a i915 driver specific patch that also uses the iterator but solves a different problem. v2: - Added a new patch to this series to fix a potential NULL dereference. - Fixed a typo associated with the iterator introduced in the drm core patch. - Added locking around the snippet in the i915 patch that traverses the GGTT hole nodes. v3: (Tvrtko) - Replaced mutex_lock with mutex_lock_interruptible_nested() in the i915 patch. v4: (Tvrtko) - Dropped the patch added in v2 as it was deemed unnecessary. v5: (Tvrtko) - Fixed yet another typo in the drm core patch: should have passed caller_mode instead of mode to the iterator. Cc: Tvrtko Ursulin Cc: Nirmoy Das Cc: Christian König Vivek Kasireddy (2): drm/mm: Add an iterator to optimally walk over holes for an allocation (v5) drm/i915/gem: Don't try to map and fence large scanout buffers (v9) drivers/gpu/drm/drm_mm.c | 32 ++++---- drivers/gpu/drm/i915/i915_gem.c | 128 +++++++++++++++++++++++--------- include/drm/drm_mm.h | 36 +++++++++ 3 files changed, 145 insertions(+), 51 deletions(-)