summaryrefslogtreecommitdiff
path: root/sdm/libs/core
diff options
context:
space:
mode:
authorRamkumar Radhakrishnan <ramkumar@codeaurora.org>2017-11-13 16:18:22 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-15 14:32:03 -0800
commit07254304fa7f457e1ba76105676e0a25027aa4be (patch)
tree13aa314eda9c004527c2cd93b45dca9028167a22 /sdm/libs/core
parent37cff3c778c0659bacc8356de521740baf65dc65 (diff)
downloaddisplay-07254304fa7f457e1ba76105676e0a25027aa4be.tar.gz
sdm: Set multirect mode to driver via plane property
Change-Id: Ia3b33e8761392ca211f210e6600a47dde9c768e0 CRs-Fixed: 2166036
Diffstat (limited to 'sdm/libs/core')
-rw-r--r--sdm/libs/core/drm/hw_device_drm.cpp16
-rw-r--r--sdm/libs/core/drm/hw_device_drm.h1
-rw-r--r--sdm/libs/core/drm/hw_info_drm.cpp2
3 files changed, 17 insertions, 2 deletions
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 48bf02b3..c734f4cd 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -98,6 +98,7 @@ using sde_drm::DRMPowerMode;
using sde_drm::DRMSecureMode;
using sde_drm::DRMSecurityLevel;
using sde_drm::DRMCscType;
+using sde_drm::DRMMultiRectMode;
namespace sdm {
@@ -901,6 +902,10 @@ void HWDeviceDRM::SetupAtomic(HWLayers *hw_layers, bool validate) {
DRMCscType csc_type = DRMCscType::kCscTypeMax;
SelectCscType(layer.input_buffer, &csc_type);
drm_atomic_intf_->Perform(DRMOps::PLANE_SET_CSC_CONFIG, pipe_id, &csc_type);
+
+ DRMMultiRectMode multirect_mode;
+ SetMultiRectMode(pipe_info->flags, &multirect_mode);
+ drm_atomic_intf_->Perform(DRMOps::PLANE_SET_MULTIRECT_MODE, pipe_id, multirect_mode);
}
}
}
@@ -1152,7 +1157,6 @@ void HWDeviceDRM::SetBlending(const LayerBlending &source, DRMBlendType *target)
}
}
-
void HWDeviceDRM::SetSrcConfig(const LayerBuffer &input_buffer, const HWRotatorMode &mode,
uint32_t *config) {
// In offline rotation case, rotator will handle deinterlacing.
@@ -1535,4 +1539,14 @@ void HWDeviceDRM::SetTopology(sde_drm::DRMTopology drm_topology, HWTopology *hw_
}
}
+void HWDeviceDRM::SetMultiRectMode(const uint32_t flags, DRMMultiRectMode *target) {
+ *target = DRMMultiRectMode::NONE;
+ if (flags & kMultiRect) {
+ *target = DRMMultiRectMode::SERIAL;
+ if (flags & kMultiRectParallelMode) {
+ *target = DRMMultiRectMode::PARALLEL;
+ }
+ }
+}
+
} // namespace sdm
diff --git a/sdm/libs/core/drm/hw_device_drm.h b/sdm/libs/core/drm/hw_device_drm.h
index edb5d58d..b08c0e66 100644
--- a/sdm/libs/core/drm/hw_device_drm.h
+++ b/sdm/libs/core/drm/hw_device_drm.h
@@ -132,6 +132,7 @@ class HWDeviceDRM : public HWInterface {
sde_drm::DRMSecurityLevel *security_level);
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);
class Registry {
public:
diff --git a/sdm/libs/core/drm/hw_info_drm.cpp b/sdm/libs/core/drm/hw_info_drm.cpp
index 269cc16a..5c69ed7b 100644
--- a/sdm/libs/core/drm/hw_info_drm.cpp
+++ b/sdm/libs/core/drm/hw_info_drm.cpp
@@ -399,7 +399,7 @@ void HWInfoDRM::GetHWPlanesInfo(HWResourceInfo *hw_resource) {
}
pipe_caps.id = pipe_obj.first;
pipe_caps.master_pipe_id = pipe_obj.second.master_plane_id;
- DLOGI("Adding %s Pipe : Id %d, master_pipe_id : Id %d",
+ DLOGI("Adding %s Pipe : Id %x, master_pipe_id : Id %x",
name.c_str(), pipe_obj.first, pipe_obj.second.master_plane_id);
hw_resource->hw_pipes.push_back(std::move(pipe_caps));
}