08 Jul, 2011

2 commits


11 Jun, 2011

2 commits

  • Signed-off-by: HeungJun, Kim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    HeungJun, Kim
     
  • Store the cdev pointer in struct irctl, allocated dynamically as needed,
    rather than having a static array. At the same time, recycle some of the
    saved memory to nudge the maximum number of lirc devices supported up a
    ways -- its not that uncommon these days, now that we have the rc-core
    lirc bridge driver, to see a system with at least 4 raw IR receivers.
    (consider a mythtv backend with several video capture devices and the
    possible need for IR transmit hardware).

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     

01 Jun, 2011

1 commit


26 May, 2011

1 commit


25 May, 2011

1 commit


21 May, 2011

1 commit

  • When device_add is called in rc_register_device, the rc sysfs nodes show
    up, and there's a window in which ir-keytable can be launched via udev
    and trigger a show_protocols call, which runs without various rc_dev
    fields filled in yet. Add some locking around registration and
    store/show_protocols to prevent that from happening.

    The problem manifests thusly:

    [64692.957872] BUG: unable to handle kernel NULL pointer dereference at 0000000000000090
    [64692.957878] IP: [] show_protocols+0x47/0xf1 [rc_core]
    [64692.957890] PGD 19cfc7067 PUD 19cfc6067 PMD 0
    [64692.957894] Oops: 0000 [#1] SMP
    [64692.957897] last sysfs file: /sys/devices/pci0000:00/0000:00:03.1/usb3/3-1/3-1:1.0/rc/rc2/protocols
    [64692.957902] CPU 3
    [64692.957903] Modules linked in: redrat3(+) ir_lirc_codec lirc_dev ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder rc_hauppauge ir_nec
    _decoder rc_core ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_mi
    di_event snd_seq_midi_emul snd_emu10k1 snd_rawmidi snd_ac97_codec ac97_bus snd_seq snd_pcm snd_seq_device snd_timer snd_page_alloc snd_util_mem pcsp
    kr tg3 snd_hwdep emu10k1_gp snd amd64_edac_mod gameport edac_core soundcore edac_mce_amd k8temp shpchp i2c_piix4 lm63 e100 mii uinput ipv6 raid0 rai
    d1 ata_generic firewire_ohci pata_acpi firewire_core crc_itu_t sata_svw pata_serverworks floppy radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core
    [last unloaded: redrat3]
    [64692.957949] [64692.957952] Pid: 12265, comm: ir-keytable Tainted: G M W 2.6.39-rc6+ #2 empty empty/TYAN Thunder K8HM S3892
    [64692.957957] RIP: 0010:[] [] show_protocols+0x47/0xf1 [rc_core]
    [64692.957962] RSP: 0018:ffff880194509e38 EFLAGS: 00010202
    [64692.957964] RAX: 0000000000000000 RBX: ffffffffa036d1e0 RCX: ffffffffa036a47a
    [64692.957966] RDX: ffff88019a84d000 RSI: ffffffffa036d1e0 RDI: ffff88019cf2f3f0
    [64692.957969] RBP: ffff880194509e68 R08: 0000000000000002 R09: 0000000000000000
    [64692.957971] R10: 0000000000000002 R11: 0000000000001617 R12: ffff88019a84d000
    [64692.957973] R13: 0000000000001000 R14: ffff8801944d2e38 R15: ffff88019ce5f190
    [64692.957976] FS: 00007f0a30c9a720(0000) GS:ffff88019fc00000(0000) knlGS:0000000000000000
    [64692.957979] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [64692.957981] CR2: 0000000000000090 CR3: 000000019a8e0000 CR4: 00000000000006e0
    [64692.957983] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [64692.957986] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    [64692.957989] Process ir-keytable (pid: 12265, threadinfo ffff880194508000, task ffff88019a9fc720)
    [64692.957991] Stack:
    [64692.957992] 0000000000000002 ffffffffa036d1e0 ffff880194509f58 0000000000001000
    [64692.957997] ffff8801944d2e38 ffff88019ce5f190 ffff880194509e98 ffffffff8131484b
    [64692.958001] ffffffff8118e923 ffffffff810e9b2f ffff880194509e98 ffff8801944d2e18
    [64692.958005] Call Trace:
    [64692.958014] [] dev_attr_show+0x27/0x4e
    [64692.958014] [] ? sysfs_read_file+0x94/0x172
    [64692.958014] [] ? __get_free_pages+0x16/0x52
    [64692.958014] [] sysfs_read_file+0xbd/0x172
    [64692.958014] [] vfs_read+0xac/0xf3
    [64692.958014] [] ? fget_light+0x3a/0xa1
    [64692.958014] [] sys_read+0x4d/0x74
    [64692.958014] [] system_call_fastpath+0x16/0x1b

    Its a bit difficult to reproduce, but I'm fairly confident this has
    fixed the problem.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     

20 May, 2011

9 commits


28 Apr, 2011

1 commit

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits)
    [media] media: vb2: correct queue initialization order
    [media] media: vb2: fix incorrect v4l2_buffer->flags handling
    [media] s5p-fimc: Add support for the buffer timestamps and sequence
    [media] s5p-fimc: Fix bytesperline and plane payload setup
    [media] s5p-fimc: Do not allow changing format after REQBUFS
    [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4
    [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet
    [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet
    [media] tda18271: fix bad calculation of main post divider byte
    [media] tda18271: prog_cal and prog_tab variables should be s32, not u8
    [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init
    [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails
    [media] v4l: Don't register media entities for subdev device nodes
    [media] omap3isp: Don't increment node entity use count when poweron fails
    [media] omap3isp: lane shifter support
    [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts
    [media] media: add missing 8-bit bayer formats and Y12
    [media] v4l: add V4L2_PIX_FMT_Y12 format
    cx23885: Fix stv0367 Kconfig dependency
    [media] omap3isp: Use isp xclk defines
    ...

    Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c

    Linus Torvalds
     

13 Apr, 2011

1 commit


31 Mar, 2011

1 commit


23 Mar, 2011

11 commits

  • dma_addr_t may not fit into void* on some architectures. To be safe, make
    vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it
    in vb2_dma_contig_plane_paddr() back to dma_addr_t.

    Signed-off-by: Pawel Osciak
    Reported-by: Hans Verkuil
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Pawel Osciak
     
  • This fixes the problem in which a host driver
    sets a personalized sizeimage or bytesperline field,
    and gets ignored when doing G_FMT.

    Signed-off-by: Sergio Aguirre
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Sergio Aguirre
     
  • There are two "hauppauge-new" keymaps, one with protocol
    unknown, and the other with the protocol marked accordingly.
    However, both tables are miss-named.

    Also, the old rc-hauppauge-new is broken, as it mixes
    three different controllers as if they were just one.

    This patch solves half of the problem by renaming the
    correct keycode table as just rc-hauppauge. This table
    contains the codes for the four different types of
    remote controllers found on Hauppauge cards, properly
    mapped with their different addresses.

    create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
    delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
    [Jarod: fix up RC_MAP_HAUPPAUGE defines]

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jarod Wilson

    Mauro Carvalho Chehab
     
  • Rather than guess which driver supports core priority handling, require drivers
    that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device.

    Updated the core prio handling accordingly and set the flag in the three
    drivers that do.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The video_device struct has proper ref counting and its release function
    will be called when the last user releases it. But no such support was
    available for struct v4l2_device. This made it hard to determine when a
    USB driver can release the device if it has multiple device nodes.

    With one device node it is easy of course, since when the device node is
    released, the whole device can be released.

    This patch adds refcounting to v4l2_device. When registering device nodes
    the v4l2_device refcount will be increased, when releasing device nodes
    it will be decreased. The (optional) release function will be called when
    the last device node was released.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Drivers that use v4l2_fh can now use the core framework support of g/s_priority.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Several drivers need to do something when the first filehandle is opened
    or the last filehandle is closed. Most implement some use count mechanism,
    but if they use v4l2_fh, then you can also just check if this is the only
    filehandle for the device node. A simple helper function can do this.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Add two new functions: v4l2_fh_open allocates and initializes a struct v4l2_fh
    based on a struct file pointer and v4l2_fh_release releases and frees a struct
    v4l2_fh.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Integrate the v4l2_prio_state into the core, ready for use.

    One struct v4l2_prio_state is added to v4l2_device and a pointer
    to a prio state is added to video_device.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • We are going to move priority handling into the v4l2 core. As a consequence
    the v4l2_prio helper functions need to be moved into the core videodev
    module as well to prevent circular dependencies.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

22 Mar, 2011

9 commits

  • Signed-off-by: Pawel Osciak
    Signed-off-by: Mauro Carvalho Chehab

    Pawel Osciak
     
  • Remote used for TerraTec Cinergy T Stick RC.
    Keytable from Martin Groszhauser

    Signed-off-by: Antti Palosaari
    Cc: Martin Groszhauser
    Cc: TerraTux
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Allow the MIPI-CSI data alignment to be defined in the board setup
    as it may be different across various camera sensors.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Add num_clients field to struct s5p_fimc_isp_info to define exactly
    size of clients array which simplifies a bit the sensors management.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Some buggy sensors generate corrupt frames when the stream is started.
    This new operation return the number of corrupt frames to skip when
    starting the stream.

    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • This patch adds the VIDIOC_SUBDEV_S_CROP and G_CROP ioctls to the
    userland API. CROPCAP is not implemented because it's redundant.

    Signed-off-by: Antti Koskipaa
    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Antti Koskipaa
     
  • The three new ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL,
    VIDIOC_SUBDEV_G_FRAME_INTERVAL and VIDIOC_SUBDEV_S_FRAME_INTERVAL can be
    used to enumerate and configure a subdev's frame rate from userspace.

    Two new video::g/s_frame_interval subdev operations are introduced to
    support those ioctls. The existing video::g/s_parm operations are
    deprecated and shouldn't be used anymore.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • Add a userspace API to get, set and enumerate the media format on a
    subdev pad.

    The format at the output of a subdev usually depends on the format at
    its input(s). The try format operation is thus not suitable for probing
    format at individual pads, as it can't modify the device state and thus
    can't remember the format tried at the input to compute the output
    format.

    To fix the problem, pass an extra argument to the get/set format
    operations to select the 'try' or 'active' format.

    The try format is used when probing the subdev. Setting the try format
    must not change the device configuration but can store data for later
    reuse. Data storage is provided at the file-handle level so applications
    probing the subdev concurently won't interfere with each other.

    The active format is used when configuring the subdev. It's identical to
    the format handled by the usual get/set operations.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • Add a v4l2_subdev_pad_ops structure for the operations that need to be
    performed at the pad level such as format-related operations.

    Pad format-related operations use v4l2_mbus_framefmt instead of
    v4l2_format.

    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart