summaryrefslogtreecommitdiff
path: root/sdm/libs/core/drm
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-02-20 22:58:22 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-02-20 22:58:22 -0800
commit67cf038fe10eb10f2d8de13db551734a2e9f0259 (patch)
tree682d80c7c3dad9cdb168cc06517a7de3927ce1f0 /sdm/libs/core/drm
parentb88a1e342579f098331ea15930673148b57d1f3e (diff)
parenta3a4735d0093d236bf98879eca010b2724e4130e (diff)
downloaddisplay-67cf038fe10eb10f2d8de13db551734a2e9f0259.tar.gz
Merge "sdm: Handle disable partial update and display config change"
Diffstat (limited to 'sdm/libs/core/drm')
-rw-r--r--sdm/libs/core/drm/hw_device_drm.cpp14
-rw-r--r--sdm/libs/core/drm/hw_device_drm.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 9b01c86d..210002a9 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -738,6 +738,7 @@ DisplayError HWDeviceDRM::PowerOff() {
return kErrorUndefined;
}
+ SetFullROI();
drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_POWER_MODE, token_.conn_id, DRMPowerMode::OFF);
drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 0);
int ret = drm_atomic_intf_->Commit(true /* synchronous */, false /* retain_planes */);
@@ -1556,4 +1557,17 @@ void HWDeviceDRM::SetMultiRectMode(const uint32_t flags, DRMMultiRectMode *targe
}
}
+void HWDeviceDRM::SetFullROI() {
+ // Reset the CRTC ROI and connector ROI only for the panel that supports partial update
+ if (!hw_panel_info_.partial_update) {
+ return;
+ }
+ uint32_t index = current_mode_index_;
+ DRMRect crtc_rects = {0, 0, mixer_attributes_.width, mixer_attributes_.height};
+ DRMRect conn_rects = {0, 0, display_attributes_[index].x_pixels,
+ display_attributes_[index].y_pixels};
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ROI, token_.crtc_id, 1, &crtc_rects);
+ drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_ROI, token_.conn_id, 1, &conn_rects);
+}
+
} // namespace sdm
diff --git a/sdm/libs/core/drm/hw_device_drm.h b/sdm/libs/core/drm/hw_device_drm.h
index 3ecc9a08..a0f579d4 100644
--- a/sdm/libs/core/drm/hw_device_drm.h
+++ b/sdm/libs/core/drm/hw_device_drm.h
@@ -133,6 +133,7 @@ class HWDeviceDRM : public HWInterface {
bool IsResolutionSwitchEnabled() const { return resolution_switch_enabled_; }
void SetTopology(sde_drm::DRMTopology drm_topology, HWTopology *hw_topology);
void SetMultiRectMode(const uint32_t flags, sde_drm::DRMMultiRectMode *target);
+ void SetFullROI();
class Registry {
public: