Skip to contentSkip to conversation

drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update

PATCH Applied Tarun Vyas 3 participants 5 messages May 2, 2018 – May 3, 2018

Subsystems (2)
lore
Share & tools
lore

Tarun Vyas

author
#0 lore raw

PATCH v2 1/1 drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update

From: Tarun <[email protected]>

No functional changes, just a minor knit. Stumbled across the kernel doc for schedule_timeout() which quotes "In all cases the return value is guaranteed to be non-negative". Also, the return code of schedule_timeout() already checks for negative values "return timeout < 0 ? 0 : timeout;" and returns 0 in such cases. Furthermore, the msec_to_jiffies returns an ungined long value. So, let's do away with the redundant check for an atomic pipe update.

v2: Commit message changes (Manasi).

---
 drivers/gpu/drm/i915/intel_sprite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_sprite.c +1 -1
index aa1dfaa692b9..9cd4be020840 100644
@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 		if (scanline < min || scanline > max)
 			break;
 
-		if (timeout <= 0) {
+		if (!timeout) {
 			DRM_ERROR("Potential atomic update failure on pipe %c\n",
 				  pipe_name(crtc->pipe));
 			break;
Signature · 6 lines
2.13.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)
URL : https://patchwork.freedesktop.org/series/42527/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
48983ee8c47c drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
-:7: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#7: 
No functional changes, just a minor knit. Stumbled across the kernel doc for

total: 0 errors, 1 warnings, 0 checks, 8 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.BAT: success for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)

In reply to Tarun Vyas
== Series Details ==

== Series Details ==

Series: drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)
URL : https://patchwork.freedesktop.org/series/42527/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4126 -> Patchwork_8890 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42527/revisions/2/mbox/

== Known issues ==

Here are the changes found in Patchwork_8890 that come from known issues:

=== IGT changes ===

    ==== Possible fixes ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084

== Participating hosts (40 -> 36) ==

Missing (4): fi-byt-j1900 fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4126 -> Patchwork_8890

CI_DRM_4126: c49cbe0d1eb8d4c0ad477b8c7fdc5fbd82617674 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4457: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8890: 48983ee8c47cfb67ed06d6c99b3dac99a79fb94f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4457: 69a0d9192f52570211df74a12265c5d2b0721542 @ git://anongit.freedesktop.org/piglit

== Linux commits ==

48983ee8c47c drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8890/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✓ Fi.CI.IGT: success for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)

In reply to Tarun Vyas
== Series Details ==

== Series Details ==

Series: drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2)
URL : https://patchwork.freedesktop.org/series/42527/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4126_full -> Patchwork_8890_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_8890_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_8890_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42527/revisions/2/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_8890_full:

=== IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          PASS -> SKIP

== Known issues ==

Here are the changes found in Patchwork_8890_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023)

    igt@kms_flip@blocking-absolute-wf_vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#106134)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-hsw:          PASS -> FAIL (fdo#105707)

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_rotation_crc@sprite-rotation-90-pos-100-0:
      shard-apl:          PASS -> FAIL (fdo#103925)

    igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm:
      shard-kbl:          PASS -> DMESG-FAIL (fdo#103558)

    igt@pm_rpm@gem-evict-pwrite:
      shard-kbl:          PASS -> DMESG-WARN (fdo#105602, fdo#103313, fdo#103558) +10

    
    ==== Possible fixes ====

    igt@kms_flip@flip-vs-absolute-wf_vblank:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-hsw:          FAIL (fdo#103928) -> PASS

    igt@kms_flip@modeset-vs-vblank-race:
      shard-hsw:          FAIL (fdo#103060) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-c:
      shard-kbl:          DMESG-WARN (fdo#105602, fdo#103558) -> PASS +24

    igt@kms_rotation_crc@sprite-rotation-270:
      shard-apl:          FAIL (fdo#103925) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106134 https://bugs.freedesktop.org/show_bug.cgi?id=106134

== Participating hosts (8 -> 8) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4126 -> Patchwork_8890

CI_DRM_4126: c49cbe0d1eb8d4c0ad477b8c7fdc5fbd82617674 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4457: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8890: 48983ee8c47cfb67ed06d6c99b3dac99a79fb94f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4457: 69a0d9192f52570211df74a12265c5d2b0721542 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8890/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Tarun Vyas
Quoted 10 lines · Tarun Vyas

From: Tarun <[email protected]>

No functional changes, just a minor knit. Stumbled across the kernel doc for schedule_timeout() which quotes "In all cases the return value is guaranteed to be non-negative". Also, the return code of schedule_timeout() already checks for negative values "return timeout < 0 ? 0 : timeout;" and returns 0 in such cases. Furthermore, the msec_to_jiffies returns an ungined long value. So, let's do away with the redundant check for an atomic pipe update.

Quoted 4 lines

v2: Commit message changes (Manasi).

Pushed to dinq. Thanks for the patch and review.

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_sprite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_sprite.c +1 -1
index aa1dfaa692b9..9cd4be020840 100644
@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 		if (scanline < min || scanline > max)
 			break;
 
-		if (timeout <= 0) {
+		if (!timeout) {
 			DRM_ERROR("Potential atomic update failure on pipe %c\n",
 				  pipe_name(crtc->pipe));
 			break;
Signature · 6 lines
2.13.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx