diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/dvb-usb-ids.h | 1 | ||||
-rw-r--r-- | include/media/dvbdev.h | 2 | ||||
-rw-r--r-- | include/media/media-entity.h | 2 | ||||
-rw-r--r-- | include/media/rc-core.h | 1 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 25 | ||||
-rw-r--r-- | include/media/v4l2-device.h | 4 | ||||
-rw-r--r-- | include/media/v4l2-fwnode.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-ioctl.h | 12 | ||||
-rw-r--r-- | include/media/videobuf-dvb.h | 59 | ||||
-rw-r--r-- | include/media/vsp1.h | 45 |
10 files changed, 51 insertions, 102 deletions
diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h index 28e2be5c8a98..f9e73b4a6e89 100644 --- a/include/media/dvb-usb-ids.h +++ b/include/media/dvb-usb-ids.h @@ -418,6 +418,7 @@ #define USB_PID_SVEON_STV27 0xd3af #define USB_PID_TURBOX_DTT_2000 0xd3a4 #define USB_PID_WINTV_SOLOHD 0x0264 +#define USB_PID_WINTV_SOLOHD_2 0x8268 #define USB_PID_EVOLVEO_XTRATV_STICK 0xa115 #define USB_PID_HAMA_DVBT_HYBRID 0x2758 #define USB_PID_XBOX_ONE_TUNER 0x02d5 diff --git a/include/media/dvbdev.h b/include/media/dvbdev.h index ee91516ad074..881ca461b7bb 100644 --- a/include/media/dvbdev.h +++ b/include/media/dvbdev.h @@ -91,6 +91,7 @@ struct dvb_frontend; * @mfe_dvbdev: Frontend device in use, in the case of MFE * @mfe_lock: Lock to prevent using the other frontends when MFE is * used. + * @mdev_lock: Protect access to the mdev pointer. * @mdev: pointer to struct media_device, used when the media * controller is used. * @conn: RF connector. Used only if the device has no separate @@ -114,6 +115,7 @@ struct dvb_adapter { struct mutex mfe_lock; /* access lock for thread creation */ #if defined(CONFIG_MEDIA_CONTROLLER_DVB) + struct mutex mdev_lock; struct media_device *mdev; struct media_entity *conn; struct media_pad *conn_pads; diff --git a/include/media/media-entity.h b/include/media/media-entity.h index a732af1dbba0..3aa3d58d1d58 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -842,7 +842,7 @@ struct media_entity *media_entity_get(struct media_entity *entity); * a fwnode. This is useful for devices which use more complex * mappings of media pads. * - * If the entity dose not implement the get_fwnode_pad() operation + * If the entity does not implement the get_fwnode_pad() operation * then this function searches the entity for the first pad that * matches the @direction_flags. * diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 6742fd86ff65..61571773a98d 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -347,6 +347,7 @@ static inline void ir_raw_event_reset(struct rc_dev *dev) struct ir_raw_event ev = { .reset = true }; ir_raw_event_store(dev, &ev); + dev->idle = true; ir_raw_event_handle(dev); } diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index f60cf9cf3b9c..456ac13eca1d 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -30,6 +30,7 @@ * @VFL_TYPE_SUBDEV: for V4L2 subdevices * @VFL_TYPE_SDR: for Software Defined Radio tuners * @VFL_TYPE_TOUCH: for touch sensors + * @VFL_TYPE_MAX: number of VFL types, must always be last in the enum */ enum vfl_devnode_type { VFL_TYPE_GRABBER = 0, @@ -237,7 +238,6 @@ struct v4l2_file_operations { * @ioctl_ops: pointer to &struct v4l2_ioctl_ops with ioctl callbacks * * @valid_ioctls: bitmap with the valid ioctls for this device - * @disable_locking: bitmap with the ioctls that don't require locking * @lock: pointer to &struct mutex serialization lock * * .. note:: @@ -290,7 +290,6 @@ struct video_device const struct v4l2_ioctl_ops *ioctl_ops; DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); - DECLARE_BITMAP(disable_locking, BASE_VIDIOC_PRIVATE); struct mutex *lock; }; @@ -437,28 +436,6 @@ void video_device_release(struct video_device *vdev); void video_device_release_empty(struct video_device *vdev); /** - * v4l2_is_known_ioctl - Checks if a given cmd is a known V4L ioctl - * - * @cmd: ioctl command - * - * returns true if cmd is a known V4L2 ioctl - */ -bool v4l2_is_known_ioctl(unsigned int cmd); - -/** v4l2_disable_ioctl_locking - mark that a given command - * shouldn't use core locking - * - * @vdev: pointer to &struct video_device - * @cmd: ioctl command - */ -static inline void v4l2_disable_ioctl_locking(struct video_device *vdev, - unsigned int cmd) -{ - if (_IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) - set_bit(_IOC_NR(cmd), vdev->disable_locking); -} - -/** * v4l2_disable_ioctl- mark that a given command isn't implemented. * shouldn't use core locking * diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 0c9e4da55499..b330e4a08a6b 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -33,7 +33,7 @@ struct v4l2_ctrl_handler; * struct v4l2_device - main struct to for V4L2 device drivers * * @dev: pointer to struct device. - * @mdev: pointer to struct media_device + * @mdev: pointer to struct media_device, may be NULL. * @subdevs: used to keep track of the registered subdevs * @lock: lock this struct; can be used by the driver as well * if this struct is embedded into a larger struct. @@ -58,9 +58,7 @@ struct v4l2_ctrl_handler; */ struct v4l2_device { struct device *dev; -#if defined(CONFIG_MEDIA_CONTROLLER) struct media_device *mdev; -#endif struct list_head subdevs; spinlock_t lock; char name[V4L2_DEVICE_NAME_SIZE]; diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h index c228ec1c77cf..9cccab618b98 100644 --- a/include/media/v4l2-fwnode.h +++ b/include/media/v4l2-fwnode.h @@ -99,7 +99,7 @@ struct v4l2_fwnode_endpoint { struct fwnode_endpoint base; /* * Fields below this line will be zeroed by - * v4l2_fwnode_parse_endpoint() + * v4l2_fwnode_endpoint_parse() */ enum v4l2_mbus_type bus_type; union { diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index a7b3f7c75d62..a8dbf5b54b5c 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -658,18 +658,6 @@ void v4l_printk_ioctl(const char *prefix, unsigned int cmd); struct video_device; - -/** - * v4l2_ioctl_get_lock - get the mutex (if any) that it is need to lock for - * a given command. - * - * @vdev: Pointer to struct &video_device. - * @cmd: Ioctl name. - * - * .. note:: Internal use only. Should not be used outside V4L2 core. - */ -struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned int cmd); - /* names for fancy debug output */ extern const char *v4l2_field_names[]; extern const char *v4l2_type_names[]; diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h deleted file mode 100644 index c9c81990a56c..000000000000 --- a/include/media/videobuf-dvb.h +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#include <media/dvbdev.h> -#include <media/dmxdev.h> -#include <media/dvb_demux.h> -#include <media/dvb_net.h> -#include <media/dvb_frontend.h> - -#ifndef _VIDEOBUF_DVB_H_ -#define _VIDEOBUF_DVB_H_ - -struct videobuf_dvb { - /* filling that the job of the driver */ - char *name; - struct dvb_frontend *frontend; - struct videobuf_queue dvbq; - - /* video-buf-dvb state info */ - struct mutex lock; - struct task_struct *thread; - int nfeeds; - - /* videobuf_dvb_(un)register manges this */ - struct dvb_demux demux; - struct dmxdev dmxdev; - struct dmx_frontend fe_hw; - struct dmx_frontend fe_mem; - struct dvb_net net; -}; - -struct videobuf_dvb_frontend { - struct list_head felist; - int id; - struct videobuf_dvb dvb; -}; - -struct videobuf_dvb_frontends { - struct list_head felist; - struct mutex lock; - struct dvb_adapter adapter; - int active_fe_id; /* Indicates which frontend in the felist is in use */ - int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */ -}; - -int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, - struct module *module, - void *adapter_priv, - struct device *device, - short *adapter_nr, - int mfe_shared); - -void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f); - -struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); -void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f); - -struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); -int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); - -#endif /* _VIDEOBUF_DVB_H_ */ diff --git a/include/media/vsp1.h b/include/media/vsp1.h index 68a8abe4fac5..678c24de1ac6 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -34,13 +34,23 @@ struct vsp1_du_lif_config { unsigned int width; unsigned int height; - void (*callback)(void *, bool); + void (*callback)(void *data, bool completed, u32 crc); void *callback_data; }; int vsp1_du_setup_lif(struct device *dev, unsigned int pipe_index, const struct vsp1_du_lif_config *cfg); +/** + * struct vsp1_du_atomic_config - VSP atomic configuration parameters + * @pixelformat: plane pixel format (V4L2 4CC) + * @pitch: line pitch in bytes, for all planes + * @mem: DMA memory address for each plane of the frame buffer + * @src: source rectangle in the frame buffer (integer coordinates) + * @dst: destination rectangle on the display (integer coordinates) + * @alpha: alpha value (0: fully transparent, 255: fully opaque) + * @zpos: Z position of the plane (from 0 to number of planes minus 1) + */ struct vsp1_du_atomic_config { u32 pixelformat; unsigned int pitch; @@ -51,11 +61,42 @@ struct vsp1_du_atomic_config { unsigned int zpos; }; +/** + * enum vsp1_du_crc_source - Source used for CRC calculation + * @VSP1_DU_CRC_NONE: CRC calculation disabled + * @VSP1_DU_CRC_PLANE: Perform CRC calculation on an input plane + * @VSP1_DU_CRC_OUTPUT: Perform CRC calculation on the composed output + */ +enum vsp1_du_crc_source { + VSP1_DU_CRC_NONE, + VSP1_DU_CRC_PLANE, + VSP1_DU_CRC_OUTPUT, +}; + +/** + * struct vsp1_du_crc_config - VSP CRC computation configuration parameters + * @source: source for CRC calculation + * @index: index of the CRC source plane (when source is set to plane) + */ +struct vsp1_du_crc_config { + enum vsp1_du_crc_source source; + unsigned int index; +}; + +/** + * struct vsp1_du_atomic_pipe_config - VSP atomic pipe configuration parameters + * @crc: CRC computation configuration + */ +struct vsp1_du_atomic_pipe_config { + struct vsp1_du_crc_config crc; +}; + void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index); int vsp1_du_atomic_update(struct device *dev, unsigned int pipe_index, unsigned int rpf, const struct vsp1_du_atomic_config *cfg); -void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index); +void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index, + const struct vsp1_du_atomic_pipe_config *cfg); int vsp1_du_map_sg(struct device *dev, struct sg_table *sgt); void vsp1_du_unmap_sg(struct device *dev, struct sg_table *sgt); |