Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v6] drm/i915: Use intel_plane_data_rate for min_cdclk calculation
Date: Mon, 2 Mar 2020 19:34:53 +0200	[thread overview]
Message-ID: <20200302173453.GO13686@intel.com> (raw)
In-Reply-To: <20200227150935.2107-1-stanislav.lisovskiy@intel.com>

On Thu, Feb 27, 2020 at 05:09:35PM +0200, Stanislav Lisovskiy wrote:
> There seems to be a bit of confusing redundancy in a way, how
> plane data rate/min cdclk are calculated.
> In fact both min cdclk, pixel rate and plane data rate are all
> part of the same formula as per BSpec.
> 
> However currently we have intel_plane_data_rate, which is used
> to calculate plane data rate and which is also used in bandwidth
> calculations. However for calculating min_cdclk we have another
> piece of code, doing almost same calculation, but a bit differently
> and in a different place. However as both are actually part of same
> formula, probably would be wise to use plane data rate calculations
> as a basis anyway, thus avoiding code duplication and possible bugs
> related to this.
> 
> Another thing is that I've noticed that during min_cdclk calculations
> we account for plane scaling, while for plane data rate, we don't.
> crtc->pixel_rate seems to account only for pipe ratio, however it is
> clearly stated in BSpec that plane data rate also need to account
> plane ratio as well.
> 
> So what this commit does is:
> - Adds a plane ratio calculation to intel_plane_data_rate
> - Removes redundant calculations from skl_plane_min_cdclk which is
>   used for gen9+ and now uses intel_plane_data_rate as a basis from
>   there as well.
> 
> v2: - Don't use 64 division if not needed(Ville Syrjälä)
>     - Now use intel_plane_pixel_rate as a basis for calculations both
>       at intel_plane_data_rate and skl_plane_min_cdclk(Ville Syrjälä)
> 
> v3: - Again fix the division macro
>     - Fix plane_pixel_rate to pixel_rate at intel_plane_pixel_rate
>       callsites
> 
> v4: - Renamed skl_plane_ratio function back(Ville Syrjälä)
> 
> v5: - Don't precalculate plane pixel rate for invisible plane,
>       check for visibility first, as in invisible case it will
>       have dst_w and dst_h equal to zero, causing divide error.
> 
> v6: - Removed useless warn in intel_plane_pixel_rate(Ville Syrjälä)
>     - Fixed alignment in intel_plane_data_rate(Ville Syrjälä)
>     - Changed pixel_rate type to be unsigned int in
>       skl_plane_min_cdclk(Ville Syrjälä)
> 
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

Thanks. Pushed to dinq.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2020-03-02 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 15:09 [Intel-gfx] [PATCH v6] drm/i915: Use intel_plane_data_rate for min_cdclk calculation Stanislav Lisovskiy
2020-02-27 19:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use intel_plane_data_rate for min_cdclk calculation (rev6) Patchwork
2020-02-28 23:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-01 16:12   ` Lisovskiy, Stanislav
2020-03-01 21:47     ` Vudum, Lakshminarayana
2020-03-01 20:26 ` Patchwork
2020-03-01 21:40 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2020-03-02 17:34 ` Ville Syrjälä [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=20200302173453.GO13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=stanislav.lisovskiy@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