From patchwork Tue Sep 26 19:29:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zanoni, Paulo R" X-Patchwork-Id: 9972599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E653602BD for ; Tue, 26 Sep 2017 19:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FDE628E8E for ; Tue, 26 Sep 2017 19:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4499F28ECF; Tue, 26 Sep 2017 19:29:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C501E28E8E for ; Tue, 26 Sep 2017 19:29:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BED946E5F6; Tue, 26 Sep 2017 19:29:24 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id E211F6E600 for ; Tue, 26 Sep 2017 19:29:22 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 26 Sep 2017 12:29:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,441,1500966000"; d="scan'208";a="139724693" Received: from przanoni-mobl.amr.corp.intel.com ([10.254.58.96]) by orsmga002.jf.intel.com with ESMTP; 26 Sep 2017 12:29:18 -0700 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 26 Sep 2017 16:29:07 -0300 Message-Id: <20170926192908.28055-1-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.9.5 Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 1/2] drm/i915: stolen_reserved_base is also dma_addr_t X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The chunk added by this patch was missed by these commits: * 920bcd1820a6 ("drm/i915: make i915_stolen_to_physical() return phys_addr_t") * c88473878d47 ("drm/i915: Treat stolen memory as DMA addresses") The stolen_reserved_base variable contains a memory address for stolen memory and our code uses dma_addr_t for pointers to stolen, so it makes sense to make it also be dma_addr_t. Notice that the local variable inside i915_gem_init_stolen() that stores this pointer is even already dma_addr_t. This change essentially converts the size to 64 bits where applicable, making sure things work in case we ever get crazy enough to put stolen that far in memory. Cc: Chris Wilson Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index f62fb90..dd2ef5b 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h @@ -365,7 +365,7 @@ struct i915_ggtt { */ u32 stolen_size; /* Total size of stolen memory */ u32 stolen_usable_size; /* Total size minus reserved ranges */ - u32 stolen_reserved_base; + dma_addr_t stolen_reserved_base; u32 stolen_reserved_size; /** "Graphics Stolen Memory" holds the global PTEs */