Skip to content

Commit

Permalink
[media] solo6x10: convert encoder nodes to vb2
Browse files Browse the repository at this point in the history
As a consequence the ioctl op has been replaced by unlocked_ioctl.
Since we are now using the core lock the locking scheme has been
simplified as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 25, 2013
1 parent a7eb931 commit 382c31a
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 379 deletions.
1 change: 1 addition & 0 deletions drivers/staging/media/solo6x10/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ config SOLO6X10
tristate "Softlogic 6x10 MPEG codec cards"
depends on PCI && VIDEO_DEV && SND && I2C
select VIDEOBUF_DMA_SG
select VIDEOBUF2_DMA_SG
select SND_PCM
---help---
This driver supports the Softlogic based MPEG-4 and h.264 codec
Expand Down
13 changes: 8 additions & 5 deletions drivers/staging/media/solo6x10/solo6x10.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf-core.h>
#include <media/videobuf2-core.h>

#include "registers.h"

Expand Down Expand Up @@ -135,6 +136,11 @@ struct solo_p2m_dev {

#define OSD_TEXT_MAX 44

struct solo_vb2_buf {
struct vb2_buffer vb;
struct list_head list;
};

enum solo_enc_types {
SOLO_ENC_TYPE_STD,
SOLO_ENC_TYPE_EXT,
Expand All @@ -146,10 +152,8 @@ struct solo_enc_dev {
struct v4l2_ctrl_handler hdl;
struct video_device *vfd;
/* General accounting */
struct mutex enable_lock;
struct mutex lock;
spinlock_t motion_lock;
atomic_t readers;
atomic_t mpeg_readers;
u8 ch;
u8 mode, gop, qp, interlaced, interval;
u8 bw_weight;
Expand All @@ -169,9 +173,8 @@ struct solo_enc_dev {
int jpeg_len;

u32 fmt;
u8 enc_on;
enum solo_enc_types type;
struct videobuf_queue vidq;
struct vb2_queue vidq;
struct list_head vidq_active;
int desc_count;
int desc_nelts;
Expand Down
Loading

0 comments on commit 382c31a

Please sign in to comment.