Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4146184iog; Tue, 21 Jun 2022 13:03:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sx5/5qJBf60VNeYOFFCh3CBkQvdZRSGFd0oSaEjf/Fx52B3Go2AgYbBiq6+k8HfO0taMIt X-Received: by 2002:a17:906:64ce:b0:722:dbb7:5ad3 with SMTP id p14-20020a17090664ce00b00722dbb75ad3mr6881210ejn.167.1655841791999; Tue, 21 Jun 2022 13:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655841791; cv=none; d=google.com; s=arc-20160816; b=r+DX3wWt/VF0tyq3aByP9dnsGzGQTVYjFxUjR92KJbK7IXdFou5GpXQ7sqIjtzf8ZJ Qp0Z7muDbJy5wFEiAoxHD3B0nKlPfwV6BeMQS32X7I5otmuVQchppi8WQRhE0klzhX0U FLN75b16JwRxySuuyCxgal9SruhcL2bYF5kBXDKOyDjSaDtxmGOHsiQVmoxTRm3Ns+01 itLTPfPLjihvW0Itl0VgztLmtzcJdXEQDFr7OJXa44DfUI5go19t1LW+QV1kcjj5VW4x uE9oNVocpZn7SGnQx8U0KUJaYhqVUnbUrgS+gIfdhUIUM1PR6qCMOhLrT3VsVGE9fdmv /aHQ== 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=O5/pP/X5b0pTigbE4qWCmAQszCbHYmaNoskDDeDAEjHrxnx99FVF8io5ZHTUdnO3zL vQReKTZoaw0LkKF2d0wHi/4LA4KRCtlofvWchr59Qyrq2jSbaRO/uME0bD3pXa9mr1at wcaFg9pxysvBrRPiaFBuGjLU7mnoEE+ad7kOW2DFacXzRiFZ0bFnQrB4ygl2skvln9bE 8McH8V/fSkQdZ8mN2tmXVHSmgWVI66+QO55outt8zomHjOdOTvqwg/fuQVESNRuXAo2r CFslclBCd4cMns0tebMmQFBqfO9Vb+mb76SH6zpAXviD2S/0p4cgSL3nS3HGdGgdbb11 PwSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eGE2Q+8z; 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 e17-20020a170906749100b00711f5c9d6bdsi16786068ejl.284.2022.06.21.13.02.45; Tue, 21 Jun 2022 13:03:11 -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=eGE2Q+8z; 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 S236144AbiFUUBZ (ORCPT + 99 others); Tue, 21 Jun 2022 16:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbiFUUBT (ORCPT ); Tue, 21 Jun 2022 16:01:19 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28BAB29806 for ; Tue, 21 Jun 2022 13:01:15 -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 41BCC66017E0; Tue, 21 Jun 2022 21:01:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655841673; bh=JT0TnJkB0rL8RAGj5L8WxKKfTjJ2qr1XwBthtCgxh3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGE2Q+8zH1tJUVtZQ5lzBhpbKRbafYRedijLDXXKbPQJWrhKAXhq40DJl8R7kZ/m/ YW75+JrcMMUds0sUTlH7IL34UYbhHj2uefsaXPE/evXZoeGhV5ygN5EPhFG+P+pPCF gnLJQq/7MwonFNUVFytRTsiBX8x/S0HeTelKzgJV5PSuvniqCcOM3/20JezgaV3EY4 aR8vT3TTbn8cryapRZxuAUSrsKjXv9Q0IK3Iv2t5Ms1WqyYg1U4Ut19s2BmEkH6XS2 wbARtOZYb6Kpe2zw2NMae4xHQxHD9cArulyrgYVK5GyRFkGituS/VHnst+h3x6q2MD a3w0+FwTwCkXg== 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 v8 02/10] drm/i915: limit ttm to dma32 for i965G[M] Date: Tue, 21 Jun 2022 20:00:50 +0000 Message-Id: <20220621200058.3536182-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220621200058.3536182-1-bob.beckett@collabora.com> References: <20220621200058.3536182-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