From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tarun Vyas <tarun.vyas@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update
Date: Thu, 3 May 2018 18:11:09 +0300 [thread overview]
Message-ID: <20180503151109.GY23723@intel.com> (raw)
In-Reply-To: <20180502233300.81220-1-tarun.vyas@intel.com>
On Wed, May 02, 2018 at 04:33:00PM -0700, Tarun Vyas wrote:
> From: Tarun <tarun.vyas@intel.com>
>
> 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).
>
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Tarun Vyas <tarun.vyas@intel.com>
Pushed to dinq. Thanks for the patch and review.
> ---
> 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
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2018-05-03 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 23:33 [PATCH v2] drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update Tarun Vyas
2018-05-03 0:31 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update (rev2) Patchwork
2018-05-03 0:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-03 9:46 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-03 15:11 ` Ville Syrjälä [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180503151109.GY23723@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tarun.vyas@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox