History log of /linux-master/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
Revision Date Author Comments
# f55254c9 23-Sep-2023 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: atomisp: ia_ccs_debug.c: increase enable_info buffer

Fixes these compiler warnings:

drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function 'ia_css_debug_pipe_graph_dump_stage':
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2786:66: warning: '\n' directive output may be truncated writing 2 bytes into a region of size between 0 and 198 [-Wformat-truncation=]
2786 | "%s\\n%s\\n%s",
| ^~~
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2785:49: note: 'snprintf' output between 5 and 302 bytes into a destination of size 200
2785 | snprintf(enable_info, sizeof(enable_info),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2786 | "%s\\n%s\\n%s",
| ~~~~~~~~~~~~~~~
2787 | enable_info1, enable_info2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
2788 | enable_info3);
| ~~~~~~~~~~~~~
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2772:66: warning: '\n' directive output may be truncated writing 2 bytes into a region of size between 0 and 198 [-Wformat-truncation=]
2772 | "%s\\n%s\\n%s",
| ^~~
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2771:49: note: 'snprintf' output between 5 and 302 bytes into a destination of size 200
2771 | snprintf(enable_info, sizeof(enable_info),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2772 | "%s\\n%s\\n%s",
| ~~~~~~~~~~~~~~~
2773 | enable_info1, enable_info2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
2774 | enable_info3);
| ~~~~~~~~~~~~~
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2749:92: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
2749 | snprintf(enable_info, sizeof(enable_info), "%s\\n%s",
| ^
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2749:41: note: 'snprintf' output between 3 and 201 bytes into a destination of size 200
2749 | snprintf(enable_info, sizeof(enable_info), "%s\\n%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2750 | enable_info1, enable_info2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# 00c40877 12-Aug-2023 Hans de Goede <hdegoede@redhat.com>

media: atomisp: Drop ia_css_debug_dump_debug_info() and functions only used by it

ia_css_debug_dump_debug_info() is defined but never called anywhere,
drop it.

Also drop all the other ia_css_debug_dump_* functions only called by
ia_css_debug_dump_debug_info(), as well as *_get_state() functions only
used by those.

Link: https://lore.kernel.org/r/20230812133523.355581-1-hdegoede@redhat.com

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# b0e59612 12-Jul-2023 Kate Hsuan <hpa@redhat.com>

media: atomisp: ia_css_debug: Removed debug codes for dumping status

This portion of debug code was based on a structure for both ISP2400 and
2401 with the same name and controlled by #if defined(ISP2401). This
structure was only used to dump the status of atomisp. So, to make the
driver generic, this part of debug codes can be removed.

Link: https://lore.kernel.org/r/20230713100231.308923-2-hpa@redhat.com

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 55c3407c 18-Jun-2023 Kate Hsuan <hpa@redhat.com>

media: atomisp: Removed unused HAS_WATCHDOG_SP_THREAD_DEBUG debug

Since the debug codes around #ifdef HAS_WATCHDOG_SP_THREAD_DEBUG are
no longer used, the debug implementation of this can be removed.

Link: https://lore.kernel.org/r/20230619052453.48598-3-hpa@redhat.com

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# b55ce3e6 18-Jun-2023 Kate Hsuan <hpa@redhat.com>

media: atomisp: ia_css_debug: Removed unused codes for debug

This portion of the codes was not referenced so it can be completely
removed.

Link: https://lore.kernel.org/r/20230619052453.48598-2-hpa@redhat.com

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 544b6bec 20-Oct-2022 Hans de Goede <hdegoede@redhat.com>

media: atomisp: Remove accelerator pipe creation code

The ATOMISP_ACC_* custom ioctls and the ACC device node have been removed
in commit a5c17adbadcb ("media: atomisp: Remove the ACC device node").

This means that pipe_configs[pipe_id].acc_extension now never gets set
which causes atomisp_compat_css20.c: __create_pipe() to always skip
creation of pipes with a pipe_id of IA_CSS_PIPE_ID_ACC / a mode of
IA_CSS_PIPE_MODE_ACC.

This allows removing of the acc_pipe creation / handling code
from mainly sh_css.c and a bunch of other places.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 9a29f5fc 14-Oct-2022 Hans de Goede <hdegoede@redhat.com>

media: atomisp: Add ia_css_frame_get_info() helper

Several places rely on the [frame_]info member being the first member of
struct ia_css_frame, so that &frame->info will yield NULL when frame is
NULL (some places already explicitly check for a NULL frame pointer but
not nearly all).

For videobuf2 support the vb2_v4l2_buffer struct needs to be embedded
in the frame struct and it needs to be the first member. Breaking the
assumption that &frame->info will yield NULL when frame is NULL.

Add a ia_css_frame_get_info() helper to return either the ia_css_frame_info
struct embedded in the frame, or NULL when the frame pointer is NULL and
use this in places where a ia_css_frame_info ptr or NULL is expected.

To make sure that we catch all uses of the info field this patch also
renames the info field to frame_info.

This is a preparation patch for converting the driver to videobuf2.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# f94059f8 15-Jun-2022 Hans de Goede <hdegoede@redhat.com>

media: atomisp: drop contiguous flag from struct ia_css_frame

Drop the contiguous flag from struct ia_css_frame, it is always false /
not used.

Link: https://lore.kernel.org/linux-media/20220615205037.16549-8-hdegoede@redhat.com
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 83946783 15-Nov-2021 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: simplify sh_css_defs.h

There are several unused macros. Simplify the logic there, making
it closer to the Intel Aero driver and the corresponding firmware,
as this is what we have widely available for this device.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 01cc2ec6 23-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: cleanup __printf() atributes on printk messages

There are still some warnings produced by -Wsuggest-attribute=format,
like this one:

drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function ‘dtrace_dot’:
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2466:2: warning: function ‘dtrace_dot’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
2466 | ia_css_debug_vdtrace(IA_CSS_DEBUG_INFO, fmt, ap);
| ^~~~~~~~~~~~~~~~~~~~

Also, on some places, is is using __atribute, while on others it
is using the __printf() macro.

Uniform those to always use the __printf() macro, placing it
before the function, and fix the logic in order to cleanup
all such warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# c5ea3e43 02-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: fix some bad indents

As smatch reports, there are several bad indents:

drivers/staging/media/atomisp/pci/hmm/hmm.c:271 hmm_alloc() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/runtime/bufq/src/bufq.c:390 ia_css_bufq_enqueue_psys_event() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2132 ia_css_debug_dump_isys_state() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:246 sh_css_binary_get_sc_requirements() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:565 ia_css_binary_get_shading_info_type_1() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/sh_css.c:5109 sh_css_pipes_stop() warn: inconsistent indenting
drivers/staging/media/atomisp/pci/sh_css.c:8791 ia_css_pipe_create() warn: inconsistent indenting

Some of them are due to ifdefs. Get rid of them by either getting
a common code that would work for both ISP2400 and ISP2401 or
by creating separate functions, one for each ISP version.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# bd674b5a 20-Jul-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: cleanup ifdefs from ia_css_debug.c

There are lots of code dependency there. Get rid of most of
them.

We can't remove everything, as there are some structs that
are conditionally built if ISP2401. So, keep ifdefs only
on such cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 929e2a61 20-Jul-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of some unused code

Now that the defines which are common for both ISP2400 and ISP2401
are at system_global.h, we can get rid of the code not used by
those versions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 662fb4fc 03-Jun-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of a string_support.h abstraction layer

Some parts of the driver have their own implementation of
memcpy() & friends. Replace all of them by strscpy().

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 469a7306 01-Jun-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: change the detection of ISP2401 at runtime

Instead of having a static var to detect it, let's use the
already-existing arch-specific bytes, as this is how other
parts of the code also checks when it needs to do something
different, depending on an specific chipset version.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 0a4b8c45 31-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: simplify IRQ ifdef logic

There are lots of mess with IRQ ifdef settings. As the
*_global.h will already detect the type of IRQ system at
compile time, we can get rid of them, replacing by just
one ifdef for ISP2401.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 90240017 30-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: do some cleanup at irq_local.h

- Get rid of typedefs;
- Get rid of a duplicated enum type with different names for
ISP2400 and ISP2401;
- adjust indentation on the touched code.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# f5fbb83f 29-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: add SPDX headers

This driver is licensed under GPL 2.0, as stated inside their
headers.

Add the proper tag there. We should probably latter cleanup
the reduntant licensing text, but this could be done later,
after we get rid of other abstraction layers.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 08fef4fa 26-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of memory_access.c

Now that we have everything in place, we can get rid of the
memory_access abstraction layer.

Now, everything related to heterogeneous memory management
(hmm) is under hmm.c & related pools.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 100e8989 26-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: change the type returned by mmgr alloc

The mmgr alloc code returns a different type than hmm, due to
some abstraction layer.

Change the driver to use just one type to represent the
hmm memory.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 86df6ff2 25-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: reduce abstraction at ia_css_memory_access

Yet another memory abstraction layer. Getting rid of this
may be a little trickier, but let's reduce it to a minimal.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# f6117977 24-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: drop a cast for a const argument

Some arguments for tnf and ref settings are meant to be const, but
they're defined without such annotation. Due to that, there's an
ugly cast at sh_css_sp.c.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# bdfdd9e7 23-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: make it use dbg_level to control debug level

This driver has 3 different types of debug messages:

- dev_dbg()
- dbg_level
- ia_css_debug_trace_level

Which is crazy. Ideally, it shold just use dev_dbg()
everywhere, but for now let's unify the last two machanisms.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 983e5aca 12-May-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of spmem_dump.c

Those files seem to be firmware-dependent, probably being used
by some debug interface.

Well, their contents are not really used by atomisp, so let's
just send them to the trash can, as it shouldn't have any
usage upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 3c0538fb 30-Apr-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of most checks for ISP2401 version

There are lots of places inside this driver checking for
ISP2400/ISP2401 verison. Get rid of most of those, while
keep building for both.

Most of stuff in this patch is trivial to solve.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 8d4af310 29-Apr-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: get rid of some broken code

Probably due to some version conflicts while the atomisp code
were generated, some things don't build for ISP2401. So, use
the ISP2400 variant when available, or get rid of the
code that doesn't build.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 9d4fa1a1 30-Apr-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: atomisp: cleanup directory hierarchy

This driver has very long directories without a good
reason (IMHO). Let's drop two directories from such hierarchy,
in order to simplify things a little bit and make the dir
output a bit more readable.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>