Skip to content

Commit

Permalink
DisplayInfo:Nexus: implementation of HDR changed based on nexus versions
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Feb 12, 2020
1 parent 0b1c7e2 commit 3f01a32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions DisplayInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ if (NXCLIENT_FOUND AND NEXUS_FOUND)
PRIVATE
NEXUS::NEXUS
NXCLIENT::NXCLIENT)

if (PLUGIN_DISPLAYINFO_BCM_19_X)
target_compile_definitions(${MODULE_NAME}
PRIVATE
DISPLAYINFO_BCM_19_X=ON)
endif ()

elseif (BCM_HOST_FOUND)
target_sources(${MODULE_NAME}
PRIVATE
Expand Down
12 changes: 9 additions & 3 deletions DisplayInfo/Nexus/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class DisplayInfoImplementation : public Exchange::IGraphicsProperties, public E
inline void UpdateDisplayInfo(bool& connected, uint32_t& width, uint32_t& height, uint8_t& major, uint8_t& minor, HDRType type) const
{
NEXUS_Error rc = NEXUS_SUCCESS;
NxClient_DisplayStatus status;

NEXUS_HdmiOutputHandle hdmiOutput;
hdmiOutput = NEXUS_HdmiOutput_Open(NEXUS_ALIAS_ID + 0, NULL);
Expand All @@ -220,7 +219,7 @@ class DisplayInfoImplementation : public Exchange::IGraphicsProperties, public E

NxClient_DisplaySettings displaySettings;
NxClient_GetDisplaySettings(&displaySettings);
#if 0 // to be findout solution for < 19.x
#ifdef DISPLAYINFO_BCM_19_X
// Read HDR status
switch (displaySettings.hdmiPreferences.dynamicRangeMode) {
case NEXUS_VideoDynamicRangeMode_eHdr10: {
Expand All @@ -231,10 +230,17 @@ class DisplayInfoImplementation : public Exchange::IGraphicsProperties, public E
type = HDR_10PLUS;
break;
}
default:
#else
switch (displaySettings.hdmiPreferences.drmInfoFrame.eotf) {
case NEXUS_VideoEotf_eHdr10: {
type = HDR_10;
break;
}
#endif
default:
break;
}


// Check HDCP version
NEXUS_HdmiOutputHdcpStatus hdcpStatus;
Expand Down

0 comments on commit 3f01a32

Please sign in to comment.