media fixes for v5.11-rc6
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmASjOAACgkQCF8+vY7k 4RULWBAAhW4Pf4IrLqb6VLWs7IALGmcslBmMK0OVa/vyZNXPOOF8HYgl4ls6O62j qS0Wbwkp50M9d62fEOmvhsflYgdm6Eofpku0BM+pZKqqG7caI38C4xZyBkUcW11s c/Y/8CpOpYVfjZ/NMmfhgBAiCG+7ByZQB9FWGhpNkpxaQwfLnJD/+8jDl7CBLCv2 +p1ydBhTE7PmqnNYWKK167Y54BkHQ/PsSnwv+y9sM62qFGG+qh8xucc1ZU9ubZNf IJi0Zo8fPoxiOZXMKvnDzA+miUeYLYdbSXUPtYrsDqtSzvvdbJ0wXxDUjIGnIvg0 8J7M8RpeZIjoVHua0kbZtJlQnDpX23I4EcE9YFa3JAkKUxMA1brBf2k7UdnO0+2G VL1Xp2iw9C43lBy2qm0V7mJeG0tMXOrJu6xVkXlRY4NdOx2WceHACVNtGhNRGjjm 4t5FM1locj8f1e2B7f0Q2fYUI6b4jfFmI+cPzPhKB/78ons97EAcfVcKveaSuRrc uB47xFxTIhyI/djtQ2/wGfJe2jvclpZ6gN/mNXqyjdvo6Gqsc7zJt8rBpTezVFA5 u3oP0TUIa7D0MzlJWuHYMCJ6tH7ToKbr0IXBJ6Kl5u116QCWNOm/PC5+hTEEl9eX wXl4tLVKF+odEvkdN6lS/AU9zoT0fAvLg9LKP5rWBrY7rhuxmYk= =i9ft -----END PGP SIGNATURE----- Merge tag 'media/v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a V4L2 core regression at videobuf2 when checking for single-plane dmabuf - a change at uAPI header v4l2-subdev.h, fixing a breakage as BIT() macro is not available in userspace - fix some regressions at RC core due to the usage of microseconds everywhere on it - a fix for a race condition at RC core - a rename on a newly-introduced kAPI symbol (v4l2_get_link_rate), currently used only by a single driver - Regression fixes for rcar-vin, cedrus, ite-cir, hantro, css, venus, and cec drivers. * tag 'media/v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: hantro: Fix reset_raw_fmt initialization media: cec: add stm32 driver media: cedrus: Fix H264 decoding media: v4l2-subdev.h: BIT() is not available in userspace media: Revert "media: videobuf2: Fix length check for single plane dmabuf queueing" media: rc: ite-cir: fix min_timeout calculation media: venus: core: Fix platform driver shutdown media: rc: fix timeout handling after switch to microsecond durations media: v4l: common: Fix naming of v4l2_get_link_rate media: rcar-vin: fix return, use ret instead of zero media: ccs: Get static data version minor correctly media: ccs-pll: Fix link frequency for C-PHY media: rc: ensure that uevent can be read directly after rc device register
This commit is contained in:
commit
fc856f1df7
@ -10,5 +10,6 @@ obj-$(CONFIG_CEC_MESON_AO) += meson/
|
||||
obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p/
|
||||
obj-$(CONFIG_CEC_SECO) += seco/
|
||||
obj-$(CONFIG_CEC_STI) += sti/
|
||||
obj-$(CONFIG_CEC_STM32) += stm32/
|
||||
obj-$(CONFIG_CEC_TEGRA) += tegra/
|
||||
|
||||
|
@ -118,8 +118,7 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
length = (b->memory == VB2_MEMORY_USERPTR ||
|
||||
b->memory == VB2_MEMORY_DMABUF)
|
||||
length = (b->memory == VB2_MEMORY_USERPTR)
|
||||
? b->length : vb->planes[0].length;
|
||||
|
||||
if (b->bytesused > length)
|
||||
|
@ -772,14 +772,8 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim,
|
||||
|
||||
switch (pll->bus_type) {
|
||||
case CCS_PLL_BUS_TYPE_CSI2_DPHY:
|
||||
/* CSI transfers 2 bits per clock per lane; thus times 2 */
|
||||
op_sys_clk_freq_hz_sdr = pll->link_freq * 2
|
||||
* (pll->flags & CCS_PLL_FLAG_LANE_SPEED_MODEL ?
|
||||
1 : pll->csi2.lanes);
|
||||
break;
|
||||
case CCS_PLL_BUS_TYPE_CSI2_CPHY:
|
||||
op_sys_clk_freq_hz_sdr =
|
||||
pll->link_freq
|
||||
op_sys_clk_freq_hz_sdr = pll->link_freq * 2
|
||||
* (pll->flags & CCS_PLL_FLAG_LANE_SPEED_MODEL ?
|
||||
1 : pll->csi2.lanes);
|
||||
break;
|
||||
|
@ -152,7 +152,7 @@ static int ccs_data_parse_version(struct bin_container *bin,
|
||||
vv->version_major = ((u16)v->static_data_version_major[0] << 8) +
|
||||
v->static_data_version_major[1];
|
||||
vv->version_minor = ((u16)v->static_data_version_minor[0] << 8) +
|
||||
v->static_data_version_major[1];
|
||||
v->static_data_version_minor[1];
|
||||
vv->date_year = ((u16)v->year[0] << 8) + v->year[1];
|
||||
vv->date_month = v->month;
|
||||
vv->date_day = v->day;
|
||||
|
@ -302,7 +302,7 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, struct cio2_queue *q,
|
||||
if (!q->sensor)
|
||||
return -ENODEV;
|
||||
|
||||
freq = v4l2_get_link_rate(q->sensor->ctrl_handler, bpp, lanes);
|
||||
freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes);
|
||||
if (freq < 0) {
|
||||
dev_err(dev, "error %lld, invalid link_freq\n", freq);
|
||||
return freq;
|
||||
|
@ -349,8 +349,10 @@ static void venus_core_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct venus_core *core = platform_get_drvdata(pdev);
|
||||
|
||||
pm_runtime_get_sync(core->dev);
|
||||
venus_shutdown(core);
|
||||
venus_firmware_deinit(core);
|
||||
pm_runtime_put_sync(core->dev);
|
||||
}
|
||||
|
||||
static __maybe_unused int venus_runtime_suspend(struct device *dev)
|
||||
|
@ -654,7 +654,7 @@ static int rvin_parallel_parse_of(struct rvin_dev *vin)
|
||||
out:
|
||||
fwnode_handle_put(fwnode);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rvin_parallel_init(struct rvin_dev *vin)
|
||||
|
@ -320,7 +320,7 @@ again:
|
||||
data->body);
|
||||
spin_lock(&data->keylock);
|
||||
if (scancode) {
|
||||
delay = nsecs_to_jiffies(dev->timeout) +
|
||||
delay = usecs_to_jiffies(dev->timeout) +
|
||||
msecs_to_jiffies(100);
|
||||
mod_timer(&data->rx_timeout, jiffies + delay);
|
||||
} else {
|
||||
|
@ -1551,7 +1551,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
|
||||
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
|
||||
/* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */
|
||||
rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR *
|
||||
itdev->params.sample_period;
|
||||
itdev->params.sample_period / 1000;
|
||||
rdev->timeout = IR_DEFAULT_TIMEOUT;
|
||||
rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
|
||||
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
|
||||
|
@ -737,7 +737,7 @@ static unsigned int repeat_period(int protocol)
|
||||
void rc_repeat(struct rc_dev *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int timeout = nsecs_to_jiffies(dev->timeout) +
|
||||
unsigned int timeout = usecs_to_jiffies(dev->timeout) +
|
||||
msecs_to_jiffies(repeat_period(dev->last_protocol));
|
||||
struct lirc_scancode sc = {
|
||||
.scancode = dev->last_scancode, .rc_proto = dev->last_protocol,
|
||||
@ -855,7 +855,7 @@ void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u64 scancode,
|
||||
ir_do_keydown(dev, protocol, scancode, keycode, toggle);
|
||||
|
||||
if (dev->keypressed) {
|
||||
dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) +
|
||||
dev->keyup_jiffies = jiffies + usecs_to_jiffies(dev->timeout) +
|
||||
msecs_to_jiffies(repeat_period(protocol));
|
||||
mod_timer(&dev->timer_keyup, dev->keyup_jiffies);
|
||||
}
|
||||
@ -1928,6 +1928,8 @@ int rc_register_device(struct rc_dev *dev)
|
||||
goto out_raw;
|
||||
}
|
||||
|
||||
dev->registered = true;
|
||||
|
||||
rc = device_add(&dev->dev);
|
||||
if (rc)
|
||||
goto out_rx_free;
|
||||
@ -1937,8 +1939,6 @@ int rc_register_device(struct rc_dev *dev)
|
||||
dev->device_name ?: "Unspecified device", path ?: "N/A");
|
||||
kfree(path);
|
||||
|
||||
dev->registered = true;
|
||||
|
||||
/*
|
||||
* once the the input device is registered in rc_setup_rx_device,
|
||||
* userspace can open the input device and rc_open() will be called
|
||||
|
@ -385,7 +385,7 @@ static irqreturn_t serial_ir_irq_handler(int i, void *blah)
|
||||
} while (!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */
|
||||
|
||||
mod_timer(&serial_ir.timeout_timer,
|
||||
jiffies + nsecs_to_jiffies(serial_ir.rcdev->timeout));
|
||||
jiffies + usecs_to_jiffies(serial_ir.rcdev->timeout));
|
||||
|
||||
ir_raw_event_handle(serial_ir.rcdev);
|
||||
|
||||
|
@ -442,7 +442,7 @@ int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt);
|
||||
|
||||
s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul,
|
||||
s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
|
||||
unsigned int div)
|
||||
{
|
||||
struct v4l2_ctrl *ctrl;
|
||||
@ -473,4 +473,4 @@ s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul,
|
||||
|
||||
return freq > 0 ? freq : -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_get_link_rate);
|
||||
EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
|
||||
|
@ -367,7 +367,7 @@ hantro_reset_raw_fmt(struct hantro_ctx *ctx)
|
||||
|
||||
hantro_reset_fmt(raw_fmt, raw_vpu_fmt);
|
||||
raw_fmt->width = encoded_fmt->width;
|
||||
raw_fmt->width = encoded_fmt->width;
|
||||
raw_fmt->height = encoded_fmt->height;
|
||||
if (ctx->is_encoder)
|
||||
hantro_set_fmt_out(ctx, raw_fmt);
|
||||
else
|
||||
|
@ -203,7 +203,7 @@ static void _cedrus_write_ref_list(struct cedrus_ctx *ctx,
|
||||
position = cedrus_buf->codec.h264.position;
|
||||
|
||||
sram_array[i] |= position << 1;
|
||||
if (ref_list[i].fields & V4L2_H264_BOTTOM_FIELD_REF)
|
||||
if (ref_list[i].fields == V4L2_H264_BOTTOM_FIELD_REF)
|
||||
sram_array[i] |= BIT(0);
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
|
||||
u32 width, u32 height);
|
||||
|
||||
/**
|
||||
* v4l2_get_link_rate - Get link rate from transmitter
|
||||
* v4l2_get_link_freq - Get link rate from transmitter
|
||||
*
|
||||
* @handler: The transmitter's control handler
|
||||
* @mul: The multiplier between pixel rate and link frequency. Bits per pixel on
|
||||
@ -537,7 +537,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
|
||||
* -ENOENT: Link frequency or pixel rate control not found
|
||||
* -EINVAL: Invalid link frequency value
|
||||
*/
|
||||
s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul,
|
||||
s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
|
||||
unsigned int div);
|
||||
|
||||
static inline u64 v4l2_buffer_get_timestamp(const struct v4l2_buffer *buf)
|
||||
|
@ -176,7 +176,7 @@ struct v4l2_subdev_capability {
|
||||
};
|
||||
|
||||
/* The v4l2 sub-device video device node is registered in read-only mode. */
|
||||
#define V4L2_SUBDEV_CAP_RO_SUBDEV BIT(0)
|
||||
#define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
|
||||
|
||||
/* Backwards compatibility define --- to be removed */
|
||||
#define v4l2_subdev_edid v4l2_edid
|
||||
|
Loading…
Reference in New Issue
Block a user