* [bug report] drm/amd/display: Implement VSIF V3 extended refresh rate feature
@ 2020-12-11 10:23 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-12-11 10:23 UTC (permalink / raw)
To: Reza.Amini; +Cc: amd-gfx
Hello Reza Amini,
The patch 9bc416266582: "drm/amd/display: Implement VSIF V3 extended
refresh rate feature" from Jul 9, 2020, leads to the following static
checker warning:
drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:617 build_vrr_infopacket_data_v3()
warn: both sides of ternary the same: 'max_refresh' max_refresh max_refresh
drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c
606
607 min_refresh = (vrr->min_refresh_in_uhz + 500000) / 1000000;
608 max_refresh = (vrr->max_refresh_in_uhz + 500000) / 1000000;
609 fixed_refresh = (vrr->fixed_refresh_in_uhz + 500000) / 1000000;
610
611 min_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh :
612 (vrr->state == VRR_STATE_ACTIVE_VARIABLE) ? min_refresh :
613 (vrr->state == VRR_STATE_INACTIVE) ? min_refresh :
614 max_refresh; // Non-fs case, program nominal range
615
616 max_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh :
617 (vrr->state == VRR_STATE_ACTIVE_VARIABLE) ? max_refresh :
^^^^^^^^^^^
Probably "min_refresh" was intended here?
618 max_refresh;// Non-fs case, program nominal range
^^^^^^^^^^^
619
620 /* PB7 = FreeSync Minimum refresh rate (Hz) */
621 infopacket->sb[7] = min_programmed & 0xFF;
622
623 /* PB8 = FreeSync Maximum refresh rate (Hz) */
624 infopacket->sb[8] = max_programmed & 0xFF;
625
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-11 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 10:23 [bug report] drm/amd/display: Implement VSIF V3 extended refresh rate feature Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.