mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 13:23:35 -04:00
media: atomisp: print css_version in runtime
The CSS version returned by ISP2400 is different than the one returned by ISP2401. While we could return just one version for both, as this sounds like just an informative string, for now, let's keep returning different versions, as we don't know if this would affect userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
@@ -21,10 +21,7 @@
|
||||
#ifndef __IA_CSS_VERSION_DATA_H
|
||||
#define __IA_CSS_VERSION_DATA_H
|
||||
|
||||
#ifndef ISP2401
|
||||
#define CSS_VERSION_STRING "REL:20150521_21.4_0539; API:2.1.15.3; GIT:irci_candrpv_0415_20150504_35b345#35b345be52ac575f8934abb3a88fea26a94e7343; SDK:/nfs/iir/disks/iir_hivepackages_003/iir_hivepkgs_disk017/Css_Mizuchi/packages/Css_Mizuchi/int_css_mizuchi_20140829_1053; USER:viedifw; "
|
||||
#else
|
||||
#define CSS_VERSION_STRING "REL:20150911_37.5_1652; API:2.1.20.9; GIT:irci___#ebf437d53a8951bb7ff6d13fdb7270dab393a92a; SDK:; USER:viedifw; "
|
||||
#endif
|
||||
#define ISP2400_CSS_VERSION_STRING "REL:20150521_21.4_0539; API:2.1.15.3; GIT:irci_candrpv_0415_20150504_35b345#35b345be52ac575f8934abb3a88fea26a94e7343; SDK:/nfs/iir/disks/iir_hivepackages_003/iir_hivepkgs_disk017/Css_Mizuchi/packages/Css_Mizuchi/int_css_mizuchi_20140829_1053; USER:viedifw; "
|
||||
#define ISP2401_CSS_VERSION_STRING "REL:20150911_37.5_1652; API:2.1.20.9; GIT:irci___#ebf437d53a8951bb7ff6d13fdb7270dab393a92a; SDK:; USER:viedifw; "
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include "../../include/linux/atomisp.h"
|
||||
#include "ia_css_version.h"
|
||||
#include "ia_css_version_data.h"
|
||||
#include "ia_css_err.h"
|
||||
@@ -19,9 +20,16 @@
|
||||
|
||||
enum ia_css_err
|
||||
ia_css_get_version(char *version, int max_size) {
|
||||
if (max_size <= (int)strlen(CSS_VERSION_STRING) + (int)strlen(sh_css_get_fw_version()) + 5)
|
||||
char *css_version;
|
||||
|
||||
if (!atomisp_hw_is_isp2401)
|
||||
css_version = ISP2400_CSS_VERSION_STRING;
|
||||
else
|
||||
css_version = ISP2401_CSS_VERSION_STRING;
|
||||
|
||||
if (max_size <= (int)strlen(css_version) + (int)strlen(sh_css_get_fw_version()) + 5)
|
||||
return IA_CSS_ERR_INVALID_ARGUMENTS;
|
||||
strcpy(version, CSS_VERSION_STRING);
|
||||
strcpy(version, css_version);
|
||||
strcat(version, "FW:");
|
||||
strcat(version, sh_css_get_fw_version());
|
||||
strcat(version, "; ");
|
||||
|
||||
Reference in New Issue
Block a user