sdm: Read number of rects from per-pipe caps
Read the number of rects from per-pipe caps to find out the number
of rectangles supported by each pipe.
CRs-Fixed: 985108
Change-Id: I58559ba5b3cdd71b585ed650dab3706f1403b3df
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 4231cc4..a3a6d61 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2015 - 2016, The Linux Foundation. All rights reserved.
+* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
@@ -97,6 +97,7 @@
struct HWPipeCaps {
PipeType type = kPipeTypeUnused;
uint32_t id = 0;
+ uint32_t max_rects = 1;
};
struct HWResourceInfo {
diff --git a/sdm/libs/core/fb/hw_info.cpp b/sdm/libs/core/fb/hw_info.cpp
index 3bfddba..503a4ca 100755
--- a/sdm/libs/core/fb/hw_info.cpp
+++ b/sdm/libs/core/fb/hw_info.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2015 - 2016, The Linux Foundation. All rights reserved.
+* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
@@ -269,6 +269,8 @@
}
} else if (!strncmp(tokens[j], "pipe_ndx", strlen("pipe_ndx"))) {
pipe_caps.id = UINT32(atoi(tokens[j+1]));
+ } else if (!strncmp(tokens[j], "rects", strlen("rects"))) {
+ pipe_caps.max_rects = UINT32(atoi(tokens[j+1]));
} else if (!strncmp(tokens[j], "fmts_supported", strlen("fmts_supported"))) {
char *tokens_fmt[max_count] = { NULL };
uint32_t token_fmt_count = 0;