Merge "sdm: Populate minimum ib limit in kbps from crtc info"
diff --git a/libgralloc1/gr_buf_mgr.cpp b/libgralloc1/gr_buf_mgr.cpp
index d6753d8..64ff861 100644
--- a/libgralloc1/gr_buf_mgr.cpp
+++ b/libgralloc1/gr_buf_mgr.cpp
@@ -704,7 +704,7 @@
*flag = hnd->flags &private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
int linear_format = 0;
if (getMetaData(hnd, GET_LINEAR_FORMAT, &linear_format) == 0) {
- if (!linear_format) {
+ if (linear_format) {
*flag = 0;
}
}
diff --git a/libgralloc1/gralloc_priv.h b/libgralloc1/gralloc_priv.h
index 2abdd84..cec4af0 100644
--- a/libgralloc1/gralloc_priv.h
+++ b/libgralloc1/gralloc_priv.h
@@ -57,6 +57,7 @@
/* TODO(user): move these to use producer private bits once 64-bit support available */
/* This flag is used to indicate 10-bit tight pack format (e.g. TP10) */
#define GRALLOC1_PRODUCER_USAGE_PRIVATE_10BIT_TP 0x08000000
+#define GRALLOC1_CONSUMER_USAGE_PRIVATE_10BIT_TP 0x08000000
/* Consumer flags */
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index fa31a12..f87712a 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -671,7 +671,7 @@
drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 1);
drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_POWER_MODE, token_.conn_id, DRMPowerMode::ON);
- int ret = drm_atomic_intf_->Commit(false /* synchronous */);
+ int ret = drm_atomic_intf_->Commit(true /* synchronous */);
if (ret) {
DLOGE("Failed with error: %d", ret);
return kErrorHardware;
@@ -687,7 +687,7 @@
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(false /* synchronous */);
+ int ret = drm_atomic_intf_->Commit(true /* synchronous */);
if (ret) {
DLOGE("Failed with error: %d", ret);
return kErrorHardware;
diff --git a/sdm/libs/core/drm/hw_tv_drm.cpp b/sdm/libs/core/drm/hw_tv_drm.cpp
index abebb5e..90a204f 100644
--- a/sdm/libs/core/drm/hw_tv_drm.cpp
+++ b/sdm/libs/core/drm/hw_tv_drm.cpp
@@ -56,6 +56,7 @@
using sde_drm::DRMPPFeatureInfo;
using sde_drm::DRMOps;
using sde_drm::DRMTopology;
+using sde_drm::DRMPowerMode;
namespace sdm {
@@ -98,6 +99,7 @@
return error;
}
+
DisplayError HWTVDRM::SetDisplayAttributes(uint32_t index) {
if (index >= connector_info_.modes.size()) {
return kErrorNotSupported;
@@ -159,5 +161,36 @@
return kErrorNone;
}
+/* overriding display state funcs to have special or NO OP implementation for TVs */
+DisplayError HWTVDRM::Deinit() {
+ drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 0);
+
+ return HWDeviceDRM::Deinit();
+}
+
+DisplayError HWTVDRM::PowerOff() {
+ DTRACE_SCOPED();
+
+ int ret = drm_atomic_intf_->Commit(true /* synchronous */);
+ if (ret) {
+ DLOGE("%s failed with error %d", __FUNCTION__, ret);
+ return kErrorHardware;
+ }
+
+ return kErrorNone;
+}
+
+DisplayError HWTVDRM::Doze() {
+ return kErrorNone;
+}
+
+DisplayError HWTVDRM::DozeSuspend() {
+ return kErrorNone;
+}
+
+DisplayError HWTVDRM::Standby() {
+ return kErrorNone;
+}
+
} // namespace sdm
diff --git a/sdm/libs/core/drm/hw_tv_drm.h b/sdm/libs/core/drm/hw_tv_drm.h
index fa8012a..985499e 100644
--- a/sdm/libs/core/drm/hw_tv_drm.h
+++ b/sdm/libs/core/drm/hw_tv_drm.h
@@ -41,8 +41,13 @@
protected:
virtual DisplayError Init();
+ virtual DisplayError Deinit();
virtual DisplayError SetDisplayAttributes(uint32_t index);
virtual DisplayError GetConfigIndex(char *mode, uint32_t *index);
+ virtual DisplayError PowerOff();
+ virtual DisplayError Doze();
+ virtual DisplayError DozeSuspend();
+ virtual DisplayError Standby();
private:
static const int kBitRGB = 20;