From patchwork Wed Mar 13 19:39:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13591848 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 ED84EC54791 for ; Wed, 13 Mar 2024 19:39:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3872210E471; Wed, 13 Mar 2024 19:39:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="el2pJEeG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45AC610E5A1; Wed, 13 Mar 2024 19:39: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=1710358783; x=1741894783; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hP51Mm0AciQDP+IQLyCe+K1HU+tgmUtTsBVz5z5MNlE=; b=el2pJEeGKLikrc6kpTFtUwJY6plCnojaTn79OffdA3+t3AwNoLtw0K1Z kEyJh4sEQJjCN8UwnNUkU8xo4LYQ6gFn6iRBhK/x2zcq/22iw3icokOF/ GvbP309ZuaORo4CHF6sj3ser5bxvXWCQatG450nl5/LZLGEc44MsruxJq Psbc0cuFOuNOTLnSrGbMdUGI24g03jaD1MG1zjN2auY73ryGH6pCSxS34 irKi/Uo9uRwwYijfVTkNXkwM9VnWLZY3FSRBhJWH3s2/JKwLvCDwrI4gG DQUV/ItoNkrSAqp7sndXgsoxf8IIoRgf7cO6ou/pT0jcH+5BFhKAGY1a7 g==; X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="4996557" X-IronPort-AV: E=Sophos;i="6.07,123,1708416000"; d="scan'208";a="4996557" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 12:39:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,123,1708416000"; d="scan'208";a="16633361" Received: from unknown (HELO intel.com) ([10.247.118.152]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 12:39:36 -0700 From: Andi Shyti To: intel-gfx , dri-devel Cc: Andi Shyti , Andi Shyti , Andrzej Hajda , Chris Wilson , Lionel Landwerlin , Michal Mrozek , Nirmoy Das , stable@vger.kernel.org Subject: [PATCH] drm/i915/gt: Report full vm address range Date: Wed, 13 Mar 2024 20:39:06 +0100 Message-ID: <20240313193907.95205-1-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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" Commit 9bb66c179f50 ("drm/i915: Reserve some kernel space per vm") has reserved an object for kernel space usage. Userspace, though, needs to know the full address range. Fixes: 9bb66c179f50 ("drm/i915: Reserve some kernel space per vm") Signed-off-by: Andi Shyti Cc: Andrzej Hajda Cc: Chris Wilson Cc: Lionel Landwerlin Cc: Michal Mrozek Cc: Nirmoy Das Cc: # v6.2+ Signed-off-by: Andi Shyti Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c index fa46d2308b0e..d76831f50106 100644 --- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c +++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c @@ -982,8 +982,9 @@ static int gen8_init_rsvd(struct i915_address_space *vm) vm->rsvd.vma = i915_vma_make_unshrinkable(vma); vm->rsvd.obj = obj; - vm->total -= vma->node.size; + return 0; + unref: i915_gem_object_put(obj); return ret;