All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Cc: drm-intel-fixes@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Pretend cursor is always on for	ILK-style WM calculations (v2)
Date: Tue, 09 Feb 2016 11:36:55 +0200	[thread overview]
Message-ID: <87a8nady2w.fsf@intel.com> (raw)
In-Reply-To: <1454958328-30129-1-git-send-email-matthew.d.roper@intel.com>

On Mon, 08 Feb 2016, Matt Roper <matthew.d.roper@intel.com> wrote:
> Due to our lack of two-step watermark programming, our driver has
> historically pretended that the cursor plane is always on for the
> purpose of watermark calculations; this helps avoid serious flickering
> when the cursor turns off/on (e.g., when the user moves the mouse
> pointer to a different screen).  That workaround was accidentally
> dropped as we started working toward atomic watermark updates.  Since we
> still aren't quite there yet with two-stage updates, we need to
> resurrect the workaround and treat the cursor as always active.
>
> v2: Tweak cursor width calculations slightly to more closely match the
>     logic we used before the atomic overhaul began.  (Ville)
>
> Cc: simdev11@outlook.com
> Cc: manfred.kitzbichler@gmail.com
> Cc: drm-intel-fixes@lists.freedesktop.org
> Reported-by: simdev11@outlook.com
> Reported-by: manfred.kitzbichler@gmail.com
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93892
> Fixes: 43d59eda1 ("drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2)")
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> Link: http://patchwork.freedesktop.org/patch/msgid/1454479611-6804-1-git-send-email-matthew.d.roper@intel.com
> (cherry picked from commit b2435692dbb709d4c8ff3b2f2815c9b8423b72bb)
> ---
> This patch is already merged to dinq, but did not cherry-pick cleanly to -fixes
> due to dependence on a separate s/bpp/cpp/ standardization patch.  Here's a
> version of the patch that should apply to -fixes cleanly.

Pushed to drm-intel-fixes, thanks for the patch.

BR,
Jani.

>
>  drivers/gpu/drm/i915/intel_pm.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index eb5fa05..a234687 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1783,16 +1783,20 @@ static uint32_t ilk_compute_cur_wm(const struct intel_crtc_state *cstate,
>  				   const struct intel_plane_state *pstate,
>  				   uint32_t mem_value)
>  {
> -	int bpp = pstate->base.fb ? pstate->base.fb->bits_per_pixel / 8 : 0;
> +	/*
> +	 * We treat the cursor plane as always-on for the purposes of watermark
> +	 * calculation.  Until we have two-stage watermark programming merged,
> +	 * this is necessary to avoid flickering.
> +	 */
> +	int cpp = 4;
> +	int width = pstate->visible ? pstate->base.crtc_w : 64;
>  
> -	if (!cstate->base.active || !pstate->visible)
> +	if (!cstate->base.active)
>  		return 0;
>  
>  	return ilk_wm_method2(ilk_pipe_pixel_rate(cstate),
>  			      cstate->base.adjusted_mode.crtc_htotal,
> -			      drm_rect_width(&pstate->dst),
> -			      bpp,
> -			      mem_value);
> +			      width, cpp, mem_value);
>  }
>  
>  /* Only for WM_LP. */

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-09  9:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  9:26 [PATCH] drm/i915: Pretend cursor is always on for ILK-style WM calculations Matt Roper
2016-02-01  9:47 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-02-01 14:22 ` [PATCH] " Ville Syrjälä
2016-02-01 14:43   ` Manfred G Kitzbichler
2016-02-02  3:31   ` Matt Roper
2016-02-02 16:30     ` Ville Syrjälä
2016-02-03  6:06       ` [PATCH] drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2) Matt Roper
2016-02-03 11:16         ` Ville Syrjälä
2016-02-03 14:05           ` Matt Roper
2016-02-11  8:50             ` Daniel Vetter
2016-02-11 15:12               ` Matt Roper
2016-02-08 19:05     ` Matt Roper
2016-02-09  9:36       ` Jani Nikula [this message]
2016-02-03  6:54 Matt Roper

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=87a8nady2w.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=drm-intel-fixes@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 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.