From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 3/3] drm/i915/display: Call panel_fitting from pipe_config
Date: Wed, 25 Sep 2024 23:36:02 +0300 [thread overview]
Message-ID: <ZvR0Mgfo84shEtL8@intel.com> (raw)
In-Reply-To: <20240925063032.2311796-4-nemesa.garg@intel.com>
On Wed, Sep 25, 2024 at 12:00:32PM +0530, Nemesa Garg wrote:
> In panel fitter/pipe scaler scenario the pch_pfit configuration
> currently takes place before accounting for pipe_src width for
> joiner. This causes issue when pch_pfit and joiner get enabled
> together. Call panel_fitting from pipe_config once pipe src is
> computed.
>
> v4: Remove need_joiner flag [Ville]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index b4ef4d59da1a..0148939caaaa 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4653,6 +4653,8 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
> intel_atomic_get_new_crtc_state(state, crtc);
> struct drm_connector *connector;
> struct drm_connector_state *connector_state;
> + const struct drm_display_mode *fixed_mode;
> + struct intel_dp *intel_dp;
> int pipe_src_w, pipe_src_h;
> int base_bpp, ret, i;
>
> @@ -4774,6 +4776,24 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
> return ret;
> }
>
> + for_each_new_connector_in_state(&state->base, connector,
> + connector_state, i) {
> + struct intel_encoder *encoder =
> + to_intel_encoder(connector_state->best_encoder);
> +
> + if (connector_state->crtc != &crtc->base)
> + continue;
> +
> + intel_dp = enc_to_intel_dp(encoder);
> +
> + if (!intel_dp)
> + continue;
> +
> + if ((intel_dp_is_edp(intel_dp) && fixed_mode) ||
> + crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
We don't need those checks, but we do need a !gmch check.
> + return intel_pch_panel_fitting(crtc_state, connector_state);
That unconditional return should not be here as we'll
now skip the rest of the function.
The connector_state requirement is a bit unfortunate. Not sure
if we should hide this all in the pfit code or not. Hmm, and
when we introduce the TV margin properties those too will have
to come from the connector state. I guess keeping the loop
in the caller is easier for now at least.
But this is the wrong place to do this all. It needs to be
done between intel_crtc_compute_pipe_mode() and
intel_crtc_compute_pixel_rate(). I would stash it all inside
some kind of intel_crtc_compute_pfit() function so as to
not pollute intel_crtc_compute_config() too badly.
> + }
> +
> /* Dithering seems to not pass-through bits correctly when it should, so
> * only enable it on 6bpc panels and when its not a compliance
> * test requesting 6bpc video pattern.
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-09-25 20:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 6:30 [PATCH 0/3] Consider joiner calculation for panel fitting Nemesa Garg
2024-09-25 6:30 ` [PATCH 1/3] drm/i915/display: Modify panel_fitting code for joiner Nemesa Garg
2024-09-25 9:11 ` Jani Nikula
2024-09-25 12:30 ` Garg, Nemesa
2024-09-25 20:13 ` Ville Syrjälä
2024-09-25 6:30 ` [PATCH 2/3] drm/i915/display: Add gmch_panel_fitting in all encoders Nemesa Garg
2024-09-25 9:12 ` Jani Nikula
2024-09-25 12:28 ` Garg, Nemesa
2024-09-25 20:21 ` Ville Syrjälä
2024-09-25 6:30 ` [PATCH v4 3/3] drm/i915/display: Call panel_fitting from pipe_config Nemesa Garg
2024-09-25 19:22 ` kernel test robot
2024-09-25 20:36 ` Ville Syrjälä [this message]
2024-10-01 7:10 ` Dan Carpenter
2024-09-27 1:02 ` ✗ Fi.CI.SPARSE: warning for Consider joiner calculation for panel fitting (rev4) Patchwork
2024-09-27 1:11 ` ✗ Fi.CI.BAT: 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=ZvR0Mgfo84shEtL8@intel.com \
--to=ville.syrjala@linux.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