Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp633034iol; Thu, 9 Jun 2022 10:31:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwz2jFRX1/3P+ufIRd0FG6XGk43xr7a6x4CAd5j0dsbaSZOzz2eFvyArWd+J9S99RApqkwf X-Received: by 2002:a17:90b:5091:b0:1e8:990c:f735 with SMTP id rt17-20020a17090b509100b001e8990cf735mr4403656pjb.153.1654795881984; Thu, 09 Jun 2022 10:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654795881; cv=none; d=google.com; s=arc-20160816; b=YBmYlkPtd/+NIllv4MqzbwivZ/3+YIpFCG48tlqiM7T+XOHyO58jDFO2oGavq1CLs9 lzpZ5cd5Q3oMDQMJ0pv6pPuD5uKmjVS0KiJYeg+x1tsSc0Y+4hmHi3oYU6RNGsRAaHJ/ bBjfvYIoBCu1By24fl2+9pVCSn+M+mkY9aTz07/Sbz/73zeFNOyoCx/3lxAG6DeGgtY/ eRLk4OgEA+R7N/l24tPmSdOZIh2m0nJWmjEL+ZCSOE/K+2p912ETwvXNRZdnM7qg5f5k e5q/s5WRLTSvlolJntyh08scI1rDwCfJzT62Y5gq+rIu3/kn6spQzDvmW/fssdalYLN6 f22w== 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=FVFTEc/M01aRgdsSo6mvHgEbGnKh8SiqUOVk/J+VnIjOvYFD60Sijf7NV2Qmlfauu8 Xi5cqBJSfeoJF2Wv6ugn2Xd/O5RE0QwCAXrB7LaV6TO0dxfjb+9dG8qD7J/I0u94kNw9 KdAByK6bX+d+ogdQqGRGVa79+WQdgnqoeouJrTP2j06hhX2Y18r3jrPZCo/tQTe6tNui pmlsWuH18+Q+XhuZes3u/VlKHTvaAKjKcFMnXSuzfO9PYlxBEeFabk/p5ewAMEjAC+AK fH4Nf6IK5b90BqpoMbcY/E176mS6sUXZ+Jj5sNJuUKo/Ez6nzfAkC45IpZpNr83Opk6E kEBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZUY7j0J4; 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 u19-20020a17090ae01300b001e32ffeec30si32241211pjy.41.2022.06.09.10.31.07; Thu, 09 Jun 2022 10:31: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=ZUY7j0J4; 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 S243423AbiFIQwc (ORCPT + 99 others); Thu, 9 Jun 2022 12:52:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238917AbiFIQw3 (ORCPT ); Thu, 9 Jun 2022 12:52:29 -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 0E15D22848F for ; Thu, 9 Jun 2022 09:52:27 -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 7BD4E66017E0; Thu, 9 Jun 2022 17:52:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1654793546; bh=JT0TnJkB0rL8RAGj5L8WxKKfTjJ2qr1XwBthtCgxh3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZUY7j0J4rtnKrcF9zN5/dZNwoipi8ZxGGyyoLbyyg48THwbRtwyMXrsBCjkW/C/6/ jGGdtn0RIYATngU6r2GSqgWXuqz5G9Dkr9glRh4CSbQMkZFUIMvNAx3v+kPPOQrPWC prkiuxP9YmLeH5/ZkhiSwDwk8ZGrA65Z74GR3pAYMGoQ4zAC9mPfetZOZGOMGcfOia ZMYx68a6v2KNQqhMxxoTtRAQLm/4+2WIJ4Fqli9+JJ02tZczIEo8/1R3+yH7n2/4Ji NZLw/QfC8SQvOYc29b6aZ89oYxH7Jd9EugLW4uO0kH6sjv6zwXuyUaUqJtqQtcz4UW G6Wqsdn0DpTiw== 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 v3 5/8] drm/i915: limit ttm to dma32 for i965G[M] Date: Thu, 9 Jun 2022 16:51:57 +0000 Message-Id: <20220609165200.842821-6-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220609165200.842821-1-bob.beckett@collabora.com> References: <20220609165200.842821-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,URIBL_BLOCKED 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