From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 777B4C54E58 for ; Mon, 11 Mar 2024 07:20:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 961D310E6ED; Mon, 11 Mar 2024 07:20:48 +0000 (UTC) Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB05C10E6ED for ; Mon, 11 Mar 2024 07:20:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-n2FV6XfHPGKamH_MJCuxfw-1; Mon, 11 Mar 2024 03:20:41 -0400 X-MC-Unique: n2FV6XfHPGKamH_MJCuxfw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37705803CE1; Mon, 11 Mar 2024 07:20:41 +0000 (UTC) Received: from dreadlord.redhat.com (unknown [10.64.136.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4DE31C060A4; Mon, 11 Mar 2024 07:20:39 +0000 (UTC) From: Dave Airlie To: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org, Dave Airlie , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH] nouveau: reset the bo resource bus info after an eviction Date: Mon, 11 Mar 2024 17:20:37 +1000 Message-ID: <20240311072037.287905-1-airlied@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" From: Dave Airlie Later attempts to refault the bo won't happen and the whole GPU does to lunch. I think Christian's refactoring of this code out to the driver broke this not very well tested path. Fixes: 141b15e59175 ("drm/nouveau: move io_reserve_lru handling into the dr= iver v5") Cc: Christian K=C3=B6nig Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau= /nouveau_bo.c index c6c544d7c911..a4e8f625fce6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1271,6 +1271,8 @@ nouveau_ttm_io_mem_reserve(struct ttm_device *bdev, s= truct ttm_resource *reg) =09=09=09drm_vma_node_unmap(&nvbo->bo.base.vma_node, =09=09=09=09=09 bdev->dev_mapping); =09=09=09nouveau_ttm_io_mem_free_locked(drm, nvbo->bo.resource); +=09=09=09nvbo->bo.resource->bus.offset =3D 0; +=09=09=09nvbo->bo.resource->bus.addr =3D NULL; =09=09=09goto retry; =09=09} =20 --=20 2.43.2