Skip to content

Commit 63de936

Browse files
jwrdegoedeHans Verkuil
authored andcommitted
media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices
Commit a0821ca ("media: atomisp: Remove test pattern generator (TPG) support") broke BYT support because it removed a seemingly unused field from struct sh_css_sp_config and a seemingly unused value from enum ia_css_input_mode. But these are part of the ABI between the kernel and firmware on ISP2400 and this part of the TPG support removal changes broke ISP2400 support. ISP2401 support was not affected because on ISP2401 only a part of struct sh_css_sp_config is used. Restore the removed field and enum value to fix this. Fixes: a0821ca ("media: atomisp: Remove test pattern generator (TPG) support") Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 0c84bde commit 63de936

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

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)