All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Shobhit Kumar <shobhit.kumar@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915/skl+: Use scaling amount for plane data rate calculation
Date: Thu, 14 Jan 2016 17:15:26 -0800	[thread overview]
Message-ID: <20160115011526.GE13799@intel.com> (raw)
In-Reply-To: <1452772968-24772-6-git-send-email-shobhit.kumar@intel.com>

On Thu, Jan 14, 2016 at 05:32:46PM +0530, Shobhit Kumar wrote:
> From: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
> 
> Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ffcc56a..dc08494 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2978,6 +2978,8 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
>  	struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
>  	struct intel_plane_state *intel_pstate = to_intel_plane_state(pstate);
>  	struct drm_framebuffer *fb = pstate->fb;
> +	struct intel_plane *intel_plane = to_intel_plane(pstate->plane);
> +	uint32_t down_scale_amount, data_rate;
>  	uint32_t width = 0, height = 0;
>  
>  	if (drm_rect_width(&intel_pstate->src)) {
> @@ -2994,15 +2996,19 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
>  	/* for planar format */
>  	if (fb->pixel_format == DRM_FORMAT_NV12) {
>  		if (y)  /* y-plane data rate */
> -			return width * height *
> +			data_rate = width * height *
>  				drm_format_plane_cpp(fb->pixel_format, 0);
>  		else    /* uv-plane data rate */
> -			return (width / 2) * (height / 2) *
> +			data_rate = (width / 2) * (height / 2) *
>  				drm_format_plane_cpp(fb->pixel_format, 1);
>  	}
>  
>  	/* for packed formats */
> -	return width * height * drm_format_plane_cpp(fb->pixel_format, 0);
> +	data_rate = width * height * drm_format_plane_cpp(fb->pixel_format, 0);

This needs to be moved into an 'else' block now, otherwise you'll
clobber the NV12 values you calculated above.


Matt

> +	down_scale_amount = skl_plane_downscale_amount(intel_plane);
> +
> +	return DIV_ROUND_UP((data_rate * down_scale_amount), 1000);
> +
>  }
>  
>  /*
> -- 
> 2.4.3
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-15  1:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 12:02 [PATCH 0/7] Misc WM fixes and Arbitrated Display Bandwidth WA for SKL Shobhit Kumar
2016-01-14 12:02 ` [PATCH 1/7] drm/i915/skl+: Use proper bytes_per_pixel during WM calculation Shobhit Kumar
2016-01-14 19:07   ` Matt Roper
2016-01-19  9:56     ` Kumar, Shobhit
2016-01-14 12:02 ` [PATCH 2/7] drm/i915/skl+: Use fb size for relative data rate calculation Shobhit Kumar
2016-01-15  0:16   ` Matt Roper
2016-01-14 12:02 ` [PATCH 3/7] drm/i915/skl+: calculate ddb minimum allocation Shobhit Kumar
2016-01-15  0:39   ` Matt Roper
2016-01-14 12:02 ` [PATCH 4/7] drm/i915/skl+: calculate plane pixel rate Shobhit Kumar
2016-01-15  0:57   ` Matt Roper
2016-01-14 12:02 ` [PATCH 5/7] drm/i915/skl+: Use scaling amount for plane data rate calculation Shobhit Kumar
2016-01-15  1:15   ` Matt Roper [this message]
2016-01-14 12:02 ` [PATCH 6/7] drm/i915: Add support to parse DMI table and get platform memory info Shobhit Kumar
2016-01-15  1:44   ` Matt Roper
2016-01-27 16:04     ` Kumar, Shobhit
2016-01-14 12:02 ` [PATCH 7/7] drm/i915/skl: WA for watermark calculation based on Arbitrated Display BW Shobhit Kumar
2016-01-14 15:30   ` kbuild test robot
2016-01-14 17:35     ` Damien Lespiau
2016-01-14 17:25   ` kbuild test robot
2016-01-14 13:20 ` ✗ warning: Fi.CI.BAT Patchwork
2016-01-15  1:48 ` [PATCH 0/7] Misc WM fixes and Arbitrated Display Bandwidth WA for SKL Matt Roper
2016-01-15  5:02   ` Kumar, Shobhit
2016-01-25  4:48     ` Shobhit Kumar

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=20160115011526.GE13799@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shobhit.kumar@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.