media fixes for v5.16-rc3
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmGbRRYACgkQCF8+vY7k 4RWYVw/8DwN6kyjGkBkAMGoHCXUYeoATYn3l5NVQaAyxTxF8s5d5YPFOXhJn77s9 S8CVvqy3JvZWeI/8L6mmOZl0rBNiDkURvnXyvcMv2lHb+VJpcb3hulgtMrRPogMw EFH2DjP9FE+ipOcqaAYrBIgyNRgvhqV+GKcqAXH9X4o+6lOZUKXVZcUbz/T6rWUQ MbZdc1aq1GA4SBj/scI0QMZskJ6dFtZTSeLUTgHo/QcybkxPh64Sqw2k3pc+xzRr SQB60DsDbzCuBX0aQjJWxNAUmu/b/DZdyd6yuiFvZCtsCiWH8rlkkr0kLmJB19Wr Xv7o5+heTYh5dKrDzA4VpbKeM5pjUn5hd3iK5C+YLNS7WwUNeBlrgT4JD1TUhj/w zwMRiKTBqMbi2lkOzcgxGMKn3SCkSa7WiKw25EdxQbn22laKP+6/a6ELg2nniARm N8OmTkpOYDK6va2j8U1ouJBwHOVoF+rUOzyD8CsRwC1zMjCdefN7dhvOd8Wh87Qo vCahUAHTCb5qANbRWqp2khTyg+LKK6/jGKa6IxVLAHhc9ZvyOCJW4iHEQ52cIFQI 5FxR+CYJUN8vMxHsm90Y/8xis17HaOrkfQcWX7o/GVQh6jPrihez2TC0zoq3kj6N ID6Qaqs3tLCcsjX5XDBGiM2sDITrWNIZYMoIMg0vf29g5rED/aY= =f3wv -----END PGP SIGNATURE----- Merge tag 'media/v5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - fix VIDIOC_DQEVENT ioctl handling for 32-bit userspace with a 64-bit kernel - regression fix for videobuf2 core - fix for CEC core when handling non-block transmit - hi846: fix a clang warning * tag 'media/v5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: hi846: remove the of_match_ptr macro media: hi846: include property.h instead of of_graph.h media: cec: copy sequence field for the reply media: videobuf2-dma-sg: Fix buf->vb NULL pointer dereference media: v4l2-core: fix VIDIOC_DQEVENT handling on non-x86
This commit is contained in:
commit
c7756f3a32
@ -1199,6 +1199,7 @@ void cec_received_msg_ts(struct cec_adapter *adap,
|
||||
if (abort)
|
||||
dst->rx_status |= CEC_RX_STATUS_FEATURE_ABORT;
|
||||
msg->flags = dst->flags;
|
||||
msg->sequence = dst->sequence;
|
||||
/* Remove it from the wait_queue */
|
||||
list_del_init(&data->list);
|
||||
|
||||
|
@ -241,6 +241,7 @@ static void *vb2_dma_sg_get_userptr(struct vb2_buffer *vb, struct device *dev,
|
||||
buf->offset = vaddr & ~PAGE_MASK;
|
||||
buf->size = size;
|
||||
buf->dma_sgt = &buf->sg_table;
|
||||
buf->vb = vb;
|
||||
vec = vb2_create_framevec(vaddr, size);
|
||||
if (IS_ERR(vec))
|
||||
goto userptr_fail_pfnvec;
|
||||
@ -642,6 +643,7 @@ static void *vb2_dma_sg_attach_dmabuf(struct vb2_buffer *vb, struct device *dev,
|
||||
buf->dma_dir = vb->vb2_queue->dma_dir;
|
||||
buf->size = size;
|
||||
buf->db_attach = dba;
|
||||
buf->vb = vb;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-device.h>
|
||||
@ -2176,7 +2176,7 @@ static struct i2c_driver hi846_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "hi846",
|
||||
.pm = &hi846_pm_ops,
|
||||
.of_match_table = of_match_ptr(hi846_of_match),
|
||||
.of_match_table = hi846_of_match,
|
||||
},
|
||||
.probe_new = hi846_probe,
|
||||
.remove = hi846_remove,
|
||||
|
@ -751,10 +751,6 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *p64,
|
||||
/*
|
||||
* x86 is the only compat architecture with different struct alignment
|
||||
* between 32-bit and 64-bit tasks.
|
||||
*
|
||||
* On all other architectures, v4l2_event32 and v4l2_event32_time32 are
|
||||
* the same as v4l2_event and v4l2_event_time32, so we can use the native
|
||||
* handlers, converting v4l2_event to v4l2_event_time32 if necessary.
|
||||
*/
|
||||
struct v4l2_event32 {
|
||||
__u32 type;
|
||||
@ -772,21 +768,6 @@ struct v4l2_event32 {
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
struct v4l2_event32_time32 {
|
||||
__u32 type;
|
||||
union {
|
||||
compat_s64 value64;
|
||||
__u8 data[64];
|
||||
} u;
|
||||
__u32 pending;
|
||||
__u32 sequence;
|
||||
struct old_timespec32 timestamp;
|
||||
__u32 id;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
#endif
|
||||
|
||||
static int put_v4l2_event32(struct v4l2_event *p64,
|
||||
struct v4l2_event32 __user *p32)
|
||||
{
|
||||
@ -802,7 +783,22 @@ static int put_v4l2_event32(struct v4l2_event *p64,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
struct v4l2_event32_time32 {
|
||||
__u32 type;
|
||||
union {
|
||||
compat_s64 value64;
|
||||
__u8 data[64];
|
||||
} u;
|
||||
__u32 pending;
|
||||
__u32 sequence;
|
||||
struct old_timespec32 timestamp;
|
||||
__u32 id;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
static int put_v4l2_event32_time32(struct v4l2_event *p64,
|
||||
struct v4l2_event32_time32 __user *p32)
|
||||
{
|
||||
@ -818,7 +814,6 @@ static int put_v4l2_event32_time32(struct v4l2_event *p64,
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct v4l2_edid32 {
|
||||
__u32 pad;
|
||||
@ -880,9 +875,7 @@ static int put_v4l2_edid32(struct v4l2_edid *p64,
|
||||
#define VIDIOC_QUERYBUF32_TIME32 _IOWR('V', 9, struct v4l2_buffer32_time32)
|
||||
#define VIDIOC_QBUF32_TIME32 _IOWR('V', 15, struct v4l2_buffer32_time32)
|
||||
#define VIDIOC_DQBUF32_TIME32 _IOWR('V', 17, struct v4l2_buffer32_time32)
|
||||
#ifdef CONFIG_X86_64
|
||||
#define VIDIOC_DQEVENT32_TIME32 _IOR ('V', 89, struct v4l2_event32_time32)
|
||||
#endif
|
||||
#define VIDIOC_PREPARE_BUF32_TIME32 _IOWR('V', 93, struct v4l2_buffer32_time32)
|
||||
#endif
|
||||
|
||||
@ -936,10 +929,10 @@ unsigned int v4l2_compat_translate_cmd(unsigned int cmd)
|
||||
#ifdef CONFIG_X86_64
|
||||
case VIDIOC_DQEVENT32:
|
||||
return VIDIOC_DQEVENT;
|
||||
#endif
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
case VIDIOC_DQEVENT32_TIME32:
|
||||
return VIDIOC_DQEVENT;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return cmd;
|
||||
@ -1032,10 +1025,10 @@ int v4l2_compat_put_user(void __user *arg, void *parg, unsigned int cmd)
|
||||
#ifdef CONFIG_X86_64
|
||||
case VIDIOC_DQEVENT32:
|
||||
return put_v4l2_event32(parg, arg);
|
||||
#endif
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
case VIDIOC_DQEVENT32_TIME32:
|
||||
return put_v4l2_event32_time32(parg, arg);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user