Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp712851imw; Wed, 13 Jul 2022 06:45:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vZa9GkJtlWvcaQU8dNGCixpxiLk3TmsYEOpu5hThdSj3TpE5bccYIjL1m8zpBmaaby32l2 X-Received: by 2002:a17:902:be16:b0:16c:151d:3e21 with SMTP id r22-20020a170902be1600b0016c151d3e21mr3260997pls.49.1657719948665; Wed, 13 Jul 2022 06:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657719948; cv=none; d=google.com; s=arc-20160816; b=AZcnzWf1kqtwRqN4woUvf+MdAF5PAwavGDhbQJ6yj5Z4HW4p8sAmW2BXqL1EjDmgQh Bwohb+ulpz2UM0wApEDTRP7CjFmp1ew9QTBPpSJ5vmW05B0FX8Xif49Au8bPhP4I+CBu GD4Ndtyt7c03wo0IsUTxUKWILzn3XsVXDk9JXTBtvmrHkvzrkuOuFPsuacO/Uwp40UaM /UpSwSDfnaEurTSOmj9vDxyZ+vmUIavDlyPCshFOc/FPhuCf11OA9QhTNduvWl6gMRnC Lcj+E0I9LV4FE4Dsq4/iqFRnR76VaaNkZ/I9OcyqBG+ut97Y1yWBBflBvI5ZEA9Sce1M dJ1Q== 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=PB3Pjvc3cWZ/DupUZ+NZVOZr9mP0Rd1MuEu0n+pQFi+YsRQTiMBSXW80DfZzRWT3rB YdKh4C7RlNQQZP4y79E7gpV3Iys5iyPLUNrjUfPrk5IjItB0mqTgagN+GCXyZw0l12tw uZuhRCxBlKEYYz0Fi0XEfZZRZp2ufqixNzFuvh5gY0Lp7Dmgn2mkFLqebNGyMVq9dfP0 2uh10uKWSMW4NifQtc+cvfuWiEFAjKgA4oircat2+JU6B4StfRwl+taSHldQZJdRq+i5 wH1drgufw6CU6RH2MaLQXMIX83e2ihEb8TcNHZqpQ7UuVFjInAUZ7zhgrddg/fTHlWca zLUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=OVFmbp1+; 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 k29-20020a634b5d000000b004150a28a56esi17391994pgl.505.2022.07.13.06.45.34; Wed, 13 Jul 2022 06:45:48 -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=OVFmbp1+; 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 S235491AbiGMNip (ORCPT + 99 others); Wed, 13 Jul 2022 09:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiGMNio (ORCPT ); Wed, 13 Jul 2022 09:38:44 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131EA2189 for ; Wed, 13 Jul 2022 06:38:41 -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 B804C66019D2; Wed, 13 Jul 2022 14:38:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657719520; bh=ha13NipozoxIlhmnqDQLSM1i3fj+EPxYLmpfjPykhKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OVFmbp1+WuzLJbSMWJc+wgjgL0pr/UqwkAbI8SS85WZAbSLXvX6GF6UZTS5YWbd33 Tkvt74dPG8pxskKrjAhbk1ndSkP9O3E1hHuOQoxJvTOx5ko4MOn9muqgXBwn2zDFef ZLjZ+cU6kvsISJ/4xohMLhtPYqLrPwwu/fvaUG8dWYvwkg+ea361X1y7i81+rLuNHE xcjNsN96tRjpiYj9aKyk//6ByNFP7g5EVnYNJ4xNVyxBWmHIWBPEr2lax0iZbgnKrq H3SRWOmKjw77ePk+Yrl6KDk02HSbmiNYstSDVBw6QDgLkUifoJpmocOClU8MAeWfD2 +jR1rV5TVn0Dw== 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 v4 2/8] drm/i915: limit ttm to dma32 for i965G[M] Date: Wed, 13 Jul 2022 14:38:12 +0100 Message-Id: <20220713133818.3699604-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220713133818.3699604-1-bob.beckett@collabora.com> References: <20220713133818.3699604-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