sdm: drm: Add support for sde hardware revision caching
SDE hardware version should be cached by drm crtc which will be passed
onto the clients of colormanager. Based on the SDE hardware version
clients will know which feature set is supported. Change adds support to
cache sde version.
Change-Id: I09051bcdfc0f759297519c3abd46373944967ada
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index a566399..8fddb43 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -338,6 +338,7 @@
uint32_t max_sde_clk;
CompRatioMap comp_ratio_rt_map;
CompRatioMap comp_ratio_nrt_map;
+ uint32_t hw_version;
};
enum struct DRMPlaneType {
diff --git a/sdm/libs/core/drm/hw_info_drm.cpp b/sdm/libs/core/drm/hw_info_drm.cpp
index bf7a5ab..ae21342 100644
--- a/sdm/libs/core/drm/hw_info_drm.cpp
+++ b/sdm/libs/core/drm/hw_info_drm.cpp
@@ -176,9 +176,10 @@
hw_resource->has_concurrent_writeback = false;
hw_resource->has_hdr = true;
- // TODO(user): Deprecate
hw_resource->hw_version = kHWMdssVersion5;
hw_resource->hw_revision = 0;
+
+ // TODO(user): Deprecate
hw_resource->max_mixer_width = 0;
hw_resource->writeback_index = 0;
hw_resource->has_bwc = false;
@@ -266,6 +267,7 @@
hw_resource->max_bandwidth_low = info.max_bandwidth_low / kKiloUnit;
hw_resource->max_bandwidth_high = info.max_bandwidth_high / kKiloUnit;
hw_resource->max_sde_clk = info.max_sde_clk;
+ hw_resource->hw_revision = info.hw_version;
std::vector<LayerBufferFormat> sdm_format;
for (auto &it : info.comp_ratio_rt_map) {