All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
@ 2018-05-01 20:39 Tarun Vyas
  2018-05-01 21:40 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tarun Vyas @ 2018-05-01 20:39 UTC (permalink / raw)
  To: intel-gfx

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. So,
let's do away with the redundant check for an atomic pipe update.

Signed-off-by: Tarun Vyas <tarun.vyas@intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index aa1dfaa692b9..9cd4be020840 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -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;
-- 
2.13.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
  2018-05-01 20:39 [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
@ 2018-05-01 21:40 ` Patchwork
  2018-05-01 22:00 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-05-01 21:40 UTC (permalink / raw)
  To: Tarun Vyas; +Cc: intel-gfx

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
f9be46078758 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: 
Just a minor knit. Stumbled across the kernel doc for schedule_timeout() which

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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
  2018-05-01 20:39 [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
  2018-05-01 21:40 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-05-01 22:00 ` Patchwork
  2018-05-01 22:17 ` [PATCH] " Manasi Navare
  2018-05-01 23:47 ` ✓ Fi.CI.IGT: success for " Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-05-01 22:00 UTC (permalink / raw)
  To: Tarun Vyas; +Cc: intel-gfx

== Series Details ==

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

== Summary ==

= CI Bug Log - changes from CI_DRM_4117 -> Patchwork_8863 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       PASS -> DMESG-WARN (fdo#105128)

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


== Participating hosts (37 -> 34) ==

  Missing    (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4117 -> Patchwork_8863

  CI_DRM_4117: 844dd95837ab995c37d1139d74ff55139987b437 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4454: 5baea95fc3abaedff3feb0f96ce29b995f0e301d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8863: f9be46078758fb9e7987b4eeb493cdf47ebcd4f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4454: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit


== Linux commits ==

f9be46078758 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_8863/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
  2018-05-01 20:39 [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
  2018-05-01 21:40 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-05-01 22:00 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-05-01 22:17 ` Manasi Navare
  2018-05-01 23:47 ` ✓ Fi.CI.IGT: success for " Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Manasi Navare @ 2018-05-01 22:17 UTC (permalink / raw)
  To: Tarun Vyas; +Cc: intel-gfx

On Tue, May 01, 2018 at 01:39:15PM -0700, Tarun Vyas wrote:
> 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. So,
> let's do away with the redundant check for an atomic pipe update.

Makes sense to me.
Also in the very first iteration where it gets timeout from msecs_to_jiffies_timeout,
that should return an unsigned long value and then onwards schedule_timeout should
return a non negative value.
So I agree that we can get rid of the <=0 check.

Might be better to say clearly in the commit message "No functional change".
With that,

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> 
> Signed-off-by: Tarun Vyas <tarun.vyas@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index aa1dfaa692b9..9cd4be020840 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -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;
> -- 
> 2.13.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
  2018-05-01 20:39 [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
                   ` (2 preceding siblings ...)
  2018-05-01 22:17 ` [PATCH] " Manasi Navare
@ 2018-05-01 23:47 ` Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-05-01 23:47 UTC (permalink / raw)
  To: Tarun Vyas; +Cc: intel-gfx

== Series Details ==

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

== Summary ==

= CI Bug Log - changes from CI_DRM_4117_full -> Patchwork_8863_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_8863_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_8863_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/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-blt:
      shard-kbl:          SKIP -> PASS +1

    igt@gem_exec_schedule@deep-bsd2:
      shard-kbl:          PASS -> SKIP +2

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@core_prop_blob@invalid-get-prop-any:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103313)

    igt@kms_color@pipe-a-ctm-0-5:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103558, fdo#105602) +16

    igt@kms_color@pipe-b-degamma:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103558, fdo#103313, fdo#105602) +9

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

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540)

    igt@kms_sysfs_edid_timing:
      shard-apl:          PASS -> WARN (fdo#100047)

    igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103841)

    
    ==== Possible fixes ====

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

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

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    
  fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (1): shard-glkb 


== Build changes ==

    * Linux: CI_DRM_4117 -> Patchwork_8863

  CI_DRM_4117: 844dd95837ab995c37d1139d74ff55139987b437 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4454: 5baea95fc3abaedff3feb0f96ce29b995f0e301d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8863: f9be46078758fb9e7987b4eeb493cdf47ebcd4f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4454: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8863/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-01 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 20:39 [PATCH] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
2018-05-01 21:40 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-05-01 22:00 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-01 22:17 ` [PATCH] " Manasi Navare
2018-05-01 23:47 ` ✓ Fi.CI.IGT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.