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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 7ADDFC433E1 for ; Tue, 7 Jul 2020 20:12:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5907520720 for ; Tue, 7 Jul 2020 20:12:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="EQACmdsr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbgGGUMn (ORCPT ); Tue, 7 Jul 2020 16:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgGGUMn (ORCPT ); Tue, 7 Jul 2020 16:12:43 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A5BC061755 for ; Tue, 7 Jul 2020 13:12:42 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id s10so46549671wrw.12 for ; Tue, 07 Jul 2020 13:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=EQACmdsr4BPtlAJqkzr9R5XdvYuqjZDGUJpcqynaR9dnUXl02uFKttw6FBlNs0dXdM F1WA5lhOXW8PWkJRtyNj9enm/04MG/SPTWbLk/B/DWmB8NUidBzFoxhIh+yWwjOicU8d l0HLk/Ns1FQJNcp2mnNmbINTdJZngyt/vHHzU= 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=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=TMZtymUzmRQ0VNIeaK8T+DAKAjDa0qNsLiedR3Nbk0/qOIChjT+44lWc0u6LEi8osE 0Ea6zo15uhKFGbyYWJwktzunWIlthiYpTPexGcgQPXxthOtMFmElrWTMygE4F26RtoLx vN5m6HBfTByUtp4r5RZALSZ6XSBaVDLSY1+1kPrUmIwsHqzZIp1dCgeBAh0qCjc19kEg RroCTZNcV4ZFR6yuU9bipTo+QrUZR9sJ3CJZADBxleOrkvmV/b2BvOB2Rt+yFaQyFnjt ro8Y+Oodi+jupAMdRhQ34Y2Dnzv8MB5g1+ZHHRcL+mxq7iyyRoBRfVkvFNYwH6Kx+LlR YaMw== X-Gm-Message-State: AOAM5310KtFQWd5RT5xCgOZkYMkrES29mVr3D+nWbb/d/wzMKIfFhbC8 ICYZpcdAFCBOGcvV0R3w8FY+QwsZDqc= X-Google-Smtp-Source: ABdhPJzP+3waGhBq+3r68iTg+28anENV8Lyik0jqTsjw13d4CVIDG3/NEfzcHUaOmSNhle7ELZ4b7A== X-Received: by 2002:adf:8b5a:: with SMTP id v26mr54730638wra.165.1594152760781; Tue, 07 Jul 2020 13:12:40 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q7sm2515262wra.56.2020.07.07.13.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 13:12:40 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , linux-rdma@vger.kernel.org, Daniel Vetter Subject: [PATCH 00/25] dma-fence annotations, round 3 Date: Tue, 7 Jul 2020 22:12:04 +0200 Message-Id: <20200707201229.472834-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Hi all, Bunch of changes that might matter: - Clarification that dma_fences are for drivers/gpu, requested by Jason Gunthorpe. - New patch to list all the past discussions around indefinite/future/whatever fences, and why this (sadly) still just plain doesn't work. Came up again when discussing this stuff, I'd like to just be able to point at some doc going forward. - I rolled dma-fence critical section annotations to (almost, vc4, nouveau and i915 have a bit too much custom commit functions) atomic kms drivers. Really looking for some serious testing with these, aside from the amdgpu atomic commit issues we've also found some problems in vmwgfx commit code. All real issues, and noted in the patches. After the modeset stuff there's still the drm/scheduler annotations. Testing with other drivers than amdgpu using the drm scheduler would be very much welcome. Then the usual pile of amdgpu hacks that I used for developing this. That stuff isn't for merging, I'm hoping amd is working on proper patches for these things. Testing for this series means, especially for the atomic kms drivers: - build with CONFIG_PROVE_LOCKING - run the kms_atomic igt, that one actually uses atomic in&out fences - withotu these it's only half the fun - run anything else you feel like which might use fences, like your rendering driver. You do have testcases for that right :-) The mmu notifier annotation integration landed in -mm for a few days meanwhile, but I busted it pretty bad. That one needs more baking, I'm trying to figure out how to write unit tests for these annotations so I'm not blowing them up all the time. Also I think it'd be nice if we could start merging some of the earlier stuff maybe, that doest start to feel solid (at least to me). Review, commenst and testing on drivers as per above very much welcome. Thanks, Daniel Daniel Vetter (25): dma-fence: basic lockdep annotations dma-fence: prime lockdep annotations dma-buf.rst: Document why idenfinite fences are a bad idea drm/vkms: Annotate vblank timer drm/vblank: Annotate with dma-fence signalling section drm/amdgpu: add dma-fence annotations to atomic commit path drm/komdea: Annotate dma-fence critical section in commit path drm/malidp: Annotate dma-fence critical section in commit path drm/atmel: Use drm_atomic_helper_commit drm/imx: Annotate dma-fence critical section in commit path drm/omapdrm: Annotate dma-fence critical section in commit path drm/rcar-du: Annotate dma-fence critical section in commit path drm/tegra: Annotate dma-fence critical section in commit path drm/tidss: Annotate dma-fence critical section in commit path drm/tilcdc: Use standard drm_atomic_helper_commit drm/atomic-helper: Add dma-fence annotations drm/scheduler: use dma-fence annotations in main thread drm/amdgpu: use dma-fence annotations in cs_submit() drm/amdgpu: s/GFP_KERNEL/GFP_ATOMIC in scheduler code drm/amdgpu: DC also loves to allocate stuff where it shouldn't drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail drm/scheduler: use dma-fence annotations in tdr work drm/amdgpu: use dma-fence annotations for gpu reset code Revert "drm/amdgpu: add fbdev suspend/resume on gpu reset" drm/amdgpu: gpu recovery does full modesets Documentation/driver-api/dma-buf.rst | 82 +++++++ drivers/dma-buf/dma-fence.c | 207 ++++++++++++++++++ drivers/dma-buf/dma-resv.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- .../gpu/drm/arm/display/komeda/komeda_kms.c | 3 + drivers/gpu/drm/arm/malidp_drv.c | 3 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 96 +------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 4 - drivers/gpu/drm/drm_atomic_helper.c | 16 ++ drivers/gpu/drm/drm_vblank.c | 8 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 + drivers/gpu/drm/omapdrm/omap_drv.c | 9 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 + drivers/gpu/drm/scheduler/sched_main.c | 11 + drivers/gpu/drm/tegra/drm.c | 3 + drivers/gpu/drm/tidss/tidss_kms.c | 4 + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 47 +--- drivers/gpu/drm/virtio/virtgpu_display.c | 20 -- drivers/gpu/drm/vkms/vkms_crtc.c | 8 +- include/linux/dma-fence.h | 13 ++ 27 files changed, 421 insertions(+), 182 deletions(-) -- 2.27.0 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 A2BE9C433DF for ; Tue, 7 Jul 2020 20:12:44 +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 7B561206BE for ; Tue, 7 Jul 2020 20:12:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="EQACmdsr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B561206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 E1B736E248; Tue, 7 Jul 2020 20:12:43 +0000 (UTC) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9EDE6E123 for ; Tue, 7 Jul 2020 20:12:42 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id r12so46525762wrj.13 for ; Tue, 07 Jul 2020 13:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=EQACmdsr4BPtlAJqkzr9R5XdvYuqjZDGUJpcqynaR9dnUXl02uFKttw6FBlNs0dXdM F1WA5lhOXW8PWkJRtyNj9enm/04MG/SPTWbLk/B/DWmB8NUidBzFoxhIh+yWwjOicU8d l0HLk/Ns1FQJNcp2mnNmbINTdJZngyt/vHHzU= 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=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=V7DeYD3pwhLnJcpaYpIRZDbE0US4qsILziG32wrsI0F+1D8inScwVERbn5R0SN4Jud xwteSD2K8WL0nKoxhuUhNq32A5iiXKN2s/cNqG73JJnJD3FzZaX5v0Bt33HVr2o72w/s nkM7u1IW8FV6neXvasRv/H6GiFIYQhAcKxq9VGJVG4XEZyATqaKXkg3QD65m8QsFz9d9 sgsESkwXYhuOCCRVQJmw5NEog96uMjMB+jjrBZ3sHBlIf7sDDVQ2DsXQYwKIkXXVz1BY 60yp8k9Wt3Ml9WvpPzelsQKG2R+NF84Q7KHqVvVvDqEminBsIR5ZBKoyK4lBOBoqX8uC WfcA== X-Gm-Message-State: AOAM532Gww5fBIUwJLIDWQO9TzzskqNbW8U7VdcWDtQebL3x0+n1IDTU v0Js+tOO62fAHQUHgLSb7zh9Xyd2wzM= X-Google-Smtp-Source: ABdhPJzP+3waGhBq+3r68iTg+28anENV8Lyik0jqTsjw13d4CVIDG3/NEfzcHUaOmSNhle7ELZ4b7A== X-Received: by 2002:adf:8b5a:: with SMTP id v26mr54730638wra.165.1594152760781; Tue, 07 Jul 2020 13:12:40 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q7sm2515262wra.56.2020.07.07.13.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 13:12:40 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 00/25] dma-fence annotations, round 3 Date: Tue, 7 Jul 2020 22:12:04 +0200 Message-Id: <20200707201229.472834-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.27.0 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: , Cc: linux-rdma@vger.kernel.org, Daniel Vetter , Intel Graphics Development Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, Bunch of changes that might matter: - Clarification that dma_fences are for drivers/gpu, requested by Jason Gunthorpe. - New patch to list all the past discussions around indefinite/future/whatever fences, and why this (sadly) still just plain doesn't work. Came up again when discussing this stuff, I'd like to just be able to point at some doc going forward. - I rolled dma-fence critical section annotations to (almost, vc4, nouveau and i915 have a bit too much custom commit functions) atomic kms drivers. Really looking for some serious testing with these, aside from the amdgpu atomic commit issues we've also found some problems in vmwgfx commit code. All real issues, and noted in the patches. After the modeset stuff there's still the drm/scheduler annotations. Testing with other drivers than amdgpu using the drm scheduler would be very much welcome. Then the usual pile of amdgpu hacks that I used for developing this. That stuff isn't for merging, I'm hoping amd is working on proper patches for these things. Testing for this series means, especially for the atomic kms drivers: - build with CONFIG_PROVE_LOCKING - run the kms_atomic igt, that one actually uses atomic in&out fences - withotu these it's only half the fun - run anything else you feel like which might use fences, like your rendering driver. You do have testcases for that right :-) The mmu notifier annotation integration landed in -mm for a few days meanwhile, but I busted it pretty bad. That one needs more baking, I'm trying to figure out how to write unit tests for these annotations so I'm not blowing them up all the time. Also I think it'd be nice if we could start merging some of the earlier stuff maybe, that doest start to feel solid (at least to me). Review, commenst and testing on drivers as per above very much welcome. Thanks, Daniel Daniel Vetter (25): dma-fence: basic lockdep annotations dma-fence: prime lockdep annotations dma-buf.rst: Document why idenfinite fences are a bad idea drm/vkms: Annotate vblank timer drm/vblank: Annotate with dma-fence signalling section drm/amdgpu: add dma-fence annotations to atomic commit path drm/komdea: Annotate dma-fence critical section in commit path drm/malidp: Annotate dma-fence critical section in commit path drm/atmel: Use drm_atomic_helper_commit drm/imx: Annotate dma-fence critical section in commit path drm/omapdrm: Annotate dma-fence critical section in commit path drm/rcar-du: Annotate dma-fence critical section in commit path drm/tegra: Annotate dma-fence critical section in commit path drm/tidss: Annotate dma-fence critical section in commit path drm/tilcdc: Use standard drm_atomic_helper_commit drm/atomic-helper: Add dma-fence annotations drm/scheduler: use dma-fence annotations in main thread drm/amdgpu: use dma-fence annotations in cs_submit() drm/amdgpu: s/GFP_KERNEL/GFP_ATOMIC in scheduler code drm/amdgpu: DC also loves to allocate stuff where it shouldn't drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail drm/scheduler: use dma-fence annotations in tdr work drm/amdgpu: use dma-fence annotations for gpu reset code Revert "drm/amdgpu: add fbdev suspend/resume on gpu reset" drm/amdgpu: gpu recovery does full modesets Documentation/driver-api/dma-buf.rst | 82 +++++++ drivers/dma-buf/dma-fence.c | 207 ++++++++++++++++++ drivers/dma-buf/dma-resv.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- .../gpu/drm/arm/display/komeda/komeda_kms.c | 3 + drivers/gpu/drm/arm/malidp_drv.c | 3 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 96 +------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 4 - drivers/gpu/drm/drm_atomic_helper.c | 16 ++ drivers/gpu/drm/drm_vblank.c | 8 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 + drivers/gpu/drm/omapdrm/omap_drv.c | 9 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 + drivers/gpu/drm/scheduler/sched_main.c | 11 + drivers/gpu/drm/tegra/drm.c | 3 + drivers/gpu/drm/tidss/tidss_kms.c | 4 + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 47 +--- drivers/gpu/drm/virtio/virtgpu_display.c | 20 -- drivers/gpu/drm/vkms/vkms_crtc.c | 8 +- include/linux/dma-fence.h | 13 ++ 27 files changed, 421 insertions(+), 182 deletions(-) -- 2.27.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 73827C433E0 for ; Tue, 7 Jul 2020 20:12:44 +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 3FF9E206BE for ; Tue, 7 Jul 2020 20:12:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="EQACmdsr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FF9E206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DFE5D6E123; Tue, 7 Jul 2020 20:12:42 +0000 (UTC) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3143B6E123 for ; Tue, 7 Jul 2020 20:12:42 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id z2so24324087wrp.2 for ; Tue, 07 Jul 2020 13:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=EQACmdsr4BPtlAJqkzr9R5XdvYuqjZDGUJpcqynaR9dnUXl02uFKttw6FBlNs0dXdM F1WA5lhOXW8PWkJRtyNj9enm/04MG/SPTWbLk/B/DWmB8NUidBzFoxhIh+yWwjOicU8d l0HLk/Ns1FQJNcp2mnNmbINTdJZngyt/vHHzU= 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=uPjc1QiDkpaQJ6gj5QOnEN0IMsVli0wQ5gnB2ck1gMU=; b=Hzq0IixGsSPF5vQ/v64rvm/8Yr0GjcZzDsnlCsLMw7yHJjmfy8eFH5amffYLBLFDu3 9auMtF1B1ky5XUvV5dXvoB85LDTY7YD/ZTInVs06+RwJxOCfh+i+PCdsU83uSXap7dx4 jHJ+W/ZU3xyoI/QflH+o4DffP4XeTJHMjudzZkp4zjIcaFeFH4x9oMhcOgsh5UkDfO1I CxCvtFOB0/gFU/uJZV8vKHz3ER6u9TdfdWgXEwcpz54y39AS1ql4PUz7dANVbbg1bfzr VlpwFDI4VNrS8T/K7yn4YW0FJqdsELD9/oJXEEFswgNE0BzIQxE8kccV08znBSonS6oM O+UQ== X-Gm-Message-State: AOAM532BgVWBlvuvK22JHbrgkTvQlmNo6Dftsk4AJo1AveS2ClYYaihv QaCxHpaea7SQhT/Zak5bFPPSZQ== X-Google-Smtp-Source: ABdhPJzP+3waGhBq+3r68iTg+28anENV8Lyik0jqTsjw13d4CVIDG3/NEfzcHUaOmSNhle7ELZ4b7A== X-Received: by 2002:adf:8b5a:: with SMTP id v26mr54730638wra.165.1594152760781; Tue, 07 Jul 2020 13:12:40 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q7sm2515262wra.56.2020.07.07.13.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 13:12:40 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 7 Jul 2020 22:12:04 +0200 Message-Id: <20200707201229.472834-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 00/25] dma-fence annotations, round 3 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rdma@vger.kernel.org, Daniel Vetter , Intel Graphics Development Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi all, Bunch of changes that might matter: - Clarification that dma_fences are for drivers/gpu, requested by Jason Gunthorpe. - New patch to list all the past discussions around indefinite/future/whatever fences, and why this (sadly) still just plain doesn't work. Came up again when discussing this stuff, I'd like to just be able to point at some doc going forward. - I rolled dma-fence critical section annotations to (almost, vc4, nouveau and i915 have a bit too much custom commit functions) atomic kms drivers. Really looking for some serious testing with these, aside from the amdgpu atomic commit issues we've also found some problems in vmwgfx commit code. All real issues, and noted in the patches. After the modeset stuff there's still the drm/scheduler annotations. Testing with other drivers than amdgpu using the drm scheduler would be very much welcome. Then the usual pile of amdgpu hacks that I used for developing this. That stuff isn't for merging, I'm hoping amd is working on proper patches for these things. Testing for this series means, especially for the atomic kms drivers: - build with CONFIG_PROVE_LOCKING - run the kms_atomic igt, that one actually uses atomic in&out fences - withotu these it's only half the fun - run anything else you feel like which might use fences, like your rendering driver. You do have testcases for that right :-) The mmu notifier annotation integration landed in -mm for a few days meanwhile, but I busted it pretty bad. That one needs more baking, I'm trying to figure out how to write unit tests for these annotations so I'm not blowing them up all the time. Also I think it'd be nice if we could start merging some of the earlier stuff maybe, that doest start to feel solid (at least to me). Review, commenst and testing on drivers as per above very much welcome. Thanks, Daniel Daniel Vetter (25): dma-fence: basic lockdep annotations dma-fence: prime lockdep annotations dma-buf.rst: Document why idenfinite fences are a bad idea drm/vkms: Annotate vblank timer drm/vblank: Annotate with dma-fence signalling section drm/amdgpu: add dma-fence annotations to atomic commit path drm/komdea: Annotate dma-fence critical section in commit path drm/malidp: Annotate dma-fence critical section in commit path drm/atmel: Use drm_atomic_helper_commit drm/imx: Annotate dma-fence critical section in commit path drm/omapdrm: Annotate dma-fence critical section in commit path drm/rcar-du: Annotate dma-fence critical section in commit path drm/tegra: Annotate dma-fence critical section in commit path drm/tidss: Annotate dma-fence critical section in commit path drm/tilcdc: Use standard drm_atomic_helper_commit drm/atomic-helper: Add dma-fence annotations drm/scheduler: use dma-fence annotations in main thread drm/amdgpu: use dma-fence annotations in cs_submit() drm/amdgpu: s/GFP_KERNEL/GFP_ATOMIC in scheduler code drm/amdgpu: DC also loves to allocate stuff where it shouldn't drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail drm/scheduler: use dma-fence annotations in tdr work drm/amdgpu: use dma-fence annotations for gpu reset code Revert "drm/amdgpu: add fbdev suspend/resume on gpu reset" drm/amdgpu: gpu recovery does full modesets Documentation/driver-api/dma-buf.rst | 82 +++++++ drivers/dma-buf/dma-fence.c | 207 ++++++++++++++++++ drivers/dma-buf/dma-resv.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- .../gpu/drm/arm/display/komeda/komeda_kms.c | 3 + drivers/gpu/drm/arm/malidp_drv.c | 3 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 96 +------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 4 - drivers/gpu/drm/drm_atomic_helper.c | 16 ++ drivers/gpu/drm/drm_vblank.c | 8 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 + drivers/gpu/drm/omapdrm/omap_drv.c | 9 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 + drivers/gpu/drm/scheduler/sched_main.c | 11 + drivers/gpu/drm/tegra/drm.c | 3 + drivers/gpu/drm/tidss/tidss_kms.c | 4 + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 47 +--- drivers/gpu/drm/virtio/virtgpu_display.c | 20 -- drivers/gpu/drm/vkms/vkms_crtc.c | 8 +- include/linux/dma-fence.h | 13 ++ 27 files changed, 421 insertions(+), 182 deletions(-) -- 2.27.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx