Skip to content

Commit 20573d8

Browse files
committed
Merge tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: "Two regression fixes: - fix atomisp support for ISP2400 - fix dvb-usb regression for TeVii s480 dual DVB-S2 S660 board" * tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()"
2 parents 6e80a1f + 63de936 commit 20573d8

File tree

3 files changed

+26
-36
lines changed

3 files changed

+26
-36
lines changed

drivers/media/usb/dvb-usb/dvb-usb-init.c

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,11 @@ static int dvb_usb_force_pid_filter_usage;
2323
module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage, int, 0444);
2424
MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID filter, if any (default: 0).");
2525

26-
static int dvb_usb_check_bulk_endpoint(struct dvb_usb_device *d, u8 endpoint)
27-
{
28-
if (endpoint) {
29-
int ret;
30-
31-
ret = usb_pipe_type_check(d->udev, usb_sndbulkpipe(d->udev, endpoint));
32-
if (ret)
33-
return ret;
34-
ret = usb_pipe_type_check(d->udev, usb_rcvbulkpipe(d->udev, endpoint));
35-
if (ret)
36-
return ret;
37-
}
38-
return 0;
39-
}
40-
41-
static void dvb_usb_clear_halt(struct dvb_usb_device *d, u8 endpoint)
42-
{
43-
if (endpoint) {
44-
usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, endpoint));
45-
usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, endpoint));
46-
}
47-
}
48-
4926
static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
5027
{
5128
struct dvb_usb_adapter *adap;
5229
int ret, n, o;
5330

54-
ret = dvb_usb_check_bulk_endpoint(d, d->props.generic_bulk_ctrl_endpoint);
55-
if (ret)
56-
return ret;
57-
ret = dvb_usb_check_bulk_endpoint(d, d->props.generic_bulk_ctrl_endpoint_response);
58-
if (ret)
59-
return ret;
6031
for (n = 0; n < d->props.num_adapters; n++) {
6132
adap = &d->adapter[n];
6233
adap->dev = d;
@@ -132,8 +103,10 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
132103
* when reloading the driver w/o replugging the device
133104
* sometimes a timeout occurs, this helps
134105
*/
135-
dvb_usb_clear_halt(d, d->props.generic_bulk_ctrl_endpoint);
136-
dvb_usb_clear_halt(d, d->props.generic_bulk_ctrl_endpoint_response);
106+
if (d->props.generic_bulk_ctrl_endpoint != 0) {
107+
usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint));
108+
usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint));
109+
}
137110

138111
return 0;
139112

drivers/staging/media/atomisp/pci/ia_css_stream_public.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@
2727
#include "ia_css_prbs.h"
2828
#include "ia_css_input_port.h"
2929

30-
/* Input modes, these enumerate all supported input modes.
31-
* Note that not all ISP modes support all input modes.
30+
/*
31+
* Input modes, these enumerate all supported input modes.
32+
* This enum is part of the atomisp firmware ABI and must
33+
* NOT be changed!
34+
* Note that not all ISP modes support all input modes.
3235
*/
3336
enum ia_css_input_mode {
3437
IA_CSS_INPUT_MODE_SENSOR, /** data from sensor */
3538
IA_CSS_INPUT_MODE_FIFO, /** data from input-fifo */
39+
IA_CSS_INPUT_MODE_TPG, /** data from test-pattern generator */
3640
IA_CSS_INPUT_MODE_PRBS, /** data from pseudo-random bit stream */
3741
IA_CSS_INPUT_MODE_MEMORY, /** data from a frame in memory */
3842
IA_CSS_INPUT_MODE_BUFFERED_SENSOR /** data is sent through mipi buffer */

drivers/staging/media/atomisp/pci/sh_css_internal.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,14 @@ struct sh_css_sp_input_formatter_set {
344344

345345
#define IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT (3)
346346

347-
/* SP configuration information */
347+
/*
348+
* SP configuration information
349+
*
350+
* This struct is part of the atomisp firmware ABI and is directly copied
351+
* to ISP DRAM by sh_css_store_sp_group_to_ddr()
352+
*
353+
* Do NOT change this struct's layout or remove seemingly unused fields!
354+
*/
348355
struct sh_css_sp_config {
349356
u8 no_isp_sync; /* Signal host immediately after start */
350357
u8 enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */
@@ -354,6 +361,10 @@ struct sh_css_sp_config {
354361
host (true) or when they are passed to the preview/video pipe
355362
(false). */
356363

364+
/*
365+
* Note the fields below are only used on the ISP2400 not on the ISP2401,
366+
* sh_css_store_sp_group_to_ddr() skip copying these when run on the ISP2401.
367+
*/
357368
struct {
358369
u8 a_changed;
359370
u8 b_changed;
@@ -363,11 +374,13 @@ struct sh_css_sp_config {
363374
} input_formatter;
364375

365376
sync_generator_cfg_t sync_gen;
377+
tpg_cfg_t tpg;
366378
prbs_cfg_t prbs;
367379
input_system_cfg_t input_circuit;
368380
u8 input_circuit_cfg_changed;
369-
u32 mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
370-
u8 enable_isys_event_queue;
381+
u32 mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
382+
/* These last 2 fields are used on both the ISP2400 and the ISP2401 */
383+
u8 enable_isys_event_queue;
371384
u8 disable_cont_vf;
372385
};
373386

0 commit comments

Comments
 (0)