Skip to content

Commit 92b51bc

Browse files
committed
Add 10bit colormode and fix hdr type issue
1.Add BT2020/BT2100 10bit colormode 2.Fix hdr set metadata return value error. 3.Skip hdr outtypes check to fix GetHdrCapabilities error. Test-done: Android boot and hdr video playback test Tracked-On: OAM- Signed-off-by: Jialin <[email protected]>
1 parent 6074ee7 commit 92b51bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drm/DrmConnector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,14 @@ bool DrmConnector::GetHdrCapabilities(uint32_t *outNumTypes, int32_t *outTypes,
485485
ALOGE("outNumTypes couldn't be NULL!");
486486
return false;
487487
}
488-
488+
#if 0
489489
if (NULL == outTypes) {
490490
ALOGE("outTypes couldn't be NULL!");
491491
//TODO: clarify SF's logic here
492492
//kindly skip this check now and return nothing if it's NULL
493493
return false;
494494
}
495-
495+
#endif
496496
if (NULL == outMaxLuminance) {
497497
ALOGE("outMaxLuminance couldn't be NULL!");
498498
return false;
@@ -537,7 +537,7 @@ bool DrmConnector::GetHdrCapabilities(uint32_t *outNumTypes, int32_t *outTypes,
537537
*outMinLuminance = float(outminluminance);
538538

539539
int ret = GetConnectorProperty(*drm_, *this, "HDR_OUTPUT_METADATA", &hdr_op_metadata_prop_);
540-
if (ret) {
540+
if (!ret) {
541541
ALOGE("%s Could not get HDR_OUTPUT_METADATA property\n", __FUNCTION__);
542542
}
543543
return true;

hwc2_device/HwcDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ HWC2::Error HwcDisplay::GetRenderIntents(
984984
int32_t mode, uint32_t *outNumIntents,
985985
int32_t * /*android_render_intent_v1_1_t*/ outIntents) {
986986

987-
if (NULL == outNumIntents || mode < HAL_COLOR_MODE_NATIVE || mode > HAL_COLOR_MODE_DISPLAY_P3) {
987+
if (NULL == outNumIntents || mode < HAL_COLOR_MODE_NATIVE || mode > HAL_COLOR_MODE_BT2100_HLG) {
988988
return HWC2::Error::BadParameter;
989989
}
990990

0 commit comments

Comments
 (0)