drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
Subsystems (2)
PATCH 1/1 drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
We exit early if has_aliasing_ppgtt is 0, so towards the end of the function has_aliasing_ppgtt can only be 1.
Also:
if (foo) return 1; else return 0;
when foo is already a bool is really just:
return foo;
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
@@ -161,7 +161,7 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,if (INTEL_GEN (dev_priv) >=8 && i915.enable_execlists)return has_full_48bit_ppgtt ?3 :2 ;else -return has_aliasing_ppgtt ?1 :0 ; +return has_aliasing_ppgtt; } static int ppgtt_bind_vma(struct i915_vma *vma,
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · Damien Lespiau
We exit early if
has_aliasing_ppgttis 0, so towards the end of the functionhas_aliasing_ppgttcan only be 1.Also:
if (foo) return 1; else return 0;when foo is already a bool is really just:
return foo;Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem_gtt.c +0
-0
drivers/gpu/drm/i915/i915_gem_gtt.c int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, · line 164
Quoted 5 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +1
-1@@ -161,7 +161,7 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,if (INTEL_GEN (dev_priv) >=8 && i915.enable_execlists)return has_full_48bit_ppgtt ?3 :2 ;else -return has_aliasing_ppgtt ?1 :0 ; +return has_aliasing_ppgtt;
/* full-ppgtt doesn't yet work reliably in legacy ringbuffer mode */ if (!i915.enable_execlists)
return 1;
return has_full_48bit_ppgtt ? 3 : 2;
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 33 lines · Chris Wilson
Quoted 24 lines · Damien Lespiau
We exit early if
has_aliasing_ppgttis 0, so towards the end of the functionhas_aliasing_ppgttcan only be 1.Also:
if (foo) return 1; else return 0;when foo is already a bool is really just:
return foo;Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem_gtt.c +0
-0drivers/gpu/drm/i915/i915_gem_gtt.c int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, · line 164
Quoted 5 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +1
-1@@ -161,7 +161,7 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,if (INTEL_GEN (dev_priv) >=8 && i915.enable_execlists)return has_full_48bit_ppgtt ?3 :2 ;else -return has_aliasing_ppgtt ?1 :0 ; +return has_aliasing_ppgtt;/* full-ppgtt doesn't yet work reliably in legacy ringbuffer mode */ if (!i915.enable_execlists)
Quoted 3 lines
return 1;return
has_full_48bit_ppgtt? 3 : 2;
This fell through the cracks. We'd need it to improve the output from static checkers.
--Imre
Quoted 7 lines
Signature · 6 lines
-- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: warning for drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
In reply to Damien Lespiau== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
URL : https://patchwork.freedesktop.org/series/8105/
State : warning
== Summary ==
Series 8105v1 drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
http://patchwork.freedesktop.org/api/1.0/series/8105/revisions/1/mbox
Test gem_exec_basic:
Subgroup gtt-blt:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-wb:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup basic-uc-prw-default:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup basic-wb-ro-before-default:
pass -> DMESG-WARN (ro-bdw-i7-5600u)
Subgroup basic-wb-rw-before-default:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup basic-wb-set-default:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Test gem_mmap_gtt:
Subgroup basic-small-copy:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup basic-small-copy-xy:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup basic-write:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup basic-write-gtt:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup basic-write-gtt-no-prefault:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup basic-write-no-prefault:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Test gem_pread:
Subgroup basic:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Test gem_storedw_loop:
Subgroup basic-vebox:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Test gem_tiled_pread_basic:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Test kms_addfb_basic:
Subgroup addfb25-framebuffer-vs-set-tiling:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup addfb25-x-tiled:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup bad-pitch-256:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup bad-pitch-65536:
pass -> DMESG-WARN (ro-skl-i7-6700hq)
Subgroup basic-x-tiled:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup bo-too-small-due-to-tiling:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Subgroup too-high:
dmesg-warn -> PASS (ro-skl-i7-6700hq)
Test kms_flip:
Subgroup basic-flip-vs-modeset:
dmesg-warn -> PASS (ro-byt-n2820)ro-bdw-i5-5250u total:102 pass:93 dwarn:0 dfail:0 fail:0 skip:8 ro-bdw-i7-5600u total:102 pass:74 dwarn:1 dfail:0 fail:0 skip:26 ro-bsw-n3050 total:209 pass:168 dwarn:0 dfail:0 fail:2 skip:39 ro-byt-n2820 total:209 pass:169 dwarn:0 dfail:0 fail:3 skip:37 ro-hsw-i3-4010u total:209 pass:186 dwarn:0 dfail:0 fail:0 skip:23 ro-hsw-i7-4770r total:102 pass:82 dwarn:0 dfail:0 fail:0 skip:19 ro-ilk1-i5-650 total:204 pass:146 dwarn:0 dfail:0 fail:1 skip:57 ro-skl-i7-6700hq total:204 pass:173 dwarn:10 dfail:0 fail:0 skip:21 ro-snb-i7-2620M total:102 pass:72 dwarn:0 dfail:0 fail:0 skip:29
ro-bdw-i7-5557U failed to connect after reboot
ro-ilk-i7-620lm failed to connect after reboot
ro-ivb2-i7-3770 failed to connect after reboot
ro-ivb-i7-3770 failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1076/
96c5c4d drm-intel-nightly: 2016y-06m-02d-08h-26m-32s UTC integration manifest 3b48312 drm/i915: Eliminate dead code in intel_sanitize_enable_ppgtt()
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx