Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: nemesa.garg@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Start using plane scale factor for relative data rate
Date: Thu, 20 Jul 2023 11:02:16 +0300	[thread overview]
Message-ID: <ZLjqCK7Elh661Da0@intel.com> (raw)
In-Reply-To: <20230719104833.25366-1-stanislav.lisovskiy@intel.com>

On Wed, Jul 19, 2023 at 01:48:33PM +0300, Stanislav Lisovskiy wrote:
> BSpec clearly instructs us to use plane scale factor when calculating
> relative data rate to be used when allocating DDB blocks for each plane.
> For some reason we use scale factor for data_rate calculation, which is
> used for BW calculations, however we are not using it for DDB calculations.
> So lets fix it as described in BSpec 68907.
> 
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_atomic_plane.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 7d9578ebae556..60a492e186ab8 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -212,6 +212,7 @@ intel_plane_relative_data_rate(const struct intel_crtc_state *crtc_state,
>  	struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
>  	const struct drm_framebuffer *fb = plane_state->hw.fb;
>  	int width, height;
> +	unsigned int rel_data_rate;
>  
>  	if (plane->id == PLANE_CURSOR)
>  		return 0;
> @@ -241,7 +242,11 @@ intel_plane_relative_data_rate(const struct intel_crtc_state *crtc_state,
>  		height /= 2;
>  	}
>  
> -	return width * height * fb->format->cpp[color_plane];
> +	rel_data_rate = width * height * fb->format->cpp[color_plane];
> +
> +	return intel_adjusted_rate(&plane_state->uapi.src,
> +				   &plane_state->uapi.dst,
> +				   rel_data_rate);
>  }
>  
>  int intel_plane_calc_min_cdclk(struct intel_atomic_state *state,
> -- 
> 2.37.3
> 

IGT failures are irrelevant here(test is aborted due to some timeout issue).



  parent reply	other threads:[~2023-07-20  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 10:48 [Intel-gfx] [PATCH] drm/i915: Start using plane scale factor for relative data rate Stanislav Lisovskiy
2023-07-19 10:56 ` Garg, Nemesa
2023-07-19 13:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Start using plane scale factor for relative data rate (rev3) Patchwork
2023-07-19 16:20 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-20  8:02 ` Lisovskiy, Stanislav [this message]
2023-08-11  9:18   ` [Intel-gfx] [PATCH] drm/i915: Start using plane scale factor for relative data rate Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2023-07-14 12:34 Stanislav Lisovskiy

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=ZLjqCK7Elh661Da0@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nemesa.garg@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