W dniu 1 grudnia 2009 09:59 użytkownik Michel Dänzer <mic...@daenzer.net> napisał: > On Tue, 2009-12-01 at 09:43 +0100, Rafał Miłecki wrote: >> Could you tell me how can I wait for vblank from kernel space, please? >> I see there is drm_wait_vblank but this is not yet exported. I tried >> export this and use this with _DRM_VBLANK_ABSOLUTE so I hit >> > DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, >> but that was busy waiting I think, as my desktop was almost not usable. >> >> Also Alex believe I should *not* use drm_* for syncing my kernel >> module code with vblank. > > E.g. you could just call drm_vblank_get() before you need vblank > interrupts to occur, drm_vblank_put() after you don't need them anymore > and handle the rest from the IRQ handler.
Are you sure that drm can prevent radeon from receiving interrupts from GPU? As I told, I've added debugging in r600.c:r600_irq_process on "D1 vblank". I've tried your method anyway: I call drm_vblank_get(rdev->ddev, 0); when I decide to reclock and then drm_vblank_put(rdev->ddev, 0); when I actually reclock. This didn't help. My log looks like this: [ 182.205078] [drm] [DBG] set planned action to UPCLOCK [ 182.205400] [drm] IH: D1 vblank [ 182.205427] [drm] [DBG] reclocking, setting to 680000 kHz [ 182.222075] [drm] IH: D1 vblank [ 182.238723] [drm] IH: D1 vblank [ 182.255438] [drm] IH: D1 vblank [ 182.272118] [drm] IH: D1 vblank [ 182.288796] [drm] IH: D1 vblank [ 182.305090] [drm] [DBG] set planned action to DOWNCLOCK [ 182.305475] [drm] IH: D1 vblank [ 182.305501] [drm] [DBG] reclocking, setting to 340000 kHz [ 182.322088] [drm] IH: D1 vblank [ 182.338794] [drm] IH: D1 vblank [ 182.405079] [drm] [DBG] set planned action to UPCLOCK not a one more vblank comes after that I've also tried starting glxgears or openarena, but this didn't make driver receive any more VBLANK IRQ. However when I enabled debugging I've noticed this: [ 279.550094] [drm] r600_irq_process start: rptr 32144, wptr 32160 [ 279.550118] [drm] IH: CP int: 0x00000000 [ 279.550240] [drm] r600_irq_process start: rptr 32160, wptr 32176 [ 279.550264] [drm] IH: CP int: 0x00000000 [ 279.550404] [drm] r600_irq_process start: rptr 32176, wptr 32192 [ 279.550424] [drm] IH: CP int: 0x00000000 [ 279.550483] [drm] r600_irq_process start: rptr 32192, wptr 32208 [ 279.550503] [drm] IH: CP int: 0x00000000 [ 279.550668] [drm] r600_irq_process start: rptr 32208, wptr 32224 [ 279.550689] [drm] IH: CP int: 0x00000000 [ 279.550744] [drm] r600_irq_process start: rptr 32224, wptr 32240 [ 279.550765] [drm] IH: CP int: 0x00000000 [ 279.550928] [drm] r600_irq_process start: rptr 32240, wptr 32256 [ 279.550948] [drm] IH: CP int: 0x00000000 [ 279.551003] [drm] r600_irq_process start: rptr 32256, wptr 32272 [ 279.551024] [drm] IH: CP int: 0x00000000 [ 279.552428] [drm] r600_irq_process start: rptr 32272, wptr 32288 [ 279.552450] [drm] IH: CP int: 0x00000000 After I stop receiving any VBLANK interrupts I receive tons on CP int. Any more tips? :| -- Rafał ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel