Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1121012ybg; Thu, 4 Jun 2020 01:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyngSDtGkT5jg5sKEABGXsXYjHjp/svyNRhAUX1A7hSm2u3C6N7Ntb+Rg8fywkTlRyOm8C9 X-Received: by 2002:a17:906:404:: with SMTP id d4mr2995667eja.173.1591258745642; Thu, 04 Jun 2020 01:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591258745; cv=none; d=google.com; s=arc-20160816; b=ttYAO23qniNnSYeTbZAfeX1cphFNOMGXjcpLHxclzNb/DkoYYujwhpM11zAzWpeYx5 98UUvoy43kllbgIdn/gpagA7IOCxvzMiqUcXSlNIeKMYENRlxDsSxiGxZJb1nAy6qvQ1 n/OF81fLHJVOlrqgFxmEKAC/IHvVyoqA9kxD7iSJL5D+U/m20cK7cRHj0UosOj7N+Qxr vhrNsRrPcSNQfN2CYFYnog1XNS6jQLR7AsQD8oneZjsCA9HPNWmZo81vIrJiUOao+vR+ LM98LE6zoCwBupMmSmk1aTHBGTrbpR+ACQ3uNtriiNAGq57+QBJUoAdiV3Fm8NEzBPS3 44Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RU/4ty0eEugeyrPrVEiQiwkrKqeJ+uZPrr4qGpCy8Ns=; b=wJhc0GZ91VMM6vBRkcvaVCG1HU3cPSrD1ySBdW+Ezs9hvOsTRxqkvLepLqwa1LJtmU UHZ3ay6UuIhUkypThOuzstLBdLItnZKgxA326N6fja1sR9cZEPWbLd1atsGlN5YWEq2k gLyE3uDlJg/ByfV6/l6IadGiPdcHL2C3hIyyN0IzauhLviguPfK8YwsJ1NE3q1SODF18 5ZL5+wTCi/JhtoSFZzNJHNDBztznWUbVl0tHm/N7U46aBvQvS9Df5yR0ve8BZ1Y4EQI4 nnSu0TLD9kZTcnMjBbEbpumPRB/I5GlCakRlIPk/UczFnj7YO5mh1Mruvu4qnT0dU3w5 mMfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="WQ76x/1R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gj15si1139142ejb.622.2020.06.04.01.18.42; Thu, 04 Jun 2020 01:19:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="WQ76x/1R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728143AbgFDINw (ORCPT + 99 others); Thu, 4 Jun 2020 04:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbgFDIMn (ORCPT ); Thu, 4 Jun 2020 04:12:43 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C3FEC08C5C0 for ; Thu, 4 Jun 2020 01:12:43 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id r9so4295567wmh.2 for ; Thu, 04 Jun 2020 01:12:43 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=RU/4ty0eEugeyrPrVEiQiwkrKqeJ+uZPrr4qGpCy8Ns=; b=WQ76x/1RuTy1JkP9aezKfVnljVf6mBF2k34u6CEzkCHMD5rjzO23Ol0qswF1Uqnn3r NZfMgpfPaWZjBnzc3b4R0o6daICNWxE3wsC5YBUn7XLwXhFfZLN5ZIKJ1vC7UEvOJvnQ jpY5agvtrUOJPNYvXTokA+XG56fPkvmyjcTDY= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=RU/4ty0eEugeyrPrVEiQiwkrKqeJ+uZPrr4qGpCy8Ns=; b=YVQQxiDcoznnoZ4IwCGhPsPIAmfWxraMqr7SBQWrUVNZMHCO+4m1HXLoCnz4ZGdnsZ bmaIkCY7WntaWHgmcEodUVHXv46T51tPvmYjmlb7hJyyn77iGyuUyM5fYW8NwUxZ14BP Zv9vEEoKDCHIhzDWsZQEtF4p0iXNNM+lRKF6Qvm2O5rAWMTC/u51EYiYHGf76YWLoQQM D8Ph1qkp+w+sQFx8JG/jXHUxev8mRLUmDu4XAWQHcbJoB0cXFVjeMP6Us3on20llBSJ6 zF9oFytfuTIj+8Dem28fWW2UaCrmjn4QlWiUmZ+X1OdKioRAgJ8Jy8Kuty0jxLdrrktP hyNw== X-Gm-Message-State: AOAM533rIMOuOfB6RV0eh8H83Ls9+BrqcN0aTwoJauOSy+m/CXKxgGVJ MhVwBUUmFTDznkjpb8jc47HfJmYuE98= X-Received: by 2002:a1c:4008:: with SMTP id n8mr3030923wma.118.1591258362288; Thu, 04 Jun 2020 01:12:42 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f11sm6873305wrj.2.2020.06.04.01.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 01:12:41 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , LKML , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Daniel Vetter , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Chris Wilson , Maarten Lankhorst , =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Vetter Subject: [PATCH 08/18] drm/amdgpu: add dma-fence annotations to atomic commit path Date: Thu, 4 Jun 2020 10:12:14 +0200 Message-Id: <20200604081224.863494-9-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604081224.863494-1-daniel.vetter@ffwll.ch> References: <20200604081224.863494-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I need a canary in a ttm-based atomic driver to make sure the dma_fence_begin/end_signalling annotations actually work. Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index bdba0bfd6df1..adabfa929f42 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -57,6 +57,7 @@ #include "ivsrcid/ivsrcid_vislands30.h" +#include #include #include #include @@ -7320,6 +7321,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) struct drm_connector_state *old_con_state, *new_con_state; struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state; int crtc_disable_count = 0; + bool fence_cookie; + + fence_cookie = dma_fence_begin_signalling(); drm_atomic_helper_update_legacy_modeset_state(dev, state); @@ -7600,6 +7604,8 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) /* Signal HW programming completion */ drm_atomic_helper_commit_hw_done(state); + dma_fence_end_signalling(fence_cookie); + if (wait_for_vblank) drm_atomic_helper_wait_for_flip_done(dev, state); -- 2.26.2