Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3924115imw; Thu, 7 Jul 2022 09:40:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tAZ7xKwGkychV/NYMNZ8Md0AnVq/kHKeAXLNcm/mv5BmcAy+g/ZDBdASJkzAmMnph7Nsyd X-Received: by 2002:a17:906:7049:b0:70c:a5fe:d4f8 with SMTP id r9-20020a170906704900b0070ca5fed4f8mr43347933ejj.493.1657212008128; Thu, 07 Jul 2022 09:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657212008; cv=none; d=google.com; s=arc-20160816; b=gQyzraEVzW6uxdUADr5C7KMFI6WWdTh1pgfFtZVvhp93a+AxcQu3aCH38q1JyY2pHj CCENuxg977wuqgLl7Yt4NfRwWGjeJORrNm0feHzxgxlp9twtUxiiLq1AGpZi+0kwygBJ MSxzLteOlURnQz3BzgrLdjB/vFBslAKWvBq8qAa0zyuKjuZVhlPexpGjwrtcvfg4cJpq U7JJRqQaCTLyHiolQPQI63iBC8rVABeFWAtmjWekCMb0XZIpC82tVAYu5mrCy/gWGN6/ R6dWlMI4ea1Q5As1X8TaxrIILrAOHnZJxYqCrEKK9ZkdmB54AuWRZUmqSzoxlVFkyNCv XumA== 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=q1uw0YFgkz9quFoGPaQCWojoaXkEC2/wYkLDg6SQVEI=; b=WIWCUtXwB4szirt7Q2Axx6ipCTCJ7WhN/QrGQXJmTqHaAZzR4xhs5ffpBxqgkCVMZQ A0Zp9qgVJhc1j/JlnWJDTdcIu7tXimK9QMyxTEKzCCg20hYRB2+T9McF3J57FEaOhEvH v17lgElSUwpekqFMT8GOZH49T15qPJaRkmqsNf0qtZhB1wDvx/ENqzPcHGowEtiMrMBE Ckoff2kjahyCW4vvalEbruf/ldLIhfHRPlVQB1SWmRxY072M8Tm4+2dW2ixgodAoc6yH 54dD0g00O6XpuFafduDU3o4u6NBwMcMtYCaP3blh2xH6LYgzaP+VJtQid9TYeajAkB36 rcuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=chU0c4gF; 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 ds15-20020a0564021ccf00b0043a9bfde144si2466330edb.598.2022.07.07.09.39.43; Thu, 07 Jul 2022 09:40:08 -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=chU0c4gF; 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 S236225AbiGGQgu (ORCPT + 99 others); Thu, 7 Jul 2022 12:36:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235826AbiGGQgq (ORCPT ); Thu, 7 Jul 2022 12:36:46 -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 A523553D34 for ; Thu, 7 Jul 2022 09:36:45 -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 CDBE166019C2; Thu, 7 Jul 2022 17:36:43 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657211804; bh=fPrXPZGZmc1m43xW5GU/UJEKX5XpJJEdaAwsrSiitrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chU0c4gFB/PJoSN6/3tjCscSQk7y4KNqzkZqkHl0PhHo9lngO6fOaCn6xYI9lbvV7 C6ZZglFArrbL4oFXIj1WjXQnD/YgOghZ/O/kY7LyS37thq7w7gycCaATZxOs/xzTFH 9o2cc0tF0x8vICkIVvbbXdjhLFL4vcYg4QV09sjkJTs/nNud95S6lGLGvvgbegpzjV aqFGQg7e3nl3dUFjUDMYT1m8I3j2wwLOjNVqVFqUxZBsOIj5TsJM1azPR4fglbDhlJ NGsEHMW8pcESiOBiRQ/4TRJi/YVQ9NBMjjDANMEZICfTapwtS/HngnLPoU56by/Rb+ dwZWZn/oHoMYw== 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 v9 02/11] drm/i915: limit ttm to dma32 for i965G[M] Date: Thu, 7 Jul 2022 16:35:57 +0000 Message-Id: <20220707163606.1474111-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220707163606.1474111-1-bob.beckett@collabora.com> References: <20220707163606.1474111-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 62ff77445b01..fd2ecfdd8fa1 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