From: Dan Carpenter <dan.carpenter@oracle.com>
To: Reza.Amini@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Implement VSIF V3 extended refresh rate feature
Date: Fri, 11 Dec 2020 13:23:47 +0300 [thread overview]
Message-ID: <X9NIswZNSeghVkLG@mwanda> (raw)
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
reply other threads:[~2020-12-11 10:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X9NIswZNSeghVkLG@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Reza.Amini@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox