Hi!
I am trying to devel graphics application using SDL, but found no
double-buffering support for Intel graphics adapter, so to avoid tearing
during graphics i am trying to achieve results using native drm vblank
features.
I compiled:
1. vanilla 2.6.26
2. yesterday git snapshot of dri
3. *pci_read_base.diff*
(http://archive.netbsd.se/?ml=dri-devel&a=2008-07&t=7966315)
4. *0001-Export-shmem_file_setup-for-DRM-GEM.patch*
As result i got DRM startup with some warning, but it starts and xorg
run normally:
[...]
Aug 29 13:20:24 np-3 kernel: Symbol init_mm is marked as UNUSED, however
this module is using it.
Aug 29 13:20:24 np-3 kernel: This symbol will go away in the future.
Aug 29 13:20:24 np-3 kernel: Please evalute if this is the right api to
use and if it really is, submit a report the linux k
Aug 29 13:20:24 np-3 kernel: [drm] Initialized drm 1.1.0 20060810
Aug 29 13:20:24 np-3 kernel: [drm:i915_gem_detect_bit_6_swizzle] *ERROR*
pci_read_base failed: -2
Aug 29 13:20:24 np-3 kernel: Initialized i915 1.13.0 20080730 on minor 0
[...]
After xorg starts it's successfully perform *drm_irq_install* and
*drm_vblank_init*:
[EMAIL PROTECTED] src]# cat /proc/interrupts
[...]
20: 6149 0 IO-APIC-fasteoi ehci_hcd:usb1,
uhci_hcd:usb2, eth0
222: 0 0 PCI-MSI-edge [EMAIL PROTECTED]:0000:00:02.0
223: 7205 0 PCI-MSI-edge ahci
[...]
But simple programs that call *drmWaitVBlank* from libdrm:
[...]
drmVBlank vbl_back;
vbl.request.type = DRM_VBLANK_RELATIVE;
vbl.request.sequence = 1;
r = drmWaitVBlank(fd, &vbl);
[...]
always returns -1 and errno is *EBUSY*.
After some researches i found that *EBUSY* returned from *drm_vblank_wait*:
[...]
DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ,
((drm_vblank_count(dev, crtc)
- vblwait->request.sequence) <= (1 << 23)));
[...]
because *drm_vblank_count* returns always the same value.
I found that happens, because the are no interrupts from intel graphics
adapter happens:
[...]
222: 0 0 PCI-MSI-edge [EMAIL PROTECTED]:0000:00:02.0
[...]
this value remains constant *0* all time.
Is it normal that no interrupts happens from board?
or i need more initializing ioctl call to /dev/dri/0 to allow interrupts
from hardware?
--
________________________________________
Maksym Veremeyenko
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel