mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
media fixes for v5.15-rc4
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmFRhf0ACgkQCF8+vY7k 4RW9OA//RsL7PeYfrhnmcZxEjmZfBQ30q0s4qSYR8c7uHnCkdx0WABZPv6/VLVle LpsDefmnrvDQPwf+LtZjDNANfoGrfQ0rcUVSgFMK7XsB/4zRFVRBYQUen5fVFT0i 0OQIkoFtKTDOx2bBuRcqV5GbQjEt/l9/cBShvCQE0ESsqSUTFyzZx4pktqnCPnU3 DS5IxhUhabLUNyC/4/75h8S+RCUCox6QU4+2u0Nl6s6vZiZ+b3KxCzxqRkJqEX6G mhXhm7w0orUtNo+OOj0MP+a8DTOhmVn5Ef7agYdfahvW8ht6Z0AixDzKQdP9aDXo arnUyz5hkgMK8nvcXNef8L6N7HdD2nhGtkAZIuazl/E17Zla3ZQz3dhPT7DGDiqD zKev7adlneNHrqc+hae8WuleerJyTjE5PNr1uNerpNakscRyJkt1JqXtUsXIGI4b ETUpMlqGhg5ZT8dXvvXKRUoep87p2+d/qi06bPlkc08VyoLjZ37ygfLU2ge256zG NIxRaiOLwcRMhqm0MrLUQ0hgrbtBCp1Es6/R4XpfdRCkj9CeAp/B6Nw3H1kpVnhm FuOhAqLI7Xps32HFazTMfqMvZdD1X4bzPbh12wCEY1VrzPD3TgZ0ucDh8U0ii2Z4 Ksl8EIPQXIPKRXslXApXVezGjjz4KRma+iwYGP2DxCsZLflymd4= =RvBs -----END PGP SIGNATURE----- Merge tag 'media/v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A couple of driver fixes: - hantro: Fix check for single irq - cedrus: Fix SUNXI tile size calculation - s5p-jpeg: rename JPEG marker constants to prevent build warnings - ir_toy: prevent device from hanging during transmit" * tag 'media/v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: ir_toy: prevent device from hanging during transmit media: s5p-jpeg: rename JPEG marker constants to prevent build warnings media: cedrus: Fix SUNXI tile size calculation media: hantro: Fix check for single irq
This commit is contained in:
commit
e6609f2c07
@ -1140,8 +1140,8 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
continue;
|
||||
length = 0;
|
||||
switch (c) {
|
||||
/* SOF0: baseline JPEG */
|
||||
case SOF0:
|
||||
/* JPEG_MARKER_SOF0: baseline JPEG */
|
||||
case JPEG_MARKER_SOF0:
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
@ -1172,7 +1172,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
notfound = 0;
|
||||
break;
|
||||
|
||||
case DQT:
|
||||
case JPEG_MARKER_DQT:
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
@ -1185,7 +1185,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
skip(&jpeg_buffer, length);
|
||||
break;
|
||||
|
||||
case DHT:
|
||||
case JPEG_MARKER_DHT:
|
||||
if (get_word_be(&jpeg_buffer, &word))
|
||||
break;
|
||||
length = (long)word - 2;
|
||||
@ -1198,15 +1198,15 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
skip(&jpeg_buffer, length);
|
||||
break;
|
||||
|
||||
case SOS:
|
||||
case JPEG_MARKER_SOS:
|
||||
sos = jpeg_buffer.curr - 2; /* 0xffda */
|
||||
break;
|
||||
|
||||
/* skip payload-less markers */
|
||||
case RST ... RST + 7:
|
||||
case SOI:
|
||||
case EOI:
|
||||
case TEM:
|
||||
case JPEG_MARKER_RST ... JPEG_MARKER_RST + 7:
|
||||
case JPEG_MARKER_SOI:
|
||||
case JPEG_MARKER_EOI:
|
||||
case JPEG_MARKER_TEM:
|
||||
break;
|
||||
|
||||
/* skip uninteresting payload markers */
|
||||
|
@ -37,15 +37,15 @@
|
||||
#define EXYNOS3250_IRQ_TIMEOUT 0x10000000
|
||||
|
||||
/* a selection of JPEG markers */
|
||||
#define TEM 0x01
|
||||
#define SOF0 0xc0
|
||||
#define DHT 0xc4
|
||||
#define RST 0xd0
|
||||
#define SOI 0xd8
|
||||
#define EOI 0xd9
|
||||
#define SOS 0xda
|
||||
#define DQT 0xdb
|
||||
#define DHP 0xde
|
||||
#define JPEG_MARKER_TEM 0x01
|
||||
#define JPEG_MARKER_SOF0 0xc0
|
||||
#define JPEG_MARKER_DHT 0xc4
|
||||
#define JPEG_MARKER_RST 0xd0
|
||||
#define JPEG_MARKER_SOI 0xd8
|
||||
#define JPEG_MARKER_EOI 0xd9
|
||||
#define JPEG_MARKER_SOS 0xda
|
||||
#define JPEG_MARKER_DQT 0xdb
|
||||
#define JPEG_MARKER_DHP 0xde
|
||||
|
||||
/* Flags that indicate a format can be used for capture/output */
|
||||
#define SJPEG_FMT_FLAG_ENC_CAPTURE (1 << 0)
|
||||
@ -187,11 +187,11 @@ struct s5p_jpeg_marker {
|
||||
* @fmt: driver-specific format of this queue
|
||||
* @w: image width
|
||||
* @h: image height
|
||||
* @sos: SOS marker's position relative to the buffer beginning
|
||||
* @dht: DHT markers' positions relative to the buffer beginning
|
||||
* @dqt: DQT markers' positions relative to the buffer beginning
|
||||
* @sof: SOF0 marker's position relative to the buffer beginning
|
||||
* @sof_len: SOF0 marker's payload length (without length field itself)
|
||||
* @sos: JPEG_MARKER_SOS's position relative to the buffer beginning
|
||||
* @dht: JPEG_MARKER_DHT' positions relative to the buffer beginning
|
||||
* @dqt: JPEG_MARKER_DQT' positions relative to the buffer beginning
|
||||
* @sof: JPEG_MARKER_SOF0's position relative to the buffer beginning
|
||||
* @sof_len: JPEG_MARKER_SOF0's payload length (without length field itself)
|
||||
* @size: image buffer size in bytes
|
||||
*/
|
||||
struct s5p_jpeg_q_data {
|
||||
|
@ -24,6 +24,7 @@ static const u8 COMMAND_VERSION[] = { 'v' };
|
||||
// End transmit and repeat reset command so we exit sump mode
|
||||
static const u8 COMMAND_RESET[] = { 0xff, 0xff, 0, 0, 0, 0, 0 };
|
||||
static const u8 COMMAND_SMODE_ENTER[] = { 's' };
|
||||
static const u8 COMMAND_SMODE_EXIT[] = { 0 };
|
||||
static const u8 COMMAND_TXSTART[] = { 0x26, 0x24, 0x25, 0x03 };
|
||||
|
||||
#define REPLY_XMITCOUNT 't'
|
||||
@ -309,12 +310,30 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
|
||||
buf[i] = cpu_to_be16(v);
|
||||
}
|
||||
|
||||
buf[count] = cpu_to_be16(0xffff);
|
||||
buf[count] = 0xffff;
|
||||
|
||||
irtoy->tx_buf = buf;
|
||||
irtoy->tx_len = size;
|
||||
irtoy->emitted = 0;
|
||||
|
||||
// There is an issue where if the unit is receiving IR while the
|
||||
// first TXSTART command is sent, the device might end up hanging
|
||||
// with its led on. It does not respond to any command when this
|
||||
// happens. To work around this, re-enter sample mode.
|
||||
err = irtoy_command(irtoy, COMMAND_SMODE_EXIT,
|
||||
sizeof(COMMAND_SMODE_EXIT), STATE_RESET);
|
||||
if (err) {
|
||||
dev_err(irtoy->dev, "exit sample mode: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = irtoy_command(irtoy, COMMAND_SMODE_ENTER,
|
||||
sizeof(COMMAND_SMODE_ENTER), STATE_COMMAND);
|
||||
if (err) {
|
||||
dev_err(irtoy->dev, "enter sample mode: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = irtoy_command(irtoy, COMMAND_TXSTART, sizeof(COMMAND_TXSTART),
|
||||
STATE_TX);
|
||||
kfree(buf);
|
||||
|
@ -919,7 +919,7 @@ static int hantro_probe(struct platform_device *pdev)
|
||||
if (!vpu->variant->irqs[i].handler)
|
||||
continue;
|
||||
|
||||
if (vpu->variant->num_clocks > 1) {
|
||||
if (vpu->variant->num_irqs > 1) {
|
||||
irq_name = vpu->variant->irqs[i].name;
|
||||
irq = platform_get_irq_byname(vpu->pdev, irq_name);
|
||||
} else {
|
||||
|
@ -135,7 +135,7 @@ void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt)
|
||||
sizeimage = bytesperline * height;
|
||||
|
||||
/* Chroma plane size. */
|
||||
sizeimage += bytesperline * height / 2;
|
||||
sizeimage += bytesperline * ALIGN(height, 64) / 2;
|
||||
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user