Merge "sdm: Avoid duplicate BW config on crtc"
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_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index ecfafb1..29ac44e 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -767,23 +767,22 @@
}
}
}
-
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_CLK, token_.crtc_id, qos_data.clock_hz);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_AB, token_.crtc_id, qos_data.core_ab_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_IB, token_.crtc_id, qos_data.core_ib_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_LLCC_AB, token_.crtc_id, qos_data.llcc_ab_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_LLCC_IB, token_.crtc_id, qos_data.llcc_ib_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_DRAM_AB, token_.crtc_id, qos_data.dram_ab_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_DRAM_IB, token_.crtc_id, qos_data.dram_ib_bps);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ROT_CLK, token_.crtc_id, qos_data.rot_clock_hz);
- drm_atomic_intf_->Perform(DRMOps::CRTC_SET_SECURITY_LEVEL, token_.crtc_id, crtc_security_level);
-
- DLOGI_IF(kTagDriverConfig, "Display %s: System Clock=%d Hz, Core: AB=%llu Bps, IB=%llu Bps, " \
- "LLCC: AB=%llu Bps, IB=%llu Bps, DRAM AB=%llu Bps, IB=%llu Bps Rot Clock=%d",
- device_name_, qos_data.clock_hz, qos_data.core_ab_bps, qos_data.core_ib_bps,
- qos_data.llcc_ab_bps, qos_data.llcc_ib_bps, qos_data.dram_ab_bps, qos_data.dram_ib_bps,
- qos_data.rot_clock_hz);
}
+
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_CLK, token_.crtc_id, qos_data.clock_hz);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_AB, token_.crtc_id, qos_data.core_ab_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_CORE_IB, token_.crtc_id, qos_data.core_ib_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_LLCC_AB, token_.crtc_id, qos_data.llcc_ab_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_LLCC_IB, token_.crtc_id, qos_data.llcc_ib_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_DRAM_AB, token_.crtc_id, qos_data.dram_ab_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_DRAM_IB, token_.crtc_id, qos_data.dram_ib_bps);
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ROT_CLK, token_.crtc_id, qos_data.rot_clock_hz);
+
+ DLOGI_IF(kTagDriverConfig, "System Clock=%d Hz, Core: AB=%llu Bps, IB=%llu Bps, " \
+ "LLCC: AB=%llu Bps, IB=%llu Bps, DRAM AB=%llu Bps, IB=%llu Bps Rot Clock=%d",
+ qos_data.clock_hz, qos_data.core_ab_bps, qos_data.core_ib_bps, qos_data.llcc_ab_bps,
+ qos_data.llcc_ib_bps, qos_data.dram_ab_bps, qos_data.dram_ib_bps,
+ qos_data.rot_clock_hz);
}
DisplayError HWDeviceDRM::Validate(HWLayers *hw_layers) {
diff --git a/sdm/libs/core/drm/hw_info_drm.cpp b/sdm/libs/core/drm/hw_info_drm.cpp
index 7aba977..7b632e8 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;
@@ -267,6 +268,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) {