media: atomisp: sh_css_internal: sh_css_params: Unifying sh_css_sp_group data structure
authorKate Hsuan <hpa@redhat.com>
Mon, 19 Jun 2023 05:24:53 +0000 (07:24 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 27 Sep 2023 07:40:02 +0000 (09:40 +0200)
commit921f9a1945e4f0109552d5526013a5b88ea7ce5f
treefd501a7bf0c2a9f384e26f81dbec3476ef9bead6
parent55c3407c63fbdfef0a5632ac6d09e2e76334fef2
media: atomisp: sh_css_internal: sh_css_params: Unifying sh_css_sp_group data structure

Since some parts of the data structure elements are determined in compile
time, the configuration data structure should be compiled for both two
ISP models. In order to set the configuration for both ISP models in
runtime, The sh_css_sp_group is unified to one data structure for the
configuration to ensure the data structure can be used for both ISP2400
and 2401 in runtime. Also, the unused codes for debug purpose are removed.

Form the aspect of ISP setting, the length and the content of the
configuration structure for ISP2400 and ISP2401 are different. So, we
need to pick up the necessary part of sp_group configuration for both
models and then copy those parts into a temporary buffer. This buffer
is finally written to the ISP with the corresponding length.

Link: https://lore.kernel.org/r/20230619052453.48598-4-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>
drivers/staging/media/atomisp/pci/sh_css_internal.h
drivers/staging/media/atomisp/pci/sh_css_params.c