Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp749447imw; Wed, 13 Jul 2022 07:20:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vYC2ecY0JSRthZO9z3WfmPeyjIjAUPE70dUZJJaLYSlePoXd76HyJZ6EER0ZfzRF3kx/z6 X-Received: by 2002:a17:907:2d86:b0:72b:4aee:7729 with SMTP id gt6-20020a1709072d8600b0072b4aee7729mr3788089ejc.143.1657722026369; Wed, 13 Jul 2022 07:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657722026; cv=none; d=google.com; s=arc-20160816; b=e1f00utdruzHSwmnFv/o9b2xdY5xyu/ucjvZa40UKbuLXATML6gEhommsCOSOpN65u ViTowR8RWE1u8iUI5KW5qYDW049j4f9/s65zB5+n11O4oWebkkWrrwUwT6tMSgtwp1EV udCmWFJ2YAlA9RqyjLJd3coP/Y2r8QKdhgnd3qz8PCYTivhlxcSSgIN5i53DFz/7BtQf Kk4Wzj6IfstDbKdbqotO8O5KTdxVCWVf6rsHn0jdPX3JPP3pV8KultbIAHMH2rL8NwzF ItCZ3Jr/n4OVRseCF68DBvXZVxj2sjvDEm8UJHBaBtRNms5qlNV6ZrUmS0erUPOQkUTH ZNFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b7IUsNDAxVvV9/9ZQsPBF7H/pfvgRQ6SZP2/D7Xokos=; b=miasiv8Hdyq45EYAh/isuzIOszqCokTFqMS+051XNri6NAB3wgkYKdJtAhFLg1riO5 KExiSd4N6pH3gxW52FnbcTFLMw7yPVj55f1Lkptwkic2FIZGJlV/Fg5iiIM613GhzZZ2 XodVL0JsG/UyNEhJzRPw3MK+I640L8epQHSwkPiyZ+YO2++teJJmke0qaQs7CTHwxgMq T2PZtWJefVy9fiVhHlAEtwVIbsdQtMWlH6tbmcnaGQfzJnSIiU7WfWTEYFyU+EXHkT5Y RBx0styClB6uI7h08M5GRCWapEIwKVLKv97B70WflWkii030vbjbLEWA4VJuvf569X8z UMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GmAErg7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs14-20020a1709072d0e00b0072b4d8bc1c6si2361151ejc.367.2022.07.13.07.20.00; Wed, 13 Jul 2022 07:20:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GmAErg7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbiGMNut (ORCPT + 99 others); Wed, 13 Jul 2022 09:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiGMNum (ORCPT ); Wed, 13 Jul 2022 09:50:42 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45EBF14D3C for ; Wed, 13 Jul 2022 06:50:42 -0700 (PDT) Received: from hermes-devbox.fritz.box (82-71-8-225.dsl.in-addr.zen.co.uk [82.71.8.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbeckett) by madras.collabora.co.uk (Postfix) with ESMTPSA id D1AC566019D2; Wed, 13 Jul 2022 14:50:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657720241; bh=ha13NipozoxIlhmnqDQLSM1i3fj+EPxYLmpfjPykhKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GmAErg7ZrmbT8xTEpD5AJY3dWyhynhp9jaGPFElE6nQu8tdSYPp3xAdbBsS2Rn4Le DVpLfpzq1evvQxCe8sqDPiuavrEew5JnE2JVWqF9eXk5KjqaPK7KUCYnl1fBosDHD9 TwzyuwKa8UxZdSfxdK1WF/VdZ+UG2aOwHFmFw1CTKK1O/Jt84e+VzQ5VjRwDYJT+Nk 1Uan9+xtEofI1l1PfRh1cXY4NBgqEJhdbQ2dN/lJZHBnR7tpBPFmO9AWEczl+Hf3Pk otchp4v8RsVLTDSdF/VJVjL/SSHztOePp8mMVgQmPZV6IjOWqK32MgCzpMs8PKJ7QQ rnwbI0FRAqp+A== From: Robert Beckett To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: kernel@collabora.com, Robert Beckett , Matthew Auld , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , linux-kernel@vger.kernel.org Subject: [PATCH v11 02/10] drm/i915: limit ttm to dma32 for i965G[M] Date: Wed, 13 Jul 2022 14:50:14 +0100 Message-Id: <20220713135022.3710682-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713135022.3710682-1-bob.beckett@collabora.com> References: <20220713135022.3710682-1-bob.beckett@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org i965G[M] cannot relocate objects above 4GiB. Ensure ttm uses dma32 on these systems. Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/intel_region_ttm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_region_ttm.c b/drivers/gpu/drm/i915/intel_region_ttm.c index 6873808a7015..642cd1587976 100644 --- a/drivers/gpu/drm/i915/intel_region_ttm.c +++ b/drivers/gpu/drm/i915/intel_region_ttm.c @@ -32,10 +32,15 @@ int intel_region_ttm_device_init(struct drm_i915_private *dev_priv) { struct drm_device *drm = &dev_priv->drm; + bool use_dma32 = false; + + /* i965g[m] cannot relocate objects above 4GiB. */ + if (IS_I965GM(dev_priv) || IS_I965G(dev_priv)) + use_dma32 = true; return ttm_device_init(&dev_priv->bdev, i915_ttm_driver(), drm->dev, drm->anon_inode->i_mapping, - drm->vma_offset_manager, false, false); + drm->vma_offset_manager, false, use_dma32); } /** -- 2.25.1