Commit fe670b2a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 1e972929
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
#ifndef __IA_CSS_VERSION_DATA_H #ifndef __IA_CSS_VERSION_DATA_H
#define __IA_CSS_VERSION_DATA_H #define __IA_CSS_VERSION_DATA_H
#ifndef ISP2401 #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 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; "
#else
#define CSS_VERSION_STRING "REL:20150911_37.5_1652; API:2.1.20.9; GIT:irci___#ebf437d53a8951bb7ff6d13fdb7270dab393a92a; SDK:; USER:viedifw; "
#endif
#endif #endif
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* more details. * more details.
*/ */
#include "../../include/linux/atomisp.h"
#include "ia_css_version.h" #include "ia_css_version.h"
#include "ia_css_version_data.h" #include "ia_css_version_data.h"
#include "ia_css_err.h" #include "ia_css_err.h"
...@@ -19,9 +20,16 @@ ...@@ -19,9 +20,16 @@
enum ia_css_err enum ia_css_err
ia_css_get_version(char *version, int max_size) { 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; return IA_CSS_ERR_INVALID_ARGUMENTS;
strcpy(version, CSS_VERSION_STRING); strcpy(version, css_version);
strcat(version, "FW:"); strcat(version, "FW:");
strcat(version, sh_css_get_fw_version()); strcat(version, sh_css_get_fw_version());
strcat(version, "; "); strcat(version, "; ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment