From patchwork Sun Feb 27 17:29:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Kasireddy, Vivek" X-Patchwork-Id: 12762056 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 44741C433F5 for ; Sun, 27 Feb 2022 17:46:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33B1610E5E3; Sun, 27 Feb 2022 17:46:09 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64D0210E139; Sun, 27 Feb 2022 17:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645983967; x=1677519967; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=2OzZ/AWpiqrvqNPKt7fTCXLXn1pgnVaOm3u6Y6z8dgE=; b=WnI4JmE89dR2JSURRv+PHNMeHmZ2WCx7/ScIXvqaGBWoqcvAazzA0bvm xLDIbGwzbBTwlg8I0oVs+NqdaFywNAN0I5pGH5USRNqAXKjHnNgA68kr3 rPHHljAOK21kd69kLLJBY1jhUZecOKKYeml4gsELva8MhOemh7Y3vnqxL fTgM62sYuLzeOnZPdciVXoIofASJRgUHDKkEq0AE72J/fNMcPJwS6+LWt t3gzASc/YoQxkUiWbok866lmYO75fRMyiSWesKFDcjrelk8KZ935fX+J+ TKbY02UhydLiVpLGxXvGIV8q7oPCqiLLCt/HpzNmAcLx9VpYz8Abb7am/ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10271"; a="313469105" X-IronPort-AV: E=Sophos;i="5.90,141,1643702400"; d="scan'208";a="313469105" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2022 09:46:06 -0800 X-IronPort-AV: E=Sophos;i="5.90,141,1643702400"; d="scan'208";a="549940404" 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; 27 Feb 2022 09:46:06 -0800 From: Vivek Kasireddy To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Sun, 27 Feb 2022 09:29:55 -0800 Message-Id: <20220227172957.1208890-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. 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 (v4) 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(-)