Message ID | 20180111221546.28547-1-thierry.reding@gmail.com |
---|---|
Headers | show
Return-Path: <linux-tegra-owner@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sVrg3s52"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zHgF34V3wz9sNr for <incoming@patchwork.ozlabs.org>; Fri, 12 Jan 2018 09:15:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933355AbeAKWPu (ORCPT <rfc822;incoming@patchwork.ozlabs.org>); Thu, 11 Jan 2018 17:15:50 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:35599 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933167AbeAKWPt (ORCPT <rfc822;linux-tegra@vger.kernel.org>); Thu, 11 Jan 2018 17:15:49 -0500 Received: by mail-qt0-f196.google.com with SMTP id u10so3809105qtg.2 for <linux-tegra@vger.kernel.org>; Thu, 11 Jan 2018 14:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zYtQAUlF8+mDrOa9FY6SFjS0SPVz3zgGxN58kan4Kao=; b=sVrg3s52Smcze+Pn024VxgJl2bsFhrZqr/nLbrRyTJaMXhmAfVvSrkCSm3qsxi538B 12nCT8Ne+/i1B1aroMdcjraQkRb4zfOe7NZ742TmkEA8qSLyjHcmxhe882fAQ397Na6+ Axf50ASLtkVDoLG6W8hXbvg+VH5b0Y5uGhSHp63vZ36/eIAaDD8B05rdx3Xg8aPTzbxJ S3wwzhR7tKEa7qIkTc6k/e6W7dtmS/Egcg04Kj5pM290Na0cQd9X1LE0H+DKDngmSsWn 94GEMLsfhIHtLNtnPJK0pIANjW+nbWEDC/75q9Pc9BJeJ4H+2NSzNoDgzGAkNGdfRZvG HTEw== 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; bh=zYtQAUlF8+mDrOa9FY6SFjS0SPVz3zgGxN58kan4Kao=; b=UBynSeNomarJl0sA2XzjvJcnKE8FW3Vu5bDomF/bwgVnkbfAhz2c/aXY+WuWu73eoF J6SNJ6DJXVHStwzdSjq/VrWAi99GxyTM91WZUx0hZ6n74EWQ0lA/7ABunXsJyfcmoXEy cJWBSVCwMhWeG7tXy9tvMBrTNfHR466CMP5EVu5cjh6ijPQqsFI7s8PZ7MIKp16JShNS SQ4DLFx3ES171BxmXFVj7t9H+k7qmPAohzOyBe45NO/jSCONehtXDnlaLd5YiUeY3fBR rG4nZW8Oz7ZUZziVZ0nyrwyPaSdQfNSGO0PF6IZOqz+XuJ+T6G7FGWyTbGJki/rbhqkj LmfQ== X-Gm-Message-State: AKwxytca6Z+rILo7BGFAeWLx70nBTRZKel1+uUERI/InUAS4li2whYII SI5CGG9jx3loQs3RgIU910E= X-Google-Smtp-Source: ACJfBotBCq2cP6AisCKz8sX/ClJ5ZH/s0ZIZT+stLVGmET82X0lJ0HpWDyRpfw8sbb5qJ1xmv5hwqQ== X-Received: by 10.237.52.228 with SMTP id x91mr35270977qtd.42.1515708948656; Thu, 11 Jan 2018 14:15:48 -0800 (PST) Received: from localhost (p200300E41F21CF00227DB10B7BBDB590.dip0.t-ipconnect.de. [2003:e4:1f21:cf00:227d:b10b:7bbd:b590]) by smtp.gmail.com with ESMTPSA id x6sm13965604qkg.19.2018.01.11.14.15.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2018 14:15:48 -0800 (PST) From: Thierry Reding <thierry.reding@gmail.com> To: Ben Skeggs <bskeggs@redhat.com> Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-tegra@vger.kernel.org Subject: [PATCH 0/3] drm/nouveau: Add support for fence FDs Date: Thu, 11 Jan 2018 23:15:43 +0100 Message-Id: <20180111221546.28547-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.15.1 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: <linux-tegra.vger.kernel.org> X-Mailing-List: linux-tegra@vger.kernel.org |
Series |
drm/nouveau: Add support for fence FDs
|
expand
|
From: Thierry Reding <treding@nvidia.com> This small series of patches implements support for waiting on and emitting fence FDs on kickoff. This enables explicit fencing and can be used for example to synchronize buffer accesses between the display engine and the GPU on Tegra. The first patch lays the groundwork by splitting up nouveau_fence_sync() to allow reuse. Patch 2 is where the interesting stuff happens. It adds a new IOCTL (PUSHBUF2) that is a superset of the existing PUSHBUF IOCTL and reuses most of the code while adding support for pre- and post- fences. Finally, the third patch teaches Nouveau how to deal with fence arrays, which are usually a result of chaining together multiple dependent jobs. I have corresponding userspace support for these in libdrm and Mesa: https://cgit.freedesktop.org/~tagr/drm/log/?h=nouveau-sync-fd https://cgit.freedesktop.org/~tagr/mesa/log/?h=nouveau-sync-fd I'll send those patches out shortly. There's some more work depending on these patches that I plan to send out in the coming days or weeks. The final result allows Nouveau and Tegra DRM to negotiate for a framebuffer modifier and then go into a render/scanout loop using fences for synchronization. All of this was tested using a slightly modified version of kmscube. Thierry Thierry Reding (3): drm/nouveau: Split nouveau_fence_sync() drm/nouveau: Support fence FDs at kickoff drm/nouveau: Support DMA fence arrays drivers/gpu/drm/nouveau/nouveau_bo.c | 38 ++++++++++++++- drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/nouveau/nouveau_display.c | 4 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nouveau_fence.c | 81 +++++++++++++------------------ drivers/gpu/drm/nouveau/nouveau_fence.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 80 ++++++++++++++++++++++++++++-- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 + include/uapi/drm/nouveau_drm.h | 14 ++++++ 9 files changed, 167 insertions(+), 57 deletions(-)