Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|