From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 04/20] drm/i915/fbc: Extract intel_fbc_max_plane_size()
Date: Tue, 9 Jul 2024 15:51:09 -0400 [thread overview]
Message-ID: <Zo2UrXsfVkzOZEpv@intel.com> (raw)
In-Reply-To: <20240705145254.3355-5-ville.syrjala@linux.intel.com>
On Fri, Jul 05, 2024 at 05:52:38PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Extract intel_fbc_max_plane_size() from intel_fbc_plane_size_valid().
> We'll have another use for this soon in determining how much stolen
> memory we'd like to keep reserved for FBC.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fbc.c | 29 +++++++++++++++---------
> 1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 8f3b8f2cbf7b..08a431cfbbb3 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1110,25 +1110,32 @@ static bool intel_fbc_hw_tracking_covers_screen(const struct intel_plane_state *
> return effective_w <= max_w && effective_h <= max_h;
> }
>
> -static bool intel_fbc_plane_size_valid(const struct intel_plane_state *plane_state)
> +static void intel_fbc_max_plane_size(struct intel_display *display,
> + unsigned int *w, unsigned int *h)
> {
> - struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
> struct drm_i915_private *i915 = to_i915(display->drm);
> - unsigned int w, h, max_w, max_h;
>
> if (DISPLAY_VER(display) >= 10) {
> - max_w = 5120;
> - max_h = 4096;
> + *w = 5120;
> + *h = 4096;
> } else if (DISPLAY_VER(display) >= 8 || IS_HASWELL(i915)) {
> - max_w = 4096;
> - max_h = 4096;
> + *w = 4096;
> + *h = 4096;
> } else if (IS_G4X(i915) || DISPLAY_VER(display) >= 5) {
> - max_w = 4096;
> - max_h = 2048;
> + *w = 4096;
> + *h = 2048;
> } else {
> - max_w = 2048;
> - max_h = 1536;
> + *w = 2048;
> + *h = 1536;
> }
> +}
> +
> +static bool intel_fbc_plane_size_valid(const struct intel_plane_state *plane_state)
> +{
> + struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
> + unsigned int w, h, max_w, max_h;
> +
> + intel_fbc_max_plane_size(display, &max_w, &max_h);
>
> w = drm_rect_width(&plane_state->uapi.src) >> 16;
> h = drm_rect_height(&plane_state->uapi.src) >> 16;
> --
> 2.44.2
>
next prev parent reply other threads:[~2024-07-09 19:51 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 14:52 [PATCH 00/20] drm/{i915, xe}: FBC cleanups + tweak fbdev stolen usage Ville Syrjala
2024-07-05 14:52 ` [PATCH 01/20] drm/i915/fbc: Extract intel_fbc_has_fences() Ville Syrjala
2024-07-09 19:46 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 02/20] drm/i915/fbc: Convert to intel_display, mostly Ville Syrjala
2024-07-09 19:49 ` Rodrigo Vivi
2024-07-12 21:38 ` Ville Syrjälä
2024-07-05 14:52 ` [PATCH 03/20] drm/i915/fbc: s/_intel_fbc_cfb_stride()/intel_fbc_plane_cfb_stride()/ Ville Syrjala
2024-07-09 19:50 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 04/20] drm/i915/fbc: Extract intel_fbc_max_plane_size() Ville Syrjala
2024-07-09 19:51 ` Rodrigo Vivi [this message]
2024-07-05 14:52 ` [PATCH 05/20] drm/i915/fbc: Extract intel_fbc_max_surface_size() Ville Syrjala
2024-07-09 19:51 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 06/20] drm/i915/fbc: s/intel_fbc_hw_tracking_covers_screen()/intel_fbc_surface_size_ok()/ Ville Syrjala
2024-07-09 19:52 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 07/20] drm/i915/fbc: Adjust g4x+ platform checks Ville Syrjala
2024-07-09 19:54 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 08/20] drm/i915/fbc: Extract _intel_fbc_cfb_stride() Ville Syrjala
2024-07-10 8:01 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 09/20] drm/i915/fbc: s/lines/height/ Ville Syrjala
2024-07-09 20:00 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 10/20] drm/i915/fbc: Reoder CFB max height platform checks Ville Syrjala
2024-07-09 20:00 ` Rodrigo Vivi
2024-07-05 14:52 ` [PATCH 11/20] drm/i915/fbc: Extract intel_fbc_max_cfb_height() Ville Syrjala
2024-07-10 8:26 ` Shankar, Uma
2024-07-12 21:34 ` Ville Syrjälä
2024-07-05 14:52 ` [PATCH 12/20] drm/i915/fbc: Extract _intel_fbc_cfb_size() Ville Syrjala
2024-07-10 8:28 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 13/20] drm/i915/fbc: Extract intel_fbc_cfb_cpp() Ville Syrjala
2024-07-10 8:30 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 14/20] drm/i915/fbc: Introduce intel_fbc_preferred_cfb_size() Ville Syrjala
2024-07-10 8:36 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 15/20] drm/xe/fbdev: Fix BIOS FB vs.s stolen size checke Ville Syrjala
2024-07-10 8:42 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 16/20] drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen() Ville Syrjala
2024-07-06 12:06 ` kernel test robot
2024-07-09 20:28 ` Lucas De Marchi
2024-07-10 11:47 ` Ville Syrjälä
2024-07-10 8:51 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 17/20] drm/xe/fbdev: " Ville Syrjala
2024-07-10 8:58 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 18/20] drm/xe/fbdev: Use the same logic for fbdev stolen takever and fresh allocation Ville Syrjala
2024-07-10 9:08 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 19/20] drm/i915/fbdev: Adjust fbdev stolen mem usage heuristic Ville Syrjala
2024-07-10 9:11 ` Shankar, Uma
2024-07-05 14:52 ` [PATCH 20/20] drm/xe/fbdev: " Ville Syrjala
2024-07-10 9:12 ` Shankar, Uma
2024-07-05 14:58 ` ✓ CI.Patch_applied: success for drm/{i915, xe}: FBC cleanups + tweak fbdev stolen usage Patchwork
2024-07-05 14:58 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-05 15:00 ` ✓ CI.KUnit: success " Patchwork
2024-07-05 15:12 ` ✓ CI.Build: " Patchwork
2024-07-05 15:14 ` ✓ CI.Hooks: " Patchwork
2024-07-05 15:15 ` ✗ CI.checksparse: warning " Patchwork
2024-07-05 15:31 ` ✗ Fi.CI.CHECKPATCH: " Patchwork
2024-07-05 15:31 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-07-05 15:38 ` ✓ CI.BAT: success " Patchwork
2024-07-05 15:39 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-05 17:43 ` ✗ CI.FULL: failure " Patchwork
2024-07-06 18:52 ` ✗ Fi.CI.IGT: " Patchwork
2024-07-12 21:39 ` [PATCH 00/20] drm/{i915,xe}: " Ville Syrjälä
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=Zo2UrXsfVkzOZEpv@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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.