From patchwork Wed May 11 15:37:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 12846386 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 A71DCC433F5 for ; Wed, 11 May 2022 15:37:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E4EC10FB8D; Wed, 11 May 2022 15:37:55 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51D0D10FB8D for ; Wed, 11 May 2022 15:37:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652283474; x=1683819474; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nN31u7MLm4SFa27Gd7CL9aP5/4RqVawITPrlE9QDtN0=; b=An96B3sS88qOz8jpGGikFmY3Pc0EZhn5AJS+25LQW9gJ/3dYvK0EPiFm pX4wU2AXzN4t3+m1n9Q9+kbBX2k/2YUswXKPPJnyIIaIbYR6t5Ar2nS9a XLRUrZvdUeWLOF33T5i+AyHxvIzBeCml8wF0+4unE39XIk9VkDnY+pea2 LUP+esOMuNq60K3gAASU+QaMktJFjqIEPvbyZ2l8gwYzIyuvJYEyWPU/P W1Ort8dAHxHXDN8ZeCzUgHJpiOPgO9Zo2aIO/bIw5ACjffBSBycd3NsXZ QrSiH8l+BHqjiGH4myAkZ6hspCu3QZ2bUQW0gC8RNBGTMrl+XjbmUdhmr w==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="257277561" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="257277561" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 08:37:53 -0700 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="566231912" Received: from nirmoyda-desk.igk.intel.com ([10.102.13.19]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 08:37:51 -0700 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Date: Wed, 11 May 2022 17:37:44 +0200 Message-Id: <20220511153746.14142-1-nirmoy.das@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/3] drm/i915: return -EIO on lmem setup failure 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: , Cc: matthew.auld@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Caller of setup_lmem() ignores -ENODEV but failing to setup lmem on dGPU isn't ignorable error. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c index f5111c0a0060..5a7c403d718a 100644 --- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c +++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c @@ -108,7 +108,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt) flat_ccs_base = (flat_ccs_base >> XEHPSDV_CCS_BASE_SHIFT) * SZ_64K; if (GEM_WARN_ON(lmem_size < flat_ccs_base)) - return ERR_PTR(-ENODEV); + return ERR_PTR(-EIO); tile_stolen = lmem_size - flat_ccs_base; @@ -131,7 +131,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt) io_start = pci_resource_start(pdev, 2); io_size = min(pci_resource_len(pdev, 2), lmem_size); if (!io_size) - return ERR_PTR(-ENODEV); + return ERR_PTR(-EIO); min_page_size = HAS_64K_PAGES(i915) ? I915_GTT_PAGE_SIZE_64K : I915_GTT_PAGE_SIZE_4K;