Re: [Intel-gfx] [PATCH 11/12] [RFC] drm/irq: More robustness in drm_vblank_on|off
On Wed, May 14, 2014 at 08:51:16PM +0200, Daniel Vetter wrote: If we want to use this functionality in generic helpers to make sure that all drivers have somewhat sane vblank handling across modesets/dpms, we need to make it work for all drivers. But some don't support interrupts and hence also not vblank waits. Just return early on such drivers. Note that with pageflips drivers are free to implement them however they wish to. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_irq.c | 6 ++ 1 file changed, 6 insertions(+) I'm confused. This seems to be the very same patch as 09/12. But since you've already merged this I guess it must have resolved itself somehow... Thierry pgpN23RN71eTD.pgp Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 11/12] [RFC] drm/irq: More robustness in drm_vblank_on|off
On Wed, May 21, 2014 at 02:53:00PM +0200, Thierry Reding wrote: On Wed, May 14, 2014 at 08:51:16PM +0200, Daniel Vetter wrote: If we want to use this functionality in generic helpers to make sure that all drivers have somewhat sane vblank handling across modesets/dpms, we need to make it work for all drivers. But some don't support interrupts and hence also not vblank waits. Just return early on such drivers. Note that with pageflips drivers are free to implement them however they wish to. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_irq.c | 6 ++ 1 file changed, 6 insertions(+) I'm confused. This seems to be the very same patch as 09/12. But since you've already merged this I guess it must have resolved itself somehow... Screwed up the patch sending and submitted two patch 09/12. This one really is just rfc and I didn't pull it in yet. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 11/12] [RFC] drm/irq: More robustness in drm_vblank_on|off
If we want to use this functionality in generic helpers to make sure that all drivers have somewhat sane vblank handling across modesets/dpms, we need to make it work for all drivers. But some don't support interrupts and hence also not vblank waits. Just return early on such drivers. Note that with pageflips drivers are free to implement them however they wish to. Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/drm_irq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 51ebe9086be9..03fba43ab6be 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1020,6 +1020,9 @@ void drm_vblank_off(struct drm_device *dev, int crtc) unsigned long irqflags; unsigned int seq; + if (!dev-irq_enabled) + return; + spin_lock_irqsave(dev-vbl_lock, irqflags); vblank_disable_and_save(dev, crtc); wake_up(dev-vblank[crtc].queue); @@ -1080,6 +1083,9 @@ void drm_vblank_on(struct drm_device *dev, int crtc) { unsigned long irqflags; + if (!dev-irq_enabled) + return; + spin_lock_irqsave(dev-vbl_lock, irqflags); /* re-enable interrupts if there's are users left */ if (atomic_read(dev-vblank[crtc].refcount) != 0) -- 1.8.3.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx