drm/i915: Fix bad comparison in skl_compute_plane_wm.
Subsystems (2)
PATCH 1/1 drm/i915: Fix bad comparison in skl_compute_plane_wm.
ddb_allocation && ddb_allocation / blocks_per_line >= 1 is the same as ddb_allocation >= blocks_per_line, so use the latter to simplify this.
This fixes the following compiler warning:
drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.
--- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -4681,8 +4681,8 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,if ((cpp * cstate->base.adjusted_mode.crtc_htotal /512 <1 ) && (plane_bytes_per_line /512 <1 )) selected_result = method2; -else if ((ddb_allocation && ddb_allocation / -fixed_16_16_to_u32_round_up (plane_blocks_per_line)) >=1 ) +else if (ddb_allocation >= +fixed_16_16_to_u32_round_up (plane_blocks_per_line)) selected_result =min_fixed_16_16 (method1, method2);else if (latency >= linetime_us) selected_result =min_fixed_16_16 (method1, method2);
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Fix bad comparison in skl_compute_plane_wm, v2.
ddb_allocation && ddb_allocation / blocks_per_line >= 1 is the same as ddb_allocation >= blocks_per_line, so use the latter to simplify this.
This fixes the following compiler warning:
drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.
Changes since v1:
- Rebase, was missing the changes to the macro names.
--- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -4677,8 +4677,8 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,if ((cpp * cstate->base.adjusted_mode.crtc_htotal /512 <1 ) && (plane_bytes_per_line /512 <1 )) selected_result = method2; -else if ((ddb_allocation && ddb_allocation / -fixed16_to_u32_round_up (plane_blocks_per_line)) >=1 ) +else if (ddb_allocation >= +fixed16_to_u32_round_up (plane_blocks_per_line)) selected_result =min_fixed16 (method1, method2);else if (latency >= linetime_us) selected_result =min_fixed16 (method1, method2);
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · Maarten Lankhorst
ddb_allocation&&ddb_allocation/blocks_per_line>= 1 is the same asddb_allocation>=blocks_per_line, so use the latter to simplify this.This fixes the following compiler warning:
drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.Signed-off-by Maarten Lankhorst <[email protected]>Fixes d555cb5827d6 ("drm/i915/skl+: use linetime latency if ddb size is not available")Cc "Mahesh Kumar" <[email protected]>Reported-by David Binderman <[email protected]>Cc David Binderman <[email protected]>Cc <[email protected]> # v4.13-rc1+--- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, · line 4688
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -4681,8 +4681,8 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,if ((cpp * cstate->base.adjusted_mode.crtc_htotal /512 <1 ) && (plane_bytes_per_line /512 <1 )) selected_result = method2; -else if ((ddb_allocation && ddb_allocation / -fixed_16_16_to_u32_round_up (plane_blocks_per_line)) >=1 ) +else if (ddb_allocation >= +fixed_16_16_to_u32_round_up (plane_blocks_per_line)) selected_result =min_fixed_16_16 (method1, method2);else if (latency >= linetime_us) selected_result =min_fixed_16_16 (method1, method2);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Op 17-07-17 om 14:06 schreef Mahesh Kumar:
Quoted 1 line
Reviewed-by Mahesh Kumar <[email protected]>
Thanks, fix pushed. :)
Quoted 20 lines · Maarten Lankhorst
Quoted 19 lines
ddb_allocation&&ddb_allocation/blocks_per_line>= 1 is the same asddb_allocation>=blocks_per_line, so use the latter to simplify this.This fixes the following compiler warning:
drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.Signed-off-by Maarten Lankhorst <[email protected]>Fixes d555cb5827d6 ("drm/i915/skl+: use linetime latency if ddb size is not available")Cc "Mahesh Kumar" <[email protected]>Reported-by David Binderman <[email protected]>Cc David Binderman <[email protected]>Cc <[email protected]> # v4.13-rc1+--- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 16 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0drivers/gpu/drm/i915/intel_pm.c static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, · line 4688
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -4681,8 +4681,8 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,if ((cpp * cstate->base.adjusted_mode.crtc_htotal /512 <1 ) && (plane_bytes_per_line /512 <1 )) selected_result = method2; -else if ((ddb_allocation && ddb_allocation / -fixed_16_16_to_u32_round_up (plane_blocks_per_line)) >=1 ) +else if (ddb_allocation >= +fixed_16_16_to_u32_round_up (plane_blocks_per_line)) selected_result =min_fixed_16_16 (method1, method2);else if (latency >= linetime_us) selected_result =min_fixed_16_16 (method1, method2);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Fix bad comparison in skl_compute_plane_wm. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/i915: Fix bad comparison in skl_compute_plane_wm. (rev2)
URL : https://patchwork.freedesktop.org/series/27395/
State : success
== Summary ==
Series 27395v2 drm/i915: Fix bad comparison in skl_compute_plane_wm.
https://patchwork.freedesktop.org/api/1.0/series/27395/revisions/2/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) k.org#196399
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101597 +1
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900) fdo#101705 +1k.org#196399 https://bugzilla.kernel.org/show_bug.cgi?id=196399
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:439s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:441s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:356s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:530s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:510s fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:490s fi-byt-n2820 total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:485s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:597s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:436s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:412s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:423s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:494s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:473s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:463s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:573s fi-kbl-r total:279 pass:260 dwarn:1 dfail:0 fail:0 skip:18 time:585s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:574s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:458s fi-skl-6700hq total:279 pass:262 dwarn:0 dfail:0 fail:0 skip:17 time:592s fi-skl-6700k total:279 pass:257 dwarn:4 dfail:0 fail:0 skip:18 time:464s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:479s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:434s fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:472s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:538s fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:405s
d93246177cf41d1731dae587923544b7a28659a6 drm-tip: 2017y-07m-17d-11h-27m-05s UTC integration manifest db7a1c6 drm/i915: Fix bad comparison in skl_compute_plane_wm, v2.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5208/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx