All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Purushothaman, Vijay A" <vijay.a.purushothaman@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 10/12] drm/i915: Support maxfifo with two planes on CHV
Date: Wed, 04 Mar 2015 19:34:50 +0530	[thread overview]
Message-ID: <54F71102.4020506@linux.intel.com> (raw)
In-Reply-To: <1423574909-1074-11-git-send-email-ville.syrjala@linux.intel.com>

On 2/10/2015 6:58 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> CHV supposedly does maxfifo mode even with two enabled
> (primary/sprite) planes. Lets try to support that by halving the FIFO
> size for the calculations and picking the smallest calculcated
> watermark from the enabled planes.
Where is this mentioned in the spec? My understanding is MaxFIFO can be 
enabled when only one plane is active (either ARGB or YUV). I do 
remember some TR task that was talking about enabling MaxFIFO for two 
planes. But i didn't get any confirmation that this can be enabled. We 
have not enabled this for CHT in any other OS (Windows / Android).

Other features like PM2 / PM5 / DVFS can be enabled for multi plane 
scenarios

Thanks,
Vijay
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_pm.c | 22 +++++++++++++++++-----
>   1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index d29c02c..e6cbc24 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -907,6 +907,8 @@ static bool vlv_compute_sr_wm(struct drm_device *dev,
>   	int num_planes = 0;
>   	int fifo_size = 0;
>   	struct intel_plane *plane;
> +	/* CHV supports max fifo with two planes (1:1 split) */
> +	int max_planes = IS_CHERRYVIEW(dev) ? 2 : 1;
>   
>   	wm->sr.cursor = wm->sr.plane = 0;
>   
> @@ -920,23 +922,33 @@ static bool vlv_compute_sr_wm(struct drm_device *dev,
>   		fifo_size = INTEL_INFO(dev_priv)->num_pipes * 512 - 1;
>   	}
>   
> -	if (fifo_size == 0 || num_planes > 1)
> +	if (fifo_size == 0 || num_planes > max_planes)
>   		return false;
>   
> +	if (num_planes)
> +		fifo_size /= num_planes;
> +
>   	wm->sr.cursor = vlv_compute_wm(to_intel_crtc(crtc),
>   				       to_intel_plane(crtc->cursor), 0x3f);
>   
>   	list_for_each_entry(plane, &dev->mode_config.plane_list, base.head) {
> +		uint16_t sr_wm;
> +
>   		if (plane->base.type == DRM_PLANE_TYPE_CURSOR)
>   			continue;
>   
>   		if (plane->pipe != pipe)
>   			continue;
>   
> -		wm->sr.plane = vlv_compute_wm(to_intel_crtc(crtc),
> -					      plane, fifo_size);
> -		if (wm->sr.plane != 0)
> -			break;
> +		sr_wm = vlv_compute_wm(to_intel_crtc(crtc),
> +				       plane, fifo_size);
> +		if (sr_wm == 0)
> +			continue;
> +
> +		if (wm->sr.plane == 0)
> +			wm->sr.plane = sr_wm;
> +		else
> +			wm->sr.plane = min(wm->sr.plane, sr_wm);
>   	}
>   
>   	return true;

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

  reply	other threads:[~2015-03-04 14:04 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 13:28 [PATCH 00/12] drm/i915: Redo VLV/CHV watermark code ville.syrjala
2015-02-10 13:28 ` [PATCH 01/12] drm/i915: Reduce CHV DDL multiplier to 16/8 ville.syrjala
2015-02-27 17:36   ` Jesse Barnes
2015-02-27 18:02     ` Ville Syrjälä
     [not found]   ` <54F42A58.1020103@linux.intel.com>
2015-03-02  9:36     ` Arun R Murthy
2015-02-10 13:28 ` [PATCH 02/12] drm/i915: Kill DRAIN_LATENCY_PRECISION_* defines ville.syrjala
2015-02-27 17:38   ` Jesse Barnes
2015-02-27 18:06     ` Ville Syrjälä
2015-02-10 13:28 ` [PATCH 03/12] drm/i915: Simplify VLV drain latency computation ville.syrjala
2015-02-27 17:40   ` Jesse Barnes
2015-02-10 13:28 ` [PATCH 04/12] drm/i915: Hide VLV DDL precision handling ville.syrjala
2015-02-27 17:46   ` Jesse Barnes
2015-02-10 13:28 ` [PATCH 05/12] drm/i915: Reorganize VLV DDL setup ville.syrjala
2015-02-27 17:52   ` Jesse Barnes
2015-02-10 13:28 ` [PATCH 06/12] drm/i915: Pass plane to vlv_compute_drain_latency() ville.syrjala
2015-02-27 17:57   ` Jesse Barnes
2015-02-27 18:09     ` Ville Syrjälä
2015-02-27 20:37       ` Jesse Barnes
2015-03-02 14:44       ` Daniel Vetter
2015-03-02 14:49         ` Ville Syrjälä
2015-03-02 17:18           ` Daniel Vetter
2015-02-10 13:28 ` [PATCH 07/12] drm/i915: Read out display FIFO size on VLV/CHV ville.syrjala
2015-02-12 18:59   ` [PATCH v2 " ville.syrjala
2015-02-27 18:04     ` Jesse Barnes
2015-02-10 13:28 ` [PATCH 08/12] drm/i915: Make sure PND deadline mode is enabled " ville.syrjala
2015-02-27 20:38   ` Jesse Barnes
2015-02-27 20:48     ` Ville Syrjälä
2015-02-10 13:28 ` [PATCH 09/12] drm/i915: Rewrite VLV/CHV watermark code ville.syrjala
2015-03-05 17:22   ` Ville Syrjälä
2015-02-10 13:28 ` [PATCH 10/12] drm/i915: Support maxfifo with two planes on CHV ville.syrjala
2015-03-04 14:04   ` Purushothaman, Vijay A [this message]
2015-03-04 14:50     ` Ville Syrjälä
2015-02-10 13:28 ` [PATCH 11/12] drm/i915: Program PFI credits for VLV ville.syrjala
2015-03-04 14:25   ` Purushothaman, Vijay A
2015-03-04 15:06     ` Ville Syrjälä
2015-03-04 15:26     ` Ville Syrjälä
2015-02-10 13:28 ` [PATCH 12/12] drm/i915: Enable the maxfifo PM5 mode when appropriate on CHV ville.syrjala
2015-02-11  0:01   ` shuang.he
2015-02-26 19:01   ` [PATCH v2 " ville.syrjala
2015-03-04 14:28   ` [PATCH " Purushothaman, Vijay A
2015-03-04 15:07     ` Ville Syrjälä

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=54F71102.4020506@linux.intel.com \
    --to=vijay.a.purushothaman@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.