sdm: Add interface to update panel roi infromation.
Add interface in destination scalar info structure to update panel
roi information from libscalar.
Change-Id: I6042d5b967248c8e111a03162f7bd79a5b55ce46
CRs-Fixed: 2001884
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 657d4ac..485940d 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -413,6 +413,7 @@
uint32_t mixer_height = 0;
bool scale_update = false;
HWScaleData scale_data = {};
+ LayerRect panel_roi = {};
};
typedef std::map<uint32_t, HWDestScaleInfo *> DestScaleInfoMap;
diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp
index 7d97d52..2ffeb08 100644
--- a/sdm/libs/core/fb/hw_device.cpp
+++ b/sdm/libs/core/fb/hw_device.cpp
@@ -367,6 +367,10 @@
dest_scalar_data->dest_scaler_ndx = i;
dest_scalar_data->lm_width = dest_scale_info->mixer_width;
dest_scalar_data->lm_height = dest_scale_info->mixer_height;
+#ifdef MDP_DESTSCALER_ROI_ENABLE
+ SetRect(dest_scale_info->panel_roi, &dest_scalar_data->panel_roi);
+ dest_scalar_data->flags |= MDP_DESTSCALER_ROI_ENABLE;
+#endif
dest_scalar_data->scale = reinterpret_cast <uint64_t>
(hw_scale_->GetScaleDataRef(index, kHWDestinationScalar));
@@ -376,6 +380,11 @@
dest_scalar_data->dest_scaler_ndx);
DLOGV_IF(kTagDriverConfig, "Mixer WxH %dx%d flags %x", dest_scalar_data->lm_width,
dest_scalar_data->lm_height, dest_scalar_data->flags);
+#ifdef MDP_DESTSCALER_ROI_ENABLE
+ DLOGV_IF(kTagDriverConfig, "Panel ROI [%d, %d, %d, %d]", dest_scalar_data->panel_roi.x,
+ dest_scalar_data->panel_roi.y, dest_scalar_data->panel_roi.w,
+ dest_scalar_data->panel_roi.h);
+#endif
DLOGV_IF(kTagDriverConfig, "*****************************************************************");
}
mdp_commit.dest_scaler_cnt = UINT32(hw_layer_info.dest_scale_info_map.size());
@@ -405,9 +414,16 @@
DLOGI("right_roi: x = %d, y = %d, w = %d, h = %d", r_roi.x, r_roi.y, r_roi.w, r_roi.h);
for (uint32_t i = 0; i < mdp_commit.dest_scaler_cnt; i++) {
mdp_destination_scaler_data *dest_scalar_data = &mdp_dest_scalar_data_[i];
+ mdp_scale_data_v2 *mdp_scale = reinterpret_cast<mdp_scale_data_v2 *>(dest_scalar_data->scale);
DLOGI("Dest scalar index %d Mixer WxH %dx%d", dest_scalar_data->dest_scaler_ndx,
dest_scalar_data->lm_width, dest_scalar_data->lm_height);
+#ifdef MDP_DESTSCALER_ROI_ENABLE
+ DLOGI("Panel ROI [%d, %d, %d, %d]", dest_scalar_data->panel_roi.x,
+ dest_scalar_data->panel_roi.y, dest_scalar_data->panel_roi.w,
+ dest_scalar_data->panel_roi.h);
+#endif
+ DLOGI("Dest scalar Dst WxH %dx%d", mdp_scale->dst_width, mdp_scale->dst_height);
}
for (uint32_t i = 0; i < mdp_commit.input_layer_cnt; i++) {
const mdp_input_layer &layer = mdp_layers[i];