From patchwork Wed Feb 23 22:45:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivek Kasireddy X-Patchwork-Id: 12757652 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 6E30CC433EF for ; Wed, 23 Feb 2022 23:01:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE3C710E4C6; Wed, 23 Feb 2022 23:01:44 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2662710E3D0; Wed, 23 Feb 2022 23:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645657303; x=1677193303; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=2OzZ/AWpiqrvqNPKt7fTCXLXn1pgnVaOm3u6Y6z8dgE=; b=lVWhWEL9MvFGiIba6vK/t4nqMfhCJdL84rbG6KHTaqetU4fua6/unlOQ 8Ll/RaO5xKStQ4X7UyNSTMswYjjX1BL4fXZ4X1qFOwwGxA2PxxMi34MTa K+jJTLq/SCwI6TUy4gO67FsfUcKFTly+eytBCDYk7ua3Yz8tFo3xIh1fV lqQJ0K12yD7wMmVj3u3lZomGyLqksV8P5Y5/xES0iNpgfFnAWdV7f9wwH dxjA56lDNFAOXBl9PPvFFK4i50dQUSFpp6DuF/5w4sHgmzaCsNg7hoX9d hm5k2ZixydUKeYMI5VR0KvJuLgoBMZSZX5xnhB5T7cRc5A2smEP2NWUYF g==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="239495263" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="239495263" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 15:01:42 -0800 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="707225537" Received: from vkasired-desk2.fm.intel.com ([10.105.128.127]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 15:01:42 -0800 From: Vivek Kasireddy To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [CI 0/2] drm/mm: Add an iterator to optimally walk over holes suitable for an allocation Date: Wed, 23 Feb 2022 14:45:21 -0800 Message-Id: <20220223224523.1121224-1-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-)