sdm: Move display panel info to dumpsys
CRs-Fixed: 2437437
Bug: 130363301
Change-Id: Ic1b3d7f20b03cb47f82d8b61dfaf2e4c24ff150e
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index dff0cf8..f9aa06b 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -628,9 +628,45 @@
hw_intf_->GetDisplayAttributes(active_index, &attrib);
os << "device type:" << display_type_;
- os << "\nstate: " << state_ << " vsync on: " << vsync_enable_ << " max. mixer stages: "
- << max_mixer_stages_;
+ os << "\nstate: " << state_ << " vsync on: " << vsync_enable_
+ << " max. mixer stages: " << max_mixer_stages_;
os << "\nnum configs: " << num_modes << " active config index: " << active_index;
+ os << "\nDisplay Attributes:";
+ os << "\n Mode:" << (hw_panel_info_.mode == kModeVideo ? "Video" : "Command");
+ os << std::boolalpha;
+ os << " Primary:" << hw_panel_info_.is_primary_panel;
+ os << " DynFPS:" << hw_panel_info_.dynamic_fps;
+ os << "\n HDR Panel:" << hw_panel_info_.hdr_enabled;
+ os << " QSync:" << hw_panel_info_.qsync_support;
+ os << " DynBitclk:" << hw_panel_info_.dyn_bitclk_support;
+ os << "\n Left Split:" << hw_panel_info_.split_info.left_split << " Right Split:"
+ << hw_panel_info_.split_info.right_split;
+ os << "\n PartialUpdate:" << hw_panel_info_.partial_update;
+ if (hw_panel_info_.partial_update) {
+ os << "\n ROI Min w:" << hw_panel_info_.min_roi_width;
+ os << " Min h:" << hw_panel_info_.min_roi_height;
+ os << " NeedsMerge: " << hw_panel_info_.needs_roi_merge;
+ os << " Alignment: l:" << hw_panel_info_.left_align << " w:" << hw_panel_info_.width_align;
+ os << " t:" << hw_panel_info_.top_align << " b:" << hw_panel_info_.height_align;
+ }
+ os << "\n FPS min:" << hw_panel_info_.min_fps << " max:" << hw_panel_info_.max_fps
+ << " cur:" << display_attributes_.fps;
+ os << " TransferTime: " << hw_panel_info_.transfer_time_us <<"us";
+ os << " MaxBrightness:" << hw_panel_info_.panel_max_brightness;
+ os << "\n Display WxH: " << display_attributes_.x_pixels << "x"
+ << display_attributes_.y_pixels;
+ os << " MixerWxH: " << mixer_attributes_.width << "x" << mixer_attributes_.height;
+ os << " DPI: " << display_attributes_.x_dpi << "x" << display_attributes_.y_dpi;
+ os << " LM_Split: " << display_attributes_.is_device_split;
+ os << "\n vsync_period " << display_attributes_.vsync_period_ns;
+ os << " v_back_porch: " << display_attributes_.v_back_porch;
+ os << " v_front_porch: " << display_attributes_.v_front_porch;
+ os << " v_pulse_width: " << display_attributes_.v_pulse_width;
+ os << "\n v_total: " << display_attributes_.v_total;
+ os << " h_total: " << display_attributes_.h_total;
+ os << " clk: " << display_attributes_.clock_khz;
+ os << " Topology: " << display_attributes_.topology;
+ os << std::noboolalpha;
os << "\nCurrent Color Mode: " << current_color_mode_.c_str();
os << "\nAvailable Color Modes:\n";
@@ -643,7 +679,6 @@
}
os << "\n";
}
- DisplayConfigVariableInfo &info = attrib;
uint32_t num_hw_layers = 0;
if (hw_layers_.info.stack) {
@@ -657,15 +692,9 @@
LayerBuffer *out_buffer = hw_layers_.info.stack->output_buffer;
if (out_buffer) {
- os << "\nres: " << out_buffer->width << "x" << out_buffer->height << " format: "
+ os << "\n Output buffer res: " << out_buffer->width << "x" << out_buffer->height << " format: "
<< GetFormatString(out_buffer->format);
- } else {
- os.precision(2);
- os << "\nres: " << info.x_pixels << "x" << info.y_pixels << " dpi: " << std::fixed <<
- info.x_dpi << "x" << std::fixed << info.y_dpi << " fps: " << info.fps <<
- " vsync period: " << info.vsync_period_ns;
}
-
HWLayersInfo &layer_info = hw_layers_.info;
for (uint32_t i = 0; i < layer_info.left_frame_roi.size(); i++) {
LayerRect &l_roi = layer_info.left_frame_roi.at(i);
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 2d520e3..aa6d28c 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -702,21 +702,23 @@
GetHWDisplayPortAndMode();
GetHWPanelMaxBrightness();
- DLOGI("%s, Panel Interface = %s, Panel Mode = %s, Is Primary = %d", device_name_,
+ DLOGI_IF(kTagDisplay, "%s, Panel Interface = %s, Panel Mode = %s, Is Primary = %d", device_name_,
interface_str_.c_str(), hw_panel_info_.mode == kModeVideo ? "Video" : "Command",
hw_panel_info_.is_primary_panel);
- DLOGI("Partial Update = %d, Dynamic FPS = %d, HDR Panel = %d QSync = %d",
+ DLOGI_IF(kTagDisplay, "Partial Update = %d, Dynamic FPS = %d, HDR Panel = %d QSync = %d",
hw_panel_info_.partial_update, hw_panel_info_.dynamic_fps, hw_panel_info_.hdr_enabled,
hw_panel_info_.qsync_support);
- DLOGI("Align: left = %d, width = %d, top = %d, height = %d", hw_panel_info_.left_align,
- hw_panel_info_.width_align, hw_panel_info_.top_align, hw_panel_info_.height_align);
- DLOGI("ROI: min_width = %d, min_height = %d, need_merge = %d", hw_panel_info_.min_roi_width,
- hw_panel_info_.min_roi_height, hw_panel_info_.needs_roi_merge);
- DLOGI("FPS: min = %d, max = %d", hw_panel_info_.min_fps, hw_panel_info_.max_fps);
- DLOGI("Left Split = %d, Right Split = %d", hw_panel_info_.split_info.left_split,
+ DLOGI_IF(kTagDisplay, "Align: left = %d, width = %d, top = %d, height = %d",
+ hw_panel_info_.left_align, hw_panel_info_.width_align, hw_panel_info_.top_align,
+ hw_panel_info_.height_align);
+ DLOGI_IF(kTagDisplay, "ROI: min_width = %d, min_height = %d, need_merge = %d",
+ hw_panel_info_.min_roi_width, hw_panel_info_.min_roi_height,
+ hw_panel_info_.needs_roi_merge);
+ DLOGI_IF(kTagDisplay, "FPS: min = %d, max = %d", hw_panel_info_.min_fps, hw_panel_info_.max_fps);
+ DLOGI_IF(kTagDisplay, "Left Split = %d, Right Split = %d", hw_panel_info_.split_info.left_split,
hw_panel_info_.split_info.right_split);
- DLOGI("Panel Transfer time = %d us", hw_panel_info_.transfer_time_us);
- DLOGI("Dynamic Bit Clk Support = %d", hw_panel_info_.dyn_bitclk_support);
+ DLOGI_IF(kTagDisplay, "Panel Transfer time = %d us", hw_panel_info_.transfer_time_us);
+ DLOGI_IF(kTagDisplay, "Dynamic Bit Clk Support = %d", hw_panel_info_.dyn_bitclk_support);
}
DisplayError HWDeviceDRM::GetDisplayIdentificationData(uint8_t *out_port, uint32_t *out_data_size,
@@ -793,7 +795,7 @@
if (Sys::pread_(fd, brightness, sizeof(brightness), 0) > 0) {
hw_panel_info_.panel_max_brightness = atoi(brightness);
- DLOGI("Max brightness level = %d", hw_panel_info_.panel_max_brightness);
+ DLOGI_IF(kTagDisplay, "Max brightness level = %d", hw_panel_info_.panel_max_brightness);
} else {
DLOGW("Failed to read max brightness level. error = %s", strerror(errno));
}
@@ -835,15 +837,17 @@
PopulateHWPanelInfo();
UpdateMixerAttributes();
- DLOGI("Display attributes[%d]: WxH: %dx%d, DPI: %fx%f, FPS: %d, LM_SPLIT: %d, V_BACK_PORCH: %d," \
- " V_FRONT_PORCH: %d, V_PULSE_WIDTH: %d, V_TOTAL: %d, H_TOTAL: %d, CLK: %dKHZ, TOPOLOGY: %d",
- index, display_attributes_[index].x_pixels, display_attributes_[index].y_pixels,
- display_attributes_[index].x_dpi, display_attributes_[index].y_dpi,
- display_attributes_[index].fps, display_attributes_[index].is_device_split,
- display_attributes_[index].v_back_porch, display_attributes_[index].v_front_porch,
- display_attributes_[index].v_pulse_width, display_attributes_[index].v_total,
- display_attributes_[index].h_total, display_attributes_[index].clock_khz,
- display_attributes_[index].topology);
+ DLOGI_IF(
+ kTagDisplay,
+ "Display attributes[%d]: WxH: %dx%d, DPI: %fx%f, FPS: %d, LM_SPLIT: %d, V_BACK_PORCH: %d,"
+ " V_FRONT_PORCH: %d, V_PULSE_WIDTH: %d, V_TOTAL: %d, H_TOTAL: %d, CLK: %dKHZ, TOPOLOGY: %d",
+ index, display_attributes_[index].x_pixels, display_attributes_[index].y_pixels,
+ display_attributes_[index].x_dpi, display_attributes_[index].y_dpi,
+ display_attributes_[index].fps, display_attributes_[index].is_device_split,
+ display_attributes_[index].v_back_porch, display_attributes_[index].v_front_porch,
+ display_attributes_[index].v_pulse_width, display_attributes_[index].v_total,
+ display_attributes_[index].h_total, display_attributes_[index].clock_khz,
+ display_attributes_[index].topology);
return kErrorNone;
}
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index c50c81f..a118c32 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -1185,7 +1185,7 @@
if (SetActiveDisplayConfig(config) != kErrorNone) {
return HWC2::Error::BadConfig;
}
-
+ DLOGI("Active configuration changed to: %d", config);
validated_ = false;
return HWC2::Error::None;
}