diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2019-04-05 02:04:26 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2019-04-30 12:25:37 +0300 |
commit | da17223e8539a7d4485d3c85677aa83e2fc74896 (patch) | |
tree | 9e1a8dace6bfbb5ee6447bdde686d54a4358f69c /drivers/gpu/drm/i915/intel_pm.c | |
parent | 323b0a82efbff1c73fce3c7f2a49b7f850b7f983 (diff) | |
download | linux-da17223e8539a7d4485d3c85677aa83e2fc74896.tar.xz |
drm/i915: do not mix workaround with normal flow
Separate the two comments: one is a workaround and the other is a sanity
check. We could just compare != 1, but let's treat them differently due
to having different meaning.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190404230426.15837-4-lucas.demarchi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 402a58d3cd81..6fe04e12c8f2 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3753,14 +3753,16 @@ bool intel_can_enable_sagv(struct drm_atomic_state *state) sagv_block_time_us = 10; /* - * SKL+ workaround: bspec recommends we disable SAGV when we have - * more then one pipe enabled - * * If there are no active CRTCs, no additional checks need be performed */ if (hweight32(intel_state->active_crtcs) == 0) return true; - else if (hweight32(intel_state->active_crtcs) > 1) + + /* + * SKL+ workaround: bspec recommends we disable SAGV when we have + * more then one pipe enabled + */ + if (hweight32(intel_state->active_crtcs) > 1) return false; /* Since we're now guaranteed to only have one active CRTC... */ |