From patchwork Wed Sep 16 14:24:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 11779773 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F31A92C for ; Wed, 16 Sep 2020 14:24:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D5B21223E8 for ; Wed, 16 Sep 2020 14:24:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fXYVn14z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5B21223E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C58A6E10A; Wed, 16 Sep 2020 14:24:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 82EAA6E10A for ; Wed, 16 Sep 2020 14:24:09 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id g4so6518554edk.0 for ; Wed, 16 Sep 2020 07:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FF1GcA0Vb8NPwj+FOyfHWcihsl5BIQJFYGSV3+DLrGY=; b=fXYVn14zBDpVtMDlY5PEZGTIFo5ifm+OrV0OhMcreL3ZMKHWyrSIxGXzWwp/WwHWlK /XlHNqevXNNxQ77SyTlaGjQH1qxFq1sioauKLT+Jvzs/Z2SOqZWZNycSKbGzmdNWWl3Y IlusN7UG9jvW2XTEqk8e/VM5jvIrhH+nVj2w+xR+Od3TJpDZEDCG7PZe1igt34WgEEB/ JnBuCD2JEwIrMA2seVClHpzi5VDbAdHUOMtf8qV9vSBQ1G4PDmSpLD7yXMIfCzkggc/z JHwSPp4DHJbpihR00WgIpAbrPJgtoqeptoPHDAQx2N8DFmFZuHwva89hBCr1xqBUuxCf M85A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FF1GcA0Vb8NPwj+FOyfHWcihsl5BIQJFYGSV3+DLrGY=; b=SphzUZtgCadRnTRavDJ1lWK9QU6xhn3yGAfPja26vYUz7VbxOg1DINwU6C0ektTUL2 l5vKHhf3LmK81FKJ/dU2OdH2U2qQeGU3Aunp+KXml0RdwWaedXjS4zIkV77+gvQjMLaT VhHSB+mzWH6EfEdpoEsqmoWnnOjgNkw6smoOYQUaKXrNjxDWyS9vIla0T3GnYFCvUeNT Fkf988sTSoASZZUbxs5zdgEJFN8L61APy4pJDeHWdIA2lSsBL8re8115qpOvNy+p2/Bc EKnjBbLPQWcy8aAjpzXqWEZnO2gMfoodlljtgLxfEGFJ7ApNRyVlmtYjvqtiBxZDL3uo AMDQ== X-Gm-Message-State: AOAM5305/UwTbQBf0IySRy15JHtQaS+U5q/GM5YyI/BtwXWFfRNTqvq6 E6tkn+oZxWJaVIbapNhEgnmY4/4Fph4= X-Google-Smtp-Source: ABdhPJzGZ7nSggz7HQPzJOSUag9VE2HuHSoQXbmZ9lvCNNo3HuoFGUqPkepzPZP0kQOTbsNruna8dg== X-Received: by 2002:a05:6402:d09:: with SMTP id eb9mr27581216edb.219.1600266247950; Wed, 16 Sep 2020 07:24:07 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:bf52:574a:7641:226d]) by smtp.gmail.com with ESMTPSA id f17sm14295076eds.45.2020.09.16.07.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 07:24:07 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/ttm: fix incorrect TT->SYSTEM move handling Date: Wed, 16 Sep 2020 16:24:06 +0200 Message-Id: <20200916142406.2379-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When we move from the SYSTEM domain to the TT domain we still need to potentially change the caching state. This is most likely the source of a bunch of problems with AGP and USWC together with hibernation and swap. Signed-off-by: Christian König CC: stable@vger.kernel.org --- drivers/gpu/drm/ttm/ttm_bo.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index ffbdc20d8e8d..5f7efc90970e 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -264,13 +264,6 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, if (ret) goto out_err; } - - if (bo->mem.mem_type == TTM_PL_SYSTEM) { - if (bdev->driver->move_notify) - bdev->driver->move_notify(bo, evict, mem); - bo->mem = *mem; - goto moved; - } } if (bdev->driver->move_notify) @@ -293,7 +286,6 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, goto out_err; } -moved: bo->evicted = false; ctx->bytes_moved += bo->num_pages << PAGE_SHIFT;