sdm: Report mixer configuration in dumpsys
Report the maximum mixer stages for each display. Change-Id: Ibdf1863b0ff6782860117e2467ea637c8b419d9b
This commit is contained in:
@@ -65,6 +65,7 @@ class Debug {
|
|||||||
static bool IsRotatorDownScaleDisabled();
|
static bool IsRotatorDownScaleDisabled();
|
||||||
static bool IsDecimationDisabled();
|
static bool IsDecimationDisabled();
|
||||||
static bool IsPartialUpdateEnabled();
|
static bool IsPartialUpdateEnabled();
|
||||||
|
static int GetMaxPipesPerMixer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Debug();
|
Debug();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <utils/debug.h>
|
#include <utils/debug.h>
|
||||||
|
|
||||||
#include "display_base.h"
|
#include "display_base.h"
|
||||||
|
#include "hw_info_interface.h"
|
||||||
|
|
||||||
#define __CLASS__ "DisplayBase"
|
#define __CLASS__ "DisplayBase"
|
||||||
|
|
||||||
@@ -35,12 +36,14 @@ namespace sdm {
|
|||||||
// TODO(user): Have a single structure handle carries all the interface pointers and variables.
|
// TODO(user): Have a single structure handle carries all the interface pointers and variables.
|
||||||
DisplayBase::DisplayBase(DisplayType display_type, DisplayEventHandler *event_handler,
|
DisplayBase::DisplayBase(DisplayType display_type, DisplayEventHandler *event_handler,
|
||||||
HWDeviceType hw_device_type, BufferSyncHandler *buffer_sync_handler,
|
HWDeviceType hw_device_type, BufferSyncHandler *buffer_sync_handler,
|
||||||
CompManager *comp_manager, RotatorInterface *rotator_intf)
|
CompManager *comp_manager, RotatorInterface *rotator_intf,
|
||||||
|
HWInfoInterface *hw_info_intf)
|
||||||
: display_type_(display_type), event_handler_(event_handler), hw_device_type_(hw_device_type),
|
: display_type_(display_type), event_handler_(event_handler), hw_device_type_(hw_device_type),
|
||||||
buffer_sync_handler_(buffer_sync_handler), comp_manager_(comp_manager),
|
buffer_sync_handler_(buffer_sync_handler), comp_manager_(comp_manager),
|
||||||
rotator_intf_(rotator_intf), state_(kStateOff), hw_device_(0), display_comp_ctx_(0),
|
rotator_intf_(rotator_intf), state_(kStateOff), hw_device_(0), display_comp_ctx_(0),
|
||||||
display_attributes_(NULL), num_modes_(0), active_mode_index_(0), pending_commit_(false),
|
display_attributes_(NULL), num_modes_(0), active_mode_index_(0), pending_commit_(false),
|
||||||
vsync_enable_(false), underscan_supported_(false) {
|
vsync_enable_(false), underscan_supported_(false), max_mixer_stages_(0),
|
||||||
|
hw_info_intf_(hw_info_intf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayError DisplayBase::Init() {
|
DisplayError DisplayBase::Init() {
|
||||||
@@ -86,6 +89,17 @@ DisplayError DisplayBase::Init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hw_info_intf_) {
|
||||||
|
HWResourceInfo hw_resource_info = HWResourceInfo();
|
||||||
|
hw_info_intf_->GetHWResourceInfo(&hw_resource_info);
|
||||||
|
int max_mixer_stages = hw_resource_info.num_blending_stages;
|
||||||
|
int property_value = Debug::GetMaxPipesPerMixer();
|
||||||
|
if (property_value >= 0) {
|
||||||
|
max_mixer_stages = MIN(UINT32(property_value), hw_resource_info.num_blending_stages);
|
||||||
|
}
|
||||||
|
DisplayBase::SetMaxMixerStages(max_mixer_stages);
|
||||||
|
}
|
||||||
|
|
||||||
return kErrorNone;
|
return kErrorNone;
|
||||||
|
|
||||||
CleanupOnError:
|
CleanupOnError:
|
||||||
@@ -372,6 +386,10 @@ DisplayError DisplayBase::SetMaxMixerStages(uint32_t max_mixer_stages) {
|
|||||||
|
|
||||||
if (comp_manager_) {
|
if (comp_manager_) {
|
||||||
error = comp_manager_->SetMaxMixerStages(display_comp_ctx_, max_mixer_stages);
|
error = comp_manager_->SetMaxMixerStages(display_comp_ctx_, max_mixer_stages);
|
||||||
|
|
||||||
|
if (error == kErrorNone) {
|
||||||
|
max_mixer_stages_ = max_mixer_stages;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
@@ -389,7 +407,8 @@ DisplayError DisplayBase::IsScalingValid(const LayerRect &crop, const LayerRect
|
|||||||
void DisplayBase::AppendDump(char *buffer, uint32_t length) {
|
void DisplayBase::AppendDump(char *buffer, uint32_t length) {
|
||||||
DumpImpl::AppendString(buffer, length, "\n-----------------------");
|
DumpImpl::AppendString(buffer, length, "\n-----------------------");
|
||||||
DumpImpl::AppendString(buffer, length, "\ndevice type: %u", display_type_);
|
DumpImpl::AppendString(buffer, length, "\ndevice type: %u", display_type_);
|
||||||
DumpImpl::AppendString(buffer, length, "\nstate: %u, vsync on: %u", state_, INT(vsync_enable_));
|
DumpImpl::AppendString(buffer, length, "\nstate: %u, vsync on: %u, max. mixer stages: %u",
|
||||||
|
state_, INT(vsync_enable_), max_mixer_stages_);
|
||||||
DumpImpl::AppendString(buffer, length, "\nnum configs: %u, active config index: %u",
|
DumpImpl::AppendString(buffer, length, "\nnum configs: %u, active config index: %u",
|
||||||
num_modes_, active_mode_index_);
|
num_modes_, active_mode_index_);
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,14 @@
|
|||||||
namespace sdm {
|
namespace sdm {
|
||||||
|
|
||||||
class RotatorCtrl;
|
class RotatorCtrl;
|
||||||
|
class HWInfoInterface;
|
||||||
|
|
||||||
class DisplayBase : public DisplayInterface {
|
class DisplayBase : public DisplayInterface {
|
||||||
public:
|
public:
|
||||||
DisplayBase(DisplayType display_type, DisplayEventHandler *event_handler,
|
DisplayBase(DisplayType display_type, DisplayEventHandler *event_handler,
|
||||||
HWDeviceType hw_device_type, BufferSyncHandler *buffer_sync_handler,
|
HWDeviceType hw_device_type, BufferSyncHandler *buffer_sync_handler,
|
||||||
CompManager *comp_manager, RotatorInterface *rotator_intf);
|
CompManager *comp_manager, RotatorInterface *rotator_intf,
|
||||||
|
HWInfoInterface *hw_info_intf);
|
||||||
virtual ~DisplayBase() { }
|
virtual ~DisplayBase() { }
|
||||||
virtual DisplayError Init();
|
virtual DisplayError Init();
|
||||||
virtual DisplayError Deinit();
|
virtual DisplayError Deinit();
|
||||||
@@ -90,6 +92,8 @@ class DisplayBase : public DisplayInterface {
|
|||||||
bool pending_commit_;
|
bool pending_commit_;
|
||||||
bool vsync_enable_;
|
bool vsync_enable_;
|
||||||
bool underscan_supported_;
|
bool underscan_supported_;
|
||||||
|
uint32_t max_mixer_stages_;
|
||||||
|
HWInfoInterface *hw_info_intf_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sdm
|
} // namespace sdm
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ DisplayHDMI::DisplayHDMI(DisplayEventHandler *event_handler, HWInfoInterface *hw
|
|||||||
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
||||||
RotatorInterface *rotator_intf)
|
RotatorInterface *rotator_intf)
|
||||||
: DisplayBase(kHDMI, event_handler, kDeviceHDMI, buffer_sync_handler, comp_manager,
|
: DisplayBase(kHDMI, event_handler, kDeviceHDMI, buffer_sync_handler, comp_manager,
|
||||||
rotator_intf), hw_info_intf_(hw_info_intf) {
|
rotator_intf, hw_info_intf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayError DisplayHDMI::Init() {
|
DisplayError DisplayHDMI::Init() {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
namespace sdm {
|
namespace sdm {
|
||||||
|
|
||||||
class HWHDMIInterface;
|
class HWHDMIInterface;
|
||||||
class HWInfoInterface;
|
|
||||||
|
|
||||||
class DisplayHDMI : public DisplayBase, DumpImpl {
|
class DisplayHDMI : public DisplayBase, DumpImpl {
|
||||||
public:
|
public:
|
||||||
@@ -67,7 +66,6 @@ class DisplayHDMI : public DisplayBase, DumpImpl {
|
|||||||
|
|
||||||
Locker locker_;
|
Locker locker_;
|
||||||
HWHDMIInterface *hw_hdmi_intf_;
|
HWHDMIInterface *hw_hdmi_intf_;
|
||||||
HWInfoInterface *hw_info_intf_;
|
|
||||||
HWScanSupport scan_support_;
|
HWScanSupport scan_support_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ DisplayPrimary::DisplayPrimary(DisplayEventHandler *event_handler, HWInfoInterfa
|
|||||||
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
||||||
RotatorInterface *rotator_intf)
|
RotatorInterface *rotator_intf)
|
||||||
: DisplayBase(kPrimary, event_handler, kDevicePrimary, buffer_sync_handler, comp_manager,
|
: DisplayBase(kPrimary, event_handler, kDevicePrimary, buffer_sync_handler, comp_manager,
|
||||||
rotator_intf), hw_info_intf_(hw_info_intf) {
|
rotator_intf, hw_info_intf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayError DisplayPrimary::Init() {
|
DisplayError DisplayPrimary::Init() {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
namespace sdm {
|
namespace sdm {
|
||||||
|
|
||||||
class HWPrimaryInterface;
|
class HWPrimaryInterface;
|
||||||
class HWInfoInterface;
|
|
||||||
|
|
||||||
class DisplayPrimary : public DisplayBase, DumpImpl, HWEventHandler {
|
class DisplayPrimary : public DisplayBase, DumpImpl, HWEventHandler {
|
||||||
public:
|
public:
|
||||||
@@ -70,7 +69,6 @@ class DisplayPrimary : public DisplayBase, DumpImpl, HWEventHandler {
|
|||||||
private:
|
private:
|
||||||
Locker locker_;
|
Locker locker_;
|
||||||
HWPrimaryInterface *hw_primary_intf_;
|
HWPrimaryInterface *hw_primary_intf_;
|
||||||
HWInfoInterface *hw_info_intf_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sdm
|
} // namespace sdm
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ DisplayVirtual::DisplayVirtual(DisplayEventHandler *event_handler, HWInfoInterfa
|
|||||||
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
BufferSyncHandler *buffer_sync_handler, CompManager *comp_manager,
|
||||||
RotatorInterface *rotator_intf)
|
RotatorInterface *rotator_intf)
|
||||||
: DisplayBase(kVirtual, event_handler, kDeviceVirtual, buffer_sync_handler, comp_manager,
|
: DisplayBase(kVirtual, event_handler, kDeviceVirtual, buffer_sync_handler, comp_manager,
|
||||||
rotator_intf), hw_info_intf_(hw_info_intf) {
|
rotator_intf, hw_info_intf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayError DisplayVirtual::Init() {
|
DisplayError DisplayVirtual::Init() {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
namespace sdm {
|
namespace sdm {
|
||||||
|
|
||||||
class HWVirtualInterface;
|
class HWVirtualInterface;
|
||||||
class HWInfoInterface;
|
|
||||||
|
|
||||||
class DisplayVirtual : public DisplayBase, DumpImpl {
|
class DisplayVirtual : public DisplayBase, DumpImpl {
|
||||||
public:
|
public:
|
||||||
@@ -64,7 +63,6 @@ class DisplayVirtual : public DisplayBase, DumpImpl {
|
|||||||
private:
|
private:
|
||||||
Locker locker_;
|
Locker locker_;
|
||||||
HWVirtualInterface *hw_virtual_intf_;
|
HWVirtualInterface *hw_virtual_intf_;
|
||||||
HWInfoInterface *hw_info_intf_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sdm
|
} // namespace sdm
|
||||||
|
|||||||
@@ -80,5 +80,12 @@ bool Debug::IsPartialUpdateEnabled() {
|
|||||||
return (value == 1);
|
return (value == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Debug::GetMaxPipesPerMixer() {
|
||||||
|
int value = -1;
|
||||||
|
debug_.debug_handler_->GetProperty("persist.hwc.mdpcomp.maxpermixer", &value);
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace sdm
|
} // namespace sdm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user