Merge "sdm: drm: Read Panel HDR caps"

This commit is contained in:
Linux Build Service Account
2017-07-14 03:57:08 -07:00
committed by Gerrit - the friendly Code Review server
3 changed files with 16 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
#include "xf86drm.h" #include "xf86drm.h"
#include "xf86drmMode.h" #include "xf86drmMode.h"
#include <drm/msm_drm.h>
namespace sde_drm { namespace sde_drm {
@@ -412,6 +413,7 @@ struct DRMConnectorInfo {
int hmin; int hmin;
bool roi_merge; bool roi_merge;
DRMRotation panel_orientation; DRMRotation panel_orientation;
drm_panel_hdr_properties panel_hdr_prop;
}; };
/* Identifier token for a display */ /* Identifier token for a display */

View File

@@ -455,6 +455,17 @@ void HWDeviceDRM::PopulateHWPanelInfo() {
hw_panel_info_.max_fps = 60; hw_panel_info_.max_fps = 60;
hw_panel_info_.is_primary_panel = connector_info_.is_primary; hw_panel_info_.is_primary_panel = connector_info_.is_primary;
hw_panel_info_.is_pluggable = 0; hw_panel_info_.is_pluggable = 0;
hw_panel_info_.hdr_enabled = connector_info_.panel_hdr_prop.hdr_enabled;
hw_panel_info_.peak_luminance = connector_info_.panel_hdr_prop.peak_brightness;
hw_panel_info_.blackness_level = connector_info_.panel_hdr_prop.blackness_level;
hw_panel_info_.primaries.white_point[0] = connector_info_.panel_hdr_prop.display_primaries[0];
hw_panel_info_.primaries.white_point[1] = connector_info_.panel_hdr_prop.display_primaries[1];
hw_panel_info_.primaries.red[0] = connector_info_.panel_hdr_prop.display_primaries[2];
hw_panel_info_.primaries.red[1] = connector_info_.panel_hdr_prop.display_primaries[3];
hw_panel_info_.primaries.green[0] = connector_info_.panel_hdr_prop.display_primaries[4];
hw_panel_info_.primaries.green[1] = connector_info_.panel_hdr_prop.display_primaries[5];
hw_panel_info_.primaries.blue[0] = connector_info_.panel_hdr_prop.display_primaries[6];
hw_panel_info_.primaries.blue[1] = connector_info_.panel_hdr_prop.display_primaries[7];
// no supprt for 90 rotation only flips or 180 supported // no supprt for 90 rotation only flips or 180 supported
hw_panel_info_.panel_orientation.rotation = 0; hw_panel_info_.panel_orientation.rotation = 0;
@@ -471,8 +482,8 @@ void HWDeviceDRM::PopulateHWPanelInfo() {
DLOGI("%s, Panel Interface = %s, Panel Mode = %s, Is Primary = %d", device_name_, DLOGI("%s, Panel Interface = %s, Panel Mode = %s, Is Primary = %d", device_name_,
interface_str_.c_str(), hw_panel_info_.mode == kModeVideo ? "Video" : "Command", interface_str_.c_str(), hw_panel_info_.mode == kModeVideo ? "Video" : "Command",
hw_panel_info_.is_primary_panel); hw_panel_info_.is_primary_panel);
DLOGI("Partial Update = %d, Dynamic FPS = %d", hw_panel_info_.partial_update, DLOGI("Partial Update = %d, Dynamic FPS = %d, HDR Panel = %d", hw_panel_info_.partial_update,
hw_panel_info_.dynamic_fps); hw_panel_info_.dynamic_fps, hw_panel_info_.hdr_enabled);
DLOGI("Align: left = %d, width = %d, top = %d, height = %d", hw_panel_info_.left_align, 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); 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, DLOGI("ROI: min_width = %d, min_height = %d, need_merge = %d", hw_panel_info_.min_roi_width,

View File

@@ -174,6 +174,7 @@ DisplayError HWInfoDRM::GetHWResourceInfo(HWResourceInfo *hw_resource) {
hw_resource->has_dyn_bw_support = false; hw_resource->has_dyn_bw_support = false;
hw_resource->has_qseed3 = false; hw_resource->has_qseed3 = false;
hw_resource->has_concurrent_writeback = false; hw_resource->has_concurrent_writeback = false;
hw_resource->has_hdr = true;
// TODO(user): Deprecate // TODO(user): Deprecate
hw_resource->hw_version = kHWMdssVersion5; hw_resource->hw_version = kHWMdssVersion5;