Skip to content

Commit

Permalink
DRMBackend: Fix VRR capable check
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Aug 29, 2024
1 parent f554d88 commit 467e12c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Backends/DRMBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2630,10 +2630,11 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
{
drm_update_color_mgmt(drm);

const bool bVRRCapable = drm->pConnector && drm->pConnector->GetProperties().vrr_capable &&
drm->pCRTC && drm->pCRTC->GetProperties().VRR_ENABLED;
const bool bVRREnabled = bVRRCapable && frameInfo->allowVRR;
if ( bVRRCapable )
const bool bIsVRRCapable = drm->pConnector && drm->pConnector->GetProperties().vrr_capable && !!drm->pConnector->GetProperties().vrr_capable->GetCurrentValue();
const bool bHasVRREnable = drm->pCRTC && drm->pCRTC->GetProperties().VRR_ENABLED;

const bool bVRREnabled = bIsVRRCapable && bHasVRREnable && frameInfo->allowVRR;
if ( bIsVRRCapable )
{
if ( bVRREnabled != !!drm->pCRTC->GetProperties().VRR_ENABLED->GetCurrentValue() )
drm->needs_modeset = true;
Expand Down

0 comments on commit 467e12c

Please sign in to comment.