Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E10DC43461 for ; Thu, 17 Sep 2020 12:20:08 +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 09C362087D for ; Thu, 17 Sep 2020 12:20:07 +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="R9BuleTl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09C362087D 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 E81756E13B; Thu, 17 Sep 2020 12:20:06 +0000 (UTC) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id C52DB6E13B for ; Thu, 17 Sep 2020 12:20:05 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id j11so3043365ejk.0 for ; Thu, 17 Sep 2020 05:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=noHSkXZhEp/9jIAudJb7DDKYs2jm6VdqpaXUz54abiU=; b=R9BuleTlFcIXe0WJ7IGLTjsHs0YW+sHPVO06h7S06L/iS6sK97r9elEWzJVMQVBTXk SvshpF3aiO6NXJuKLJ7+McdEguurL6HrqiCv5gcBeFy5ifz8S+KFQWToGh0nl5g1dCEE 8HkmCBiggpyrOVttbHvyp/q3eKm/yqZDxqGri1nY+YQyjpulB9ck5BU7UOq33EX5O8tI N/WGJppw4DaFDrR8xfSGwptUQdNJzvu8vgJrG3Lbit9FOzeVyCHqd1Z4RzrlNgZGFY+d lPXT0Zm+sgTx4sNPhG2Y1d6Cy1Who0PMIUMIf144W5EEkQRoZq3hcQP172v+hIn8AvO5 jX7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:to:from:subject:message-id:date :user-agent:mime-version:content-transfer-encoding:content-language; bh=noHSkXZhEp/9jIAudJb7DDKYs2jm6VdqpaXUz54abiU=; b=PhZ1ktf1zZFs9FmJi8JWkL7R3rc1+6BdDqg/PewxpGmAmKCP/PGjzsN7H6DUEWkXuQ crcCeYZ0euw8H8T/YpxRIrsfUCC6voTlrAASWFYdklMxQe7dkmG9j51SBtpgQOMrRONC axo+05/0qVaLwui7YQOSt/Qv6koT8NxcMk9fH7nO4Q0NSBCcrooK/iQUXTn2xmTgXzPJ Ed2qIsOlJ4PU+yXH8LpbOAI53kt3iOJR9ZnBJux+Q3wfMJDGuYd2uyWg4ccU0Kmz7rED rwgayMbVWxejrfPOhsOYYWZFlRl1F9WXppDoNHTbGKub2nwVdMqqG7e55u/r4NtuDEI0 /3cQ== X-Gm-Message-State: AOAM531VCG+AAH8X98nRvAxgstgdGQkyQRWQHrFUMrusaTk+b93FRLLb 9xDQpuDwNPzD5i4s8DmGOCk= X-Google-Smtp-Source: ABdhPJwwFrJbxbhLX/mImlwLk0McIs4Yili8rCaapcssfC1XqjVk074DXMyJZqplZOO3uIx9OByOjw== X-Received: by 2002:a17:906:4a07:: with SMTP id w7mr30321020eju.366.1600345204457; Thu, 17 Sep 2020 05:20:04 -0700 (PDT) Received: from ?IPv6:2a02:908:1252:fb60:be8a:bd56:1f94:86e7? ([2a02:908:1252:fb60:be8a:bd56:1f94:86e7]) by smtp.gmail.com with ESMTPSA id m10sm11593095ejx.123.2020.09.17.05.20.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 05:20:03 -0700 (PDT) To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , "dri-devel@lists.freedesktop.org" , Daniel Vetter From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Why can't ttm_tt_swapout() handle uncached or WC BOs? Message-ID: Date: Thu, 17 Sep 2020 14:20:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-US 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: , Reply-To: christian.koenig@amd.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi guys, Michel once submitted a patch to fix triggering this BUG_ON in ttm_tt_swapout(): > BUG_ON(ttm->caching_state != tt_cached); Now my question is does anybody know why we have that in the first place? The only problematic thing I can see is calling copy_highpage() and that one is just doing a kmap_atomic()/kunmap_atomic() on the source and destination. I can't see why it should be problematic for this temporary mapping to be cached instead of uncached or WC? Does anybody has any idea? Thanks, Christian. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel