summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-12-30 02:28:09 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-30 02:28:09 -0800
commit0b75aa236b238b8f2ad7c646ecb92b40141040e2 (patch)
tree3bc07ff56655f07a5ad7f682acc79124ac13aa3f
parente3ae4b05ed02543abcf04b6efb3c83ee87e77323 (diff)
parent5e4ae0c1eea7cf02c976daed177b1077a6c8c1b6 (diff)
downloaddisplay-0b75aa236b238b8f2ad7c646ecb92b40141040e2.tar.gz
Merge "sdm: Read downscale_compression capability from Rotator"
-rw-r--r--sdm/include/private/hw_info_types.h1
-rw-r--r--sdm/libs/core/fb/hw_info.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 3f5aa2b9..cd57f328 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -129,6 +129,7 @@ struct HWRotatorInfo {
bool has_downscale = false;
std::string device_path = "";
float min_downscale = 2.0f;
+ bool downscale_compression = false;
void Reset() { *this = HWRotatorInfo(); }
};
diff --git a/sdm/libs/core/fb/hw_info.cpp b/sdm/libs/core/fb/hw_info.cpp
index 9f9cae45..08a7188f 100644
--- a/sdm/libs/core/fb/hw_info.cpp
+++ b/sdm/libs/core/fb/hw_info.cpp
@@ -423,7 +423,9 @@ DisplayError HWInfo::GetV4L2RotatorInfo(HWResourceInfo *hw_resource) {
string caps;
while (Sys::getline_(caps_fs, caps)) {
if (!ParseString(caps.c_str(), tokens, max_count, ":, =\n", &token_count)) {
- if (!strncmp(tokens[0], "min_downscale", strlen("min_downscale"))) {
+ if (!strncmp(tokens[0], "downscale_compression", strlen("downscale_compression"))) {
+ hw_resource->hw_rot_info.downscale_compression = UINT8(atoi(tokens[1]));
+ } else if (!strncmp(tokens[0], "min_downscale", strlen("min_downscale"))) {
hw_resource->hw_rot_info.min_downscale = FLOAT(atof(tokens[1]));
}
}
@@ -435,9 +437,9 @@ DisplayError HWInfo::GetV4L2RotatorInfo(HWResourceInfo *hw_resource) {
}
}
- DLOGI("V4L2 Rotator: Count = %d, Downscale = %d, Min_downscale = %f",
+ DLOGI("V4L2 Rotator: Count = %d, Downscale = %d, Min_downscale = %f, Downscale_compression = %d",
hw_resource->hw_rot_info.num_rotator, hw_resource->hw_rot_info.has_downscale,
- hw_resource->hw_rot_info.min_downscale);
+ hw_resource->hw_rot_info.min_downscale, hw_resource->hw_rot_info.downscale_compression);
return kErrorNone;
}