Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3226309iog; Mon, 20 Jun 2022 14:35:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uWm1KoYzUe20ZZbcmzal1Sdz+tZFUz+dOjnYA75MY8ngHJ0eOr6yVi+DqEJ74oZi+qJiHY X-Received: by 2002:a17:90a:b797:b0:1ea:c49d:1070 with SMTP id m23-20020a17090ab79700b001eac49d1070mr28954265pjr.175.1655760921447; Mon, 20 Jun 2022 14:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655760921; cv=none; d=google.com; s=arc-20160816; b=sM2iVUu7spyHevgTwm39FPWFXmKCuKufnQ8oSm9c76QGav2Soh8fUQCrRuwY/e945U djiZjtb9Hb1VfxKcfWjgp6K0vG9Qm3yZzPisPW04a2ziQxc573aqpn5FeHhuozahfO93 pir5ZtyfN34ijpDhC0M7XGT6yqzSjgXgsK6n/GgBCCJgzQTxyPzYGyONi7dLcLBXHNj6 vUUqaCDzn0Vy8bATWrrvYYcjYfnIaXzXQI5w0gIEEFuVv/DFpLd4T3cRcA2n5LPlNhWb UTAmtAWQiuNst6VCclXvKMs09nw8U7G6k7fm8Q1ZJnf8rsp3rp7Q1Hg35xbWaxvySDaf ud/w== 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=NGYLSnA3BjxnWphVgDOclPcYCMH9QQOtLmOaomLCAio=; b=YMI+wnFDNF0h62M3t8VQ2bKHKAdEQvuK1Tl4VrCqOQWvSl9YNpQ75jPYikeH5Ia1Cv 0+0ZpGWNQhhfk0FoL9h1dTEXnutlKpA75Kwk+SNaq4Y/vaXP3tTt/UQPKajfs7NKoJFr DvlMCc+ZvcYVslwxh0HB+6bTkWkhdm2x1Dg6RpzkarHIYwj8tpke8EBba+YRuIdJHiwS RSJqSkl/tvBR4d5nmfJQBmhvCaTje2hi0sIjHp2HeFwCARDYfEycjrehlAvS3D/FXOHy OWlpxZhyWwYRE15AKx/z8b3SGq7kxf5/C8QvvS7lTf7vu2YvKv3UJVlfFxFddfhQrFpk EWHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MPAxmFo5; 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 h189-20020a6383c6000000b003ab1d7664e8si1456588pge.66.2022.06.20.14.35.09; Mon, 20 Jun 2022 14:35:21 -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=MPAxmFo5; 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 S244315AbiFTVeY (ORCPT + 99 others); Mon, 20 Jun 2022 17:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbiFTVeO (ORCPT ); Mon, 20 Jun 2022 17:34:14 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CDA115709 for ; Mon, 20 Jun 2022 14:34:13 -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 7D20766017D6; Mon, 20 Jun 2022 22:34:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655760851; bh=JT0TnJkB0rL8RAGj5L8WxKKfTjJ2qr1XwBthtCgxh3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MPAxmFo5Z9i/mCG0uVW4wFwnBmwfN1H5RM77P+9JrdL5Q+Elbm4negTsXns53uDoi JHpon/pxt4t3zw5s8sU5GHM+EGJbSAlP3y1azj+IMoPGRGHzIIC4keey9hOth/gHND mw8m2HQyALODDBwNkKHjpWAVK3N/VJvhREjOgc8Z0tnizOUc326JCW7XbYF9hN++JO BVSneZpihaDdwN8wXS3mjPbat1hLRGLGVru+tkCiy7PNpRQ/siUvlmSeUFMWd6WQZs 8FrWPOu5djxOyuyb5mjAysDAjT7IvlXBcniXEaWMcerejLy93eP+tZDzRomHV212gU H+e5IGfLYUFWg== 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 v7 02/10] drm/i915: limit ttm to dma32 for i965G[M] Date: Mon, 20 Jun 2022 21:33:32 +0000 Message-Id: <20220620213340.3199605-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220620213340.3199605-1-bob.beckett@collabora.com> References: <20220620213340.3199605-1-bob.beckett@collabora.com> MIME-Version: 1.0 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 --- 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