From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org> Cc: linaro-mm-sig@lists.linaro.org, "Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>, "Haneen Mohammed" <hamohammed.sa@gmail.com>, linux-rdma@vger.kernel.org, "Daniel Vetter" <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org, "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>, amd-gfx@lists.freedesktop.org, "Chris Wilson" <chris@chris-wilson.co.uk>, "Melissa Wen" <melissa.srw@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch>, "Daniel Vetter" <daniel.vetter@intel.com>, "Christian König" <christian.koenig@amd.com>, linux-media@vger.kernel.org Subject: [PATCH 02/11] drm/vkms: Annotate vblank timer Date: Thu, 21 Jan 2021 16:29:50 +0100 Message-ID: <20210121152959.1725404-3-daniel.vetter@ffwll.ch> (raw) In-Reply-To: <20210121152959.1725404-1-daniel.vetter@ffwll.ch> This is needed to signal the fences from page flips, annotate it accordingly. We need to annotate entire timer callback since if we get stuck anywhere in there, then the timer stops, and hence fences stop. Just annotating the top part that does the vblank handling isn't enough. Tested-by: Melissa Wen <melissa.srw@gmail.com> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> 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 <chris@chris-wilson.co.uk> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Cc: Haneen Mohammed <hamohammed.sa@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> --- drivers/gpu/drm/vkms/vkms_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 0443b7deeaef..6164349cdf11 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ +#include <linux/dma-fence.h> + #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_probe_helper.h> @@ -14,7 +16,9 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) struct drm_crtc *crtc = &output->crtc; struct vkms_crtc_state *state; u64 ret_overrun; - bool ret; + bool ret, fence_cookie; + + fence_cookie = dma_fence_begin_signalling(); ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, output->period_ns); @@ -49,6 +53,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) DRM_DEBUG_DRIVER("Composer worker already queued\n"); } + dma_fence_end_signalling(fence_cookie); + return HRTIMER_RESTART; } -- 2.30.0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply index Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20210121152959.1725404-1-daniel.vetter@ffwll.ch> 2021-01-21 15:29 ` [PATCH 01/11] drm/atomic-helper: Add dma-fence annotations Daniel Vetter 2021-01-21 15:29 ` Daniel Vetter [this message] 2021-01-21 15:29 ` [PATCH 03/11] drm/vblank: Annotate with dma-fence signalling section Daniel Vetter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210121152959.1725404-3-daniel.vetter@ffwll.ch \ --to=daniel.vetter@ffwll.ch \ --cc=amd-gfx@lists.freedesktop.org \ --cc=chris@chris-wilson.co.uk \ --cc=christian.koenig@amd.com \ --cc=daniel.vetter@intel.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=hamohammed.sa@gmail.com \ --cc=intel-gfx@lists.freedesktop.org \ --cc=linaro-mm-sig@lists.linaro.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-rdma@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=melissa.srw@gmail.com \ --cc=rodrigosiqueiramelo@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
AMD-GFX Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/amd-gfx/0 amd-gfx/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 amd-gfx amd-gfx/ https://lore.kernel.org/amd-gfx \ amd-gfx@lists.freedesktop.org public-inbox-index amd-gfx Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.freedesktop.lists.amd-gfx AGPL code for this site: git clone https://public-inbox.org/public-inbox.git