mmap() oddities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi!

I'm using the videodevX driver (20011221 snapshot). Somehow when I do an
mmap() from my user application it never calls the mmap() function in the
V4L2 driver. (I put printk's all over the mmap function in the videodevX
module and in my driver's mmap function - neither of them gets called at
all). Any ideas why this is happening?

My user app basically does the following:

open(/dev/v4l2/capture0)
ioctl(VIDIOC_QUERYCAP)
ioctl(VIDIOC_G_FMT)
ioctl(VIDIOC_REQBUFS)
ioctl(VIDIOC_G_PARM)
ioctl(VIDIOC_S_PARM)
ioctl(VIDIOC_QUERYBUF)
mmap(offset + length I got from QUERYBUF)

All the ioctl's work as expected and calls through to my driver. It is just
mmap() that fails with EPERM without even calling into the v4l2 module:

------------< snip <------< snip <------< snip <------------
root@frodo:/# ./stream 30
area-sensor.c: line 280: as_open()
     capture device: /dev/v4l2/capture0
area-sensor.c: line 434: as_ioctl()
frame buffer device: /dev/fb/0
       capture rate: 30 frames per second
area-sensor.c: line 434: as_ioctl()
area-sensor.c: line 434: as_ioctl()
area-sensor.c: line 434: as_ioctl()
area-sensor.c: line 434: as_ioctl()
area-sensor.c: line 434: as_ioctl()
area-sensor.c: line 345: as_close()
area-sensor: freeing irq 1
unable to map frame buffer memory at 0x18000000 (length 262144 bytes) to a virtual
address! (Permission denied)
root@frodo:/#
------------< snip <------< snip <------< snip <------------

-- 

Regards
 Abraham

Catsup and Mustard all over the place!  It's the Human Hamburger!

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Aintree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham@xxxxxxxxxx         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa

Attachment: pgpgWCXB809Xa.pgp
Description: PGP signature


[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux