diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-04-27 23:39:55 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-27 23:39:55 -0700 |
commit | 707b83938059e26a868e344b3ed1ccbc9d1ddcb8 (patch) | |
tree | 0c369cbde10fbf72e22051345bedd2e1bd692174 | |
parent | ec1be8ecf5a7c28d58a6f934688b6dfab311877d (diff) | |
parent | c814b0bf02759ff4f12af76c78a6a8e2fd805c21 (diff) | |
download | display-707b83938059e26a868e344b3ed1ccbc9d1ddcb8.tar.gz |
Merge "sdm: hwc2: Fix cpplint errors"
-rw-r--r-- | sdm/libs/core/drm/hw_peripheral_drm.cpp | 11 | ||||
-rw-r--r-- | sdm/libs/core/drm/hw_peripheral_drm.h | 4 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display_primary.cpp | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sdm/libs/core/drm/hw_peripheral_drm.cpp b/sdm/libs/core/drm/hw_peripheral_drm.cpp index dc2a81d0..dbd707f9 100644 --- a/sdm/libs/core/drm/hw_peripheral_drm.cpp +++ b/sdm/libs/core/drm/hw_peripheral_drm.cpp @@ -28,6 +28,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <utils/debug.h> +#include <vector> #include "hw_peripheral_drm.h" @@ -77,7 +78,7 @@ DisplayError HWPeripheralDRM::Commit(HWLayers *hw_layers) { DisplayError error = HWDeviceDRM::Commit(hw_layers); if (cwb_config_.enabled && (error == kErrorNone)) { - PostCommitConcurrentWriteback(hw_layer_info); + PostCommitConcurrentWriteback(hw_layer_info.stack->output_buffer); } return error; @@ -141,7 +142,7 @@ DisplayError HWPeripheralDRM::Flush() { return kErrorNone; } -void HWPeripheralDRM::SetupConcurrentWriteback(HWLayersInfo &hw_layer_info, bool validate) { +void HWPeripheralDRM::SetupConcurrentWriteback(const HWLayersInfo &hw_layer_info, bool validate) { bool enable = hw_resource_.has_concurrent_writeback && hw_layer_info.stack->output_buffer; if (!(enable || cwb_config_.enabled)) { return; @@ -227,12 +228,12 @@ void HWPeripheralDRM::ConfigureConcurrentWriteback(LayerStack *layer_stack) { drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_OUTPUT_RECT, cwb_config_.token.conn_id, dst); } -void HWPeripheralDRM::PostCommitConcurrentWriteback(HWLayersInfo &hw_layer_info) { - bool enabled = hw_resource_.has_concurrent_writeback && hw_layer_info.stack->output_buffer; +void HWPeripheralDRM::PostCommitConcurrentWriteback(LayerBuffer *output_buffer) { + bool enabled = hw_resource_.has_concurrent_writeback && output_buffer; if (enabled) { // Get Concurrent Writeback fence - int *fence = &hw_layer_info.stack->output_buffer->release_fence_fd; + int *fence = &output_buffer->release_fence_fd; drm_atomic_intf_->Perform(DRMOps::CONNECTOR_GET_RETIRE_FENCE, cwb_config_.token.conn_id, fence); } else { drm_mgr_intf_->UnregisterDisplay(cwb_config_.token); diff --git a/sdm/libs/core/drm/hw_peripheral_drm.h b/sdm/libs/core/drm/hw_peripheral_drm.h index e4ecae7a..b3b8306c 100644 --- a/sdm/libs/core/drm/hw_peripheral_drm.h +++ b/sdm/libs/core/drm/hw_peripheral_drm.h @@ -56,9 +56,9 @@ class HWPeripheralDRM : public HWDeviceDRM { void SetDestScalarData(HWLayersInfo hw_layer_info); void ResetDisplayParams(); DisplayError SetupConcurrentWritebackModes(); - void SetupConcurrentWriteback(HWLayersInfo &hw_layer_info, bool validate); + void SetupConcurrentWriteback(const HWLayersInfo &hw_layer_info, bool validate); void ConfigureConcurrentWriteback(LayerStack *stack); - void PostCommitConcurrentWriteback(HWLayersInfo &hw_layer_info); + void PostCommitConcurrentWriteback(LayerBuffer *output_buffer); sde_drm_dest_scaler_data sde_dest_scalar_data_ = {}; std::vector<SDEScaler> scalar_data_ = {}; diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp index 62821194..db8f851d 100644 --- a/sdm/libs/hwc2/hwc_display_primary.cpp +++ b/sdm/libs/hwc2/hwc_display_primary.cpp @@ -328,7 +328,7 @@ HWC2::Error HWCDisplayPrimary::SetColorTransform(const float *matrix, HWC2::Error HWCDisplayPrimary::SetReadbackBuffer(const native_handle_t *buffer, int32_t acquire_fence, bool post_processed_output) { - const private_handle_t *handle = (private_handle_t *)buffer; + const private_handle_t *handle = reinterpret_cast<const private_handle_t *>(buffer); if (!handle || (handle->fd < 0)) { return HWC2::Error::BadParameter; } |