From: Matt Roper <matthew.d.roper@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Handle invalid ilk pipe watermarks correctly.
Date: Wed, 2 Mar 2016 07:49:36 -0800 [thread overview]
Message-ID: <20160302154936.GD12786@intel.com> (raw)
In-Reply-To: <1456918563-28696-1-git-send-email-maarten.lankhorst@linux.intel.com>
On Wed, Mar 02, 2016 at 12:36:03PM +0100, Maarten Lankhorst wrote:
> This function returns an int, but when ilk_validate_pipe_wm fails it
> returns false, which is 0 (success). As a result invalid watermarks
> are applied, while they should have been rejected.
>
> Fix this by returning -EINVAL.
>
> Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index aebb4c37bc39..61dcac9dea37 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2345,7 +2345,7 @@ static int ilk_compute_pipe_wm(struct intel_crtc *intel_crtc,
> pipe_wm->linetime = hsw_compute_linetime_wm(dev, cstate);
>
> if (!ilk_validate_pipe_wm(dev, pipe_wm))
> - return false;
> + return -EINVAL;
>
> ilk_compute_wm_reg_maximums(dev, 1, &max);
>
> --
> 2.1.0
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-03-02 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 11:36 [PATCH] drm/i915: Handle invalid ilk pipe watermarks correctly Maarten Lankhorst
2016-03-02 11:56 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-03-02 15:49 ` Matt Roper [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=20160302154936.GD12786@intel.com \
--to=matthew.d.roper@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.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