Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp729424iog; Fri, 17 Jun 2022 12:15:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUkW3JcnPK2UzHzFiT95ASY4nZVS6imygHiY0ONovlDx34Ftj6NdjKZGVzDJz5BB+ylcxg X-Received: by 2002:a17:907:7f06:b0:6fe:b81f:f885 with SMTP id qf6-20020a1709077f0600b006feb81ff885mr10767595ejc.621.1655493349151; Fri, 17 Jun 2022 12:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655493349; cv=none; d=google.com; s=arc-20160816; b=PsVsKuz+OIDuP6MAGLdCxUIMrzUDmznSWOHTw2seKs8SOIKB3yY85KBYv5NMb4ziwH EcFB60GNWi7XbubCK06X0ekgAo0xiROihPBmE84AV3xc8pRGyVrIChonCz2MBcq/aOT9 RAZGmhmzNkRj4vYxjLAzUYzM5IqDQuJ5jmexcKBI8lRHgJIVi8m2faqPVcxRKi3ImDjB e/9EuoC8boUzqd04Yop2GTyFdui1525lMK1adS8AREBt6Ic4Pto5ZNAv3pmDTx+fphxR olp9uJGtp8jWmWh+Gsc/VuRLbmllzGEfXMrVgQe0eJwh+JuM5Arq9/0FYf62L92YtG6D Tq9g== 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=LdAnBjpLy1sClhqdR/ftozqH+YRYRk0YujTCAy5iJMY8VqQdi1ReLdrP5KE0EshEhj L0Big3EYjzFm5eOvk3H2CBEl+m5WrwLpdFaUqG/HfxXAowsezEVXoLZEA78BkQnxI2x7 5uJhU2nfYB4etoF/44tNm+SZD4dWi1L61sTKbfhq4A/1cL4D5DkqkxvgKfn6Bv/tvKH2 DgYxQWv9SoqtXcpLkmLAJYvMsNdF5JrJWyo7dTvajcGE8CjqrnwG82p0MXO9KDecuzUe mNQGsM7JHQ8RJqfcUO5Rj4x70HRImf6lq1cAknwd244xxS0B2X6SgKuSFY5F3XxdwV3e tTgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Anldpq7w; 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 ga6-20020a1709070c0600b006f38560fe61si6451276ejc.94.2022.06.17.12.15.24; Fri, 17 Jun 2022 12:15:49 -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=Anldpq7w; 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 S234370AbiFQTFp (ORCPT + 99 others); Fri, 17 Jun 2022 15:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233495AbiFQTFo (ORCPT ); Fri, 17 Jun 2022 15:05:44 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C4A042EF9 for ; Fri, 17 Jun 2022 12:05:43 -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 BE19B66017DF; Fri, 17 Jun 2022 20:05:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655492742; bh=JT0TnJkB0rL8RAGj5L8WxKKfTjJ2qr1XwBthtCgxh3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Anldpq7wlROSc+hLiByOyaVG5S6tpj3HJfdgyeyPL33JqkkObbaMHGcDKsRQbiIG4 OTFVRrz6NmQipgBNa/UMgY7A26gj10Sg87LhExWPNkxwaJJc3fOR+lC2tOFj9QAo8s 5ms5RFLPaY01NgjmjiSqmEIrsN0tFDxcBYUX8EiGx70yrQOc+GdBMp0xnAjw8mL9h7 bRgg1kVgAwLkJG1BhW0XhJMqxupSTZxISivyA3tVR8eTxnZ7a2wdC8KejAOFW5Q2ai 8pjNTAec65GInP6X9ybQIMEQ0okDHR6UrMNOTngJcxs32UBlFL4jT8NC57GxT0eEk5 NQZD1CcStKjwA== 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 v6 02/10] drm/i915: limit ttm to dma32 for i965G[M] Date: Fri, 17 Jun 2022 19:05:08 +0000 Message-Id: <20220617190516.2805572-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220617190516.2805572-1-bob.beckett@collabora.com> References: <20220617190516.2805572-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