diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-29 09:10:30 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-11 19:37:47 +0300 |
commit | 0cd8726c26edd1df1d7aaf2c1b9a99cfa2f52c2a (patch) | |
tree | b6093dc0f295e6bfdcdf39c625308746c7cf2f1c /drivers/staging | |
parent | f90e73ce803c5b0444e347e4f667369de2a4b427 (diff) | |
download | linux-0cd8726c26edd1df1d7aaf2c1b9a99cfa2f52c2a.tar.xz |
media: atomisp: provide more details about the firmware binaries
In order to make easier to identify what a firmware file
contains, add more info at the firmware dump log facility.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 39 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/pci/ia_css_acc_types.h | 4 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/pci/sh_css_firmware.c | 2 |
3 files changed, 40 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c index 9028c7929196..d7cecc45224f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c @@ -4310,6 +4310,20 @@ int atomisp_css_dump_sp_raw_copy_linecount(bool reduced) return 0; } +static const char * const fw_type_name[] = { + [ia_css_sp_firmware] = "SP", + [ia_css_isp_firmware] = "ISP", + [ia_css_bootloader_firmware] = "BootLoader", + [ia_css_acc_firmware] = "accel", +}; + +static const char * const fw_acc_type_name[] = { + [IA_CSS_ACC_NONE] = "Normal", + [IA_CSS_ACC_OUTPUT] = "Accel stage on output", + [IA_CSS_ACC_VIEWFINDER] = "Accel stage on viewfinder", + [IA_CSS_ACC_STANDALONE] = "Stand-alone acceleration", +}; + int atomisp_css_dump_blob_infor(void) { struct ia_css_blob_descr *bd = sh_css_blob_info; @@ -4320,9 +4334,28 @@ int atomisp_css_dump_blob_infor(void) if (!bd) return -EPERM; - for (i = 1; i < sh_css_num_binaries; i++) - dev_dbg(atomisp_dev, "Num%d binary id is %d, name is %s\n", i, - bd[i - 1].header.info.isp.sp.id, bd[i - 1].name); + /* + * The sh_css_load_firmware function discard the initial + * "SPS" binaries + */ + for (i = 0; i < sh_css_num_binaries - NUM_OF_SPS; i++) { + switch (bd[i].header.type) { + case ia_css_isp_firmware: + dev_dbg(atomisp_dev, + "Num%2d type %s (%s), binary id is %2d, name is %s\n", + i + NUM_OF_SPS, + fw_type_name[bd[i].header.type], + fw_acc_type_name[bd[i].header.info.isp.type], + bd[i].header.info.isp.sp.id, + bd[i].name); + break; + default: + dev_dbg(atomisp_dev, + "Num%2d type %s, name is %s\n", + i + NUM_OF_SPS, fw_type_name[bd[i].header.type], + bd[i].name); + } + } return 0; } diff --git a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h index 55b4dc9bb5ea..557fe8a3c18f 100644 --- a/drivers/staging/media/atomisp/pci/ia_css_acc_types.h +++ b/drivers/staging/media/atomisp/pci/ia_css_acc_types.h @@ -62,8 +62,8 @@ enum ia_css_cell_type { */ enum ia_css_fw_type { ia_css_sp_firmware, /** Firmware for the SP */ - ia_css_isp_firmware, /** Firmware for the ISP */ - ia_css_bootloader_firmware, /** Firmware for the BootLoader */ + ia_css_isp_firmware, /** Firmware for the ISP */ + ia_css_bootloader_firmware, /** Firmware for the BootLoader */ ia_css_acc_firmware /** Firmware for accelrations */ }; diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/sh_css_firmware.c index 5009f47abf01..63415356c36d 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c @@ -282,6 +282,8 @@ sh_css_load_firmware(struct device *dev, const char *fw_data, err = setup_binary(bi, fw_data, &sh_css_sp_fw, i); if (err) return err; + dev_dbg(dev, "firmware #%d (SP), name %s\n", i, bd.name); + } else { /* All subsequent binaries (including bootloaders) (i>NUM_OF_SPS) are ISP firmware */ if (i < NUM_OF_SPS) |