From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
suraj.kandpal@intel.com
Subject: Re: [PATCH 12/17] drm/i915/dp: Simplify the helper get_max_compressed_bpp_with_joiner
Date: Fri, 27 Sep 2024 15:38:08 +0300 [thread overview]
Message-ID: <ZvanMCSvAJeHLYzJ@intel.com> (raw)
In-Reply-To: <ZvaloashpyPaS1CL@intel.com>
On Fri, Sep 27, 2024 at 03:31:29PM +0300, Ville Syrjälä wrote:
> On Fri, Sep 27, 2024 at 02:08:26PM +0530, Ankit Nautiyal wrote:
> > Streamline the helper to get max compressed bpp for joiner case, to
> > effectively use num of pipes joined. This will make the addition of
> > ultrajoiner limitations easier and improve redability.
> >
> > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_dp.c | 20 ++++++++------------
> > 1 file changed, 8 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 7db037f631f7..e7fe100ef8db 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -882,7 +882,8 @@ static u32 bigjoiner_bw_max_bpp(struct intel_display *display, u32 mode_clock,
> > return max_bpp;
> > }
> >
> > -static u32 small_joiner_ram_max_bpp(struct intel_display *display, u32 mode_hdisplay)
> > +static u32 small_joiner_ram_max_bpp(struct intel_display *display, u32 mode_hdisplay,
> > + int num_joined_pipes)
> > {
> > struct drm_i915_private *i915 = to_i915(display->drm);
> > u32 max_bpp;
> > @@ -890,6 +891,8 @@ static u32 small_joiner_ram_max_bpp(struct intel_display *display, u32 mode_hdis
> > /* Small Joiner Check: output bpp <= joiner RAM (bits) / Horiz. width */
> > max_bpp = small_joiner_ram_size_bits(i915) / mode_hdisplay;
> >
> > + max_bpp *= num_joined_pipes;
> > +
>
> lgtm, with the caveat that this part needs a bit of adjustment
> after the *=2 gets moved here when respinning the previous patch.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> > return max_bpp;
> > }
> >
> > @@ -899,19 +902,12 @@ u32 get_max_compressed_bpp_with_joiner(struct drm_i915_private *i915,
> > int num_joined_pipes)
> > {
> > struct intel_display *display = to_intel_display(&i915->drm);
> > - u32 max_bpp_small_joiner_ram;
> > -
> > - max_bpp_small_joiner_ram = small_joiner_ram_max_bpp(display, mode_hdisplay);
> > -
> > - if (num_joined_pipes == 2) {
> > - u32 max_bpp_bigjoiner = bigjoiner_bw_max_bpp(display, mode_clock, num_joined_pipes);
> > -
> > - max_bpp_small_joiner_ram *= 2;
> > + u32 max_bpp;
> >
> > - return min(max_bpp_small_joiner_ram, max_bpp_bigjoiner);
> > - }
> > + max_bpp = small_joiner_ram_max_bpp(display, mode_hdisplay, num_joined_pipes);
> > + max_bpp = min(max_bpp, bigjoiner_bw_max_bpp(display, mode_clock, num_joined_pipes));
Actually, this isn't quite right. We now call bigjoiner_bw_max_bpp()
unconditioanlly (which I kinda do like), but it doesn't handle the
num_joined_pipes==1 case.
Hmm, the fact that we use min() on these makes it a bit more awkward to
handle it all in there. We'd probably have to return <TYPE>_MAX from
there to make sure the min() ignores it.
The alternative is to call these conditionally based on
num_joined_pipes. I suppose that's not all that terrible.
> >
> > - return max_bpp_small_joiner_ram;
> > + return max_bpp;
> > }
> >
> > u16 intel_dp_dsc_get_max_compressed_bpp(struct drm_i915_private *i915,
> > --
> > 2.45.2
>
> --
> Ville Syrjälä
> Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-09-27 12:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 8:38 [PATCH 00/17] Ultrajoiner basic functionality series Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 01/17] drm/i915/display_device: Add Check HAS_DSC for bigjoiner Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 02/17] drm/i915/display_debugfs: Allow force joiner only if supported Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 03/17] drm/i915/display: Modify debugfs for joiner to force n pipes Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 04/17] drm/i915/dp: Add helper to compute num pipes required Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 05/17] drm/i915: Split current joiner hw state readout Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 06/17] drm/i915: Add bigjoiner and uncompressed joiner hw readout sanity checks Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 07/17] drm/i915/display: Add macro HAS_ULTRAJOINER() Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 08/17] drm/i915/display: Refactor enable_joiner_pipes Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 09/17] drm/i915: Implement hw state readout and checks for ultrajoiner Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 10/17] drm/i915/display/vdsc: Add ultrajoiner support with DSC Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 11/17] drm/i915/dp: Refactor joiner max_bpp calculations into separate functions Ankit Nautiyal
2024-09-27 12:27 ` Ville Syrjälä
2024-09-27 8:38 ` [PATCH 12/17] drm/i915/dp: Simplify the helper get_max_compressed_bpp_with_joiner Ankit Nautiyal
2024-09-27 12:31 ` Ville Syrjälä
2024-09-27 12:38 ` Ville Syrjälä [this message]
2024-09-27 8:38 ` [PATCH 13/17] drm/i915/dp: Modify compressed bpp limitations for ultrajoiner Ankit Nautiyal
2024-09-27 10:39 ` Nautiyal, Ankit K
2024-09-27 12:41 ` Ville Syrjälä
2024-09-27 8:38 ` [PATCH 14/17] drm/i915/dp: Simplify helper to get slice count with joiner Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 15/17] drm/i915: Compute config and mode valid changes for ultrajoiner Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 16/17] drm/i915/display: Consider ultrajoiner for computing maxdotclock Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 17/17] drm/i915/intel_dp: Add support for forcing ultrajoiner Ankit Nautiyal
2024-09-27 8:43 ` ✓ CI.Patch_applied: success for Ultrajoiner basic functionality series (rev5) Patchwork
2024-09-27 8:43 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-27 8:45 ` ✓ CI.KUnit: success " Patchwork
2024-09-27 8:56 ` ✓ CI.Build: " Patchwork
2024-09-27 8:58 ` ✓ CI.Hooks: " Patchwork
2024-09-27 9:00 ` ✗ CI.checksparse: warning " Patchwork
2024-09-27 9:17 ` ✓ CI.BAT: success " Patchwork
2024-09-28 3:58 ` ✗ CI.FULL: failure " Patchwork
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=ZvanMCSvAJeHLYzJ@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@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