From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 10/12] drm/i915: Eliminate bigjoiner boolean
Date: Wed, 16 Feb 2022 13:04:25 +0200 [thread overview]
Message-ID: <YgzaOVz15qLUTd7g@intel.com> (raw)
In-Reply-To: <b713032b-2696-677f-d1a6-b3eece58b678@intel.com>
On Wed, Feb 16, 2022 at 04:27:49PM +0530, Nautiyal, Ankit K wrote:
>
> On 2/16/2022 12:02 AM, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Since we now have the bigjoiner_pipes bitmask the boolean
> > is redundant. Get rid of it.
> >
> > Also, populating bigjoiner_pipes already during
> > encoder->compute_config() allows us to use it much earlier
> > during the state calculation as well. The initial aim is
> > to use it in intel_crtc_compute_config().
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_cursor.c | 2 +-
> > drivers/gpu/drm/i915/display/intel_display.c | 50 ++++++++-----------
> > .../drm/i915/display/intel_display_debugfs.c | 2 +-
> > .../drm/i915/display/intel_display_types.h | 3 --
> > drivers/gpu/drm/i915/display/intel_dp.c | 13 ++---
> > drivers/gpu/drm/i915/display/intel_vdsc.c | 8 +--
> > .../drm/i915/display/skl_universal_plane.c | 2 +-
> > 7 files changed, 36 insertions(+), 44 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> > index 1f448f4e9aaf..da6cf0515164 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> > @@ -640,7 +640,7 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
> > * FIXME bigjoiner fastpath would be good
> > */
> > if (!crtc_state->hw.active || intel_crtc_needs_modeset(crtc_state) ||
> > - crtc_state->update_pipe || crtc_state->bigjoiner)
> > + crtc_state->update_pipe || crtc_state->bigjoiner_pipes)
> > goto slow;
> >
> > /*
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 47b5d8cc16fd..192474163edb 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -1926,7 +1926,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
> > if (drm_WARN_ON(&dev_priv->drm, crtc->active))
> > return;
> >
> > - if (!new_crtc_state->bigjoiner) {
> > + if (!new_crtc_state->bigjoiner_pipes) {
> > intel_encoders_pre_pll_enable(state, crtc);
> >
> > if (new_crtc_state->shared_dpll)
> > @@ -2727,7 +2727,7 @@ static void intel_crtc_compute_pixel_rate(struct intel_crtc_state *crtc_state)
> > static void intel_bigjoiner_adjust_timings(const struct intel_crtc_state *crtc_state,
> > struct drm_display_mode *mode)
> > {
> > - if (!crtc_state->bigjoiner)
> > + if (!crtc_state->bigjoiner_pipes)
> > return;
> >
> > mode->crtc_clock /= 2;
> > @@ -2811,7 +2811,7 @@ static void intel_bigjoiner_compute_pipe_src(struct intel_crtc_state *crtc_state
> > {
> > int width, height;
> >
> > - if (!crtc_state->bigjoiner)
> > + if (!crtc_state->bigjoiner_pipes)
> > return;
> >
> > width = drm_rect_width(&crtc_state->pipe_src);
> > @@ -4218,7 +4218,6 @@ static void intel_bigjoiner_get_config(struct intel_crtc_state *crtc_state)
> > if (((master_pipes | slave_pipes) & BIT(pipe)) == 0)
> > return;
> >
> > - crtc_state->bigjoiner = true;
> > crtc_state->bigjoiner_pipes =
> > BIT(get_bigjoiner_master_pipe(pipe, master_pipes, slave_pipes)) |
> > get_bigjoiner_slave_pipes(pipe, master_pipes, slave_pipes);
>
> Although not part of this patch, do we need to check if
> get_bigjoiner_master_pipe() does not give PIPE_INVALID?
>
> Perhaps in a case where master_pipe is read as 0 but some garbage for
> slave_pipes during readout?
>
> Should there be a check for INVALID_PIPE, before feeding into BIT() macro?
I think if we want to do more thourough validation against totally bogus
hardware programming then we should just do it once at the start.
enabled_bigjoiner_pipes() does have something, but it's only good for
the two joined pipes cases. Also it just warns and doesn't do anything
more than that atm. The simple option might be to make it just zero out
the masks entirely if they look totally bogus. The readout would then
be skipped for all slave pipes.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-02-16 11:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 18:31 [Intel-gfx] [PATCH 00/12] drm/i915: Move bigjoiner refactoring Ville Syrjala
2022-02-15 18:31 ` [Intel-gfx] [PATCH 01/12] drm/i915: Fix cursor coordinates on bigjoiner slave Ville Syrjala
2022-02-16 3:25 ` Navare, Manasi
2022-02-16 8:39 ` Ville Syrjälä
2022-02-16 19:23 ` Navare, Manasi
2022-02-15 18:31 ` [Intel-gfx] [PATCH 02/12] drm/i915: Remove nop bigjoiner state copy Ville Syrjala
2022-02-16 12:52 ` Nautiyal, Ankit K
2022-02-15 18:31 ` [Intel-gfx] [PATCH 03/12] drm/i915: Rename variables in intel_crtc_compute_config() Ville Syrjala
2022-02-16 19:26 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 04/12] drm/i915: Extract intel_splitter_adjust_timings() Ville Syrjala
2022-02-17 8:26 ` Jani Nikula
2022-02-15 18:32 ` [Intel-gfx] [PATCH 05/12] drm/i915: Extract intel_bigjoiner_adjust_timings() Ville Syrjala
2022-02-16 19:32 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 06/12] drm/i915: Extract intel_crtc_compute_pipe_src() Ville Syrjala
2022-02-16 19:35 ` Navare, Manasi
2022-02-16 19:44 ` Ville Syrjälä
2022-02-15 18:32 ` [Intel-gfx] [PATCH 07/12] drm/i915: Extract intel_crtc_compute_pipe_mode() Ville Syrjala
2022-02-16 19:37 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 08/12] drm/i915: Fix MSO vs. bigjoiner timings confusion Ville Syrjala
2022-02-16 19:50 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 09/12] drm/i915: Start tracking PIPESRC as a drm_rect Ville Syrjala
2022-02-16 11:38 ` Ville Syrjälä
2022-02-15 18:32 ` [Intel-gfx] [PATCH 10/12] drm/i915: Eliminate bigjoiner boolean Ville Syrjala
2022-02-16 10:57 ` Nautiyal, Ankit K
2022-02-16 11:04 ` Ville Syrjälä [this message]
2022-02-16 11:23 ` Nautiyal, Ankit K
2022-02-16 21:25 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 11/12] drm/i915: Use bigjoiner_pipes more Ville Syrjala
2022-02-16 12:27 ` Nautiyal, Ankit K
2022-02-16 12:35 ` Ville Syrjälä
2022-02-16 21:26 ` Navare, Manasi
2022-02-15 18:32 ` [Intel-gfx] [PATCH 12/12] drm/i915: Make the PIPESC rect relative to the entire bigjoiner area Ville Syrjala
2022-02-17 1:06 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Move bigjoiner refactoring Patchwork
2022-02-17 10:29 ` Ville Syrjälä
2022-02-17 10:17 ` [Intel-gfx] [PATCH 00/12] " Nautiyal, Ankit K
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=YgzaOVz15qLUTd7g@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox