From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/9] drm/i915/pfit: Reject pfit downscaling for GMCH platforms
Date: Tue, 22 Oct 2024 11:25:14 +0300 [thread overview]
Message-ID: <87jze0wnmd.fsf@intel.com> (raw)
In-Reply-To: <20241016143134.26903-4-ville.syrjala@linux.intel.com>
On Wed, 16 Oct 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Gen2/3 pfit doesn't support downscaling at all, so reject it.
>
> On i965+ downscaling is supported by the hardware (max scale
> factor < 2.0), but as downscaling increases the effective
> pixel rate we can't safely allow it unless
> intel_crtc_compute_pixel_rate() gets fixed. Probably the
> best solution would be to calculate (at least an
> apporiximate) pfit destination window and use
> ilk_pipe_pixel_rate() for all platforms. For now reject
> downscaling on all gmch platforms.
>
> The intel ddx has a similar check for this in userspace,
> modesetting ddx does not. And presumably wayland compositors
> also do not make such assumptions in userspace.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index fb7def772376..89cac3b3fd02 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -681,6 +681,7 @@ static void i9xx_scale_aspect(struct intel_crtc_state *crtc_state,
> static int gmch_panel_fitting(struct intel_crtc_state *crtc_state,
> const struct drm_connector_state *conn_state)
> {
> + struct intel_display *display = to_intel_display(crtc_state);
> struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0;
> @@ -693,6 +694,25 @@ static int gmch_panel_fitting(struct intel_crtc_state *crtc_state,
> adjusted_mode->crtc_vdisplay == pipe_src_h)
> goto out;
>
> + /*
> + * TODO: implement downscaling for i965+. Need to account
> + * for downscaling in intel_crtc_compute_pixel_rate().
> + */
> + if (adjusted_mode->crtc_hdisplay < pipe_src_w) {
> + drm_dbg_kms(display->drm,
> + "[CRTC:%d:%s] pfit horizontal downscaling (%d->%d) not supported\n",
> + crtc->base.base.id, crtc->base.name,
> + pipe_src_w, adjusted_mode->crtc_hdisplay);
> + return -EINVAL;
> + }
> + if (adjusted_mode->crtc_vdisplay < pipe_src_h) {
> + drm_dbg_kms(display->drm,
> + "[CRTC:%d:%s] pfit vertical downscaling (%d->%d) not supported\n",
> + crtc->base.base.id, crtc->base.name,
> + pipe_src_h, adjusted_mode->crtc_vdisplay);
> + return -EINVAL;
> + }
> +
> switch (conn_state->scaling_mode) {
> case DRM_MODE_SCALE_CENTER:
> /*
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-10-22 8:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 14:31 [PATCH 0/9] drm/i915/pfit: Panel fitter stuff Ville Syrjala
2024-10-16 14:31 ` [PATCH 1/9] drm/i915/pfit: Check pipe source size against pfit limits on ILK-BDW Ville Syrjala
2024-10-22 8:24 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 2/9] drm/i915/pfit: Check pfit scaling factors " Ville Syrjala
2024-10-22 8:24 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 3/9] drm/i915/pfit: Reject pfit downscaling for GMCH platforms Ville Syrjala
2024-10-22 8:25 ` Jani Nikula [this message]
2024-10-16 14:31 ` [PATCH 4/9] drm/i915/pfit: Check pfit minimum timings in pre-SKL Ville Syrjala
2024-10-22 8:25 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 5/9] drm/i915/pfit: Reject cloning when using pfit on ILK-BDW Ville Syrjala
2024-10-22 8:25 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 6/9] drm/i915/pfit: Check pfit destination window " Ville Syrjala
2024-10-22 8:26 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 7/9] drm/i915/panel: Convert panel code to intel_display Ville Syrjala
2024-10-22 8:26 ` Jani Nikula
2024-10-16 14:31 ` [PATCH 8/9] drm/i915/pfit: Extract intel_pfit.c Ville Syrjala
2024-10-22 8:31 ` Jani Nikula
2024-10-23 15:38 ` Ville Syrjälä
2024-10-16 14:31 ` [PATCH 9/9] drm/i915: Remove ckey/format checks from skl_update_scaler_plane() Ville Syrjala
2024-10-22 9:04 ` Jani Nikula
2024-10-16 19:58 ` ✓ Fi.CI.BAT: success for drm/i915/pfit: Panel fitter stuff Patchwork
2024-10-16 19:59 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2024-10-16 19:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-16 22:16 ` ✗ Fi.CI.IGT: 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=87jze0wnmd.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.