Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4120628imw; Thu, 7 Jul 2022 13:08:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ta3+g4pZCfZu5L1MDVXRoK01B5be9RecMTAsdS2rxSfD435vxxMi1S5BXNOSWZaHxBPK0z X-Received: by 2002:a17:90a:1305:b0:1ef:7b0a:366f with SMTP id h5-20020a17090a130500b001ef7b0a366fmr7179704pja.146.1657224481711; Thu, 07 Jul 2022 13:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657224481; cv=none; d=google.com; s=arc-20160816; b=i/ki011LL6J030jb1/8NVWfVqWP/9Y1F1w82RBMR6pt/vinUdB4T55JgUasfs8t+vs o+B9mvKdpZajw8g0mOi/xFJPrCUY1oq5UaqDso1xdC7Yo/9Me5bbrVokS5W0JaiGIFsa QSTG0c83pY30pXpmgEug+5r7/sLqC+meAkKRZT1kRlgwM17wxH2I0q3YkRs6Zttr9S7r d0nYm7KANmN2pYqNTuq4rEVNeBuXjZUzfnnZd23imjBOvVzzm8pZ8K5dhL7wAKd5sEjM 9HpBdRpCp2Wd/Dt435OumVA3pOavptD7dPLj/NdlX4UqzpfVK3ZEiSbFOmqiZnQaEXak kNIA== 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=UbCmqa2br9GDHBjDsJhiHYwbLGkd+7KbO/CCR6vzu0s9CdL/j091wP14ayavcoTU4n e9zBQFkcDiAWya8gwbFmJeydPl34SQ8Zb3R/SnHDsRlu5xZFIFWJJ7DX9/MozgBhmZ7n 52M6hWZO67vdfHw21jE2ZOV0xZ/SgpQeC5IdAN3Spi+78t3zeXWXeugml/tipfq1v33F bBHXVok/GP3mLxxkbwiKSRcX2yXUYrZROpXhDZQNygfJO6thqYaGyOKbTayayd9uVMQD 5j8pMVgD2C2EjZ1zW5J7s6wVmu22d3/OIhsmJuj51VZpZaUZtiOS7kX6dp5Kgyrdie07 83Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gKvlSMDp; 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 k62-20020a638441000000b00412b40fcb01si3059856pgd.289.2022.07.07.13.07.49; Thu, 07 Jul 2022 13:08:01 -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=gKvlSMDp; 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 S236779AbiGGUCs (ORCPT + 99 others); Thu, 7 Jul 2022 16:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236495AbiGGUCr (ORCPT ); Thu, 7 Jul 2022 16:02:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA0F1FCE4 for ; Thu, 7 Jul 2022 13:02: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 8066F66019CD; Thu, 7 Jul 2022 21:02:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657224164; bh=fPrXPZGZmc1m43xW5GU/UJEKX5XpJJEdaAwsrSiitrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gKvlSMDpk4XbqHd/1UwzTfU9FHqAovhmTDgp80gftMOwmVHGAeZwQFzKuNOeDzcZp JEg+sLqJ3GUrikIFe9CX/11v7N6Qnqne9p24b8G2t9ToubPJuLH6ERRDOMcGXlhkqj NLJ7jDgTd2XPPsWAPtX94rjstE969CQzTvr9PDnnzo7bLObJa8AwqfNUaisIMHDouA nAxXKH8qIys4ZO3s6yKtKq5p11GfPl8QV6yn2RDSiNMVg85X/yNN29hD6FS22qQ9el 2qewM72NNJar0KdPqV1YES5oG9+m04bzm8ErbeMlk1OKravkJDGSLChu2sTFLyRKf2 05tx1LVcp16wg== 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 v10 02/11] drm/i915: limit ttm to dma32 for i965G[M] Date: Thu, 7 Jul 2022 20:02:20 +0000 Message-Id: <20220707200230.1657555-3-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220707200230.1657555-1-bob.beckett@collabora.com> References: <20220707200230.1657555-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