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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 5A089C433E7 for ; Tue, 20 Oct 2020 04:16:17 +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 D5E6F2067B for ; Tue, 20 Oct 2020 04:16:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5E6F2067B 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 BF16D6EC13; Tue, 20 Oct 2020 04:16:15 +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 61CD86EC13 for ; Tue, 20 Oct 2020 04:16:14 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-Yr8BKKhTOguoC1gVy-HpSQ-1; Tue, 20 Oct 2020 00:16:10 -0400 X-MC-Unique: Yr8BKKhTOguoC1gVy-HpSQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E8861868417; Tue, 20 Oct 2020 04:16:09 +0000 (UTC) Received: from tyrion-bne-redhat-com.redhat.com (vpn2-54-180.bne.redhat.com [10.64.54.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id C778C5D9D2; Tue, 20 Oct 2020 04:16:08 +0000 (UTC) From: Dave Airlie To: dri-devel@lists.freedesktop.org Subject: [RFC HACKY] ttm don't allow multihop moves Date: Tue, 20 Oct 2020 14:16:05 +1000 Message-Id: <20201020041606.1701145-1-airlied@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: gmail.com 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: , Cc: christian.koenig@amd.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is an RFC for a hacky idea I had to at least move the converation forward. The branch with this in it is: https://github.com/airlied/linux/tree/ttm-bounce it won't apply to any other tree as it's based on all those patches I posted and some other refactorings. The basic idea is if the driver gets a move request from the TTM core that requires it to bounce the buffer through another domain, it returns -EMULTIHOP and puts the domain details into the mem_type, the core code then just does the mem space for the new temp placment, and retries the final placement again. I've tested on nouveau that the code gets executed (a printk prints at least), and it all doesn't burn down, but it's very lightly tested. It does allow getting rid of a lot of driver code to handle bouncing moves. I'm sure this could be prettier or done in a very different way more effectively, but hey this was my chance to misuse an errno value. Dave. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel