Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Dave Airlie <airlied@redhat.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v4 11/11] drm/i915: split fb scalable checks into g4x and skl versions
Date: Wed, 16 Dec 2020 14:16:04 +0200	[thread overview]
Message-ID: <X9n6hCzikvQvnZ25@intel.com> (raw)
In-Reply-To: <80bdfd91b04f301db0e2c64752b1e10665bba7d8.1608117676.git.jani.nikula@intel.com>

On Wed, Dec 16, 2020 at 01:29:18PM +0200, Jani Nikula wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> This just cleans these up a bit.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_gen9_plane.c | 4 ++--
>  drivers/gpu/drm/i915/display/intel_sprite.c     | 7 +++----
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_gen9_plane.c b/drivers/gpu/drm/i915/display/intel_gen9_plane.c
> index 8549b262f095..c695ee990a82 100644
> --- a/drivers/gpu/drm/i915/display/intel_gen9_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_gen9_plane.c
> @@ -2139,7 +2139,7 @@ static int skl_check_plane_surface(struct intel_plane_state *plane_state)
>  	return 0;
>  }
>  
> -static bool intel_fb_scalable(const struct drm_framebuffer *fb)
> +static bool skl_fb_scalable(const struct drm_framebuffer *fb)
>  {
>  	if (!fb)
>  		return false;
> @@ -2172,7 +2172,7 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
>  		return ret;
>  
>  	/* use scaler when colorkey is not required */
> -	if (!plane_state->ckey.flags && intel_fb_scalable(fb)) {
> +	if (!plane_state->ckey.flags && skl_fb_scalable(fb)) {
>  		min_scale = 1;
>  		max_scale = skl_plane_max_scale(dev_priv, fb);
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> index cc3bec42d04c..4cb6339d12be 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -1282,19 +1282,18 @@ g4x_plane_get_hw_state(struct intel_plane *plane,
>  	return ret;
>  }
>  
> -static bool intel_fb_scalable(const struct drm_framebuffer *fb)
> +static bool g4x_fb_scalable(const struct drm_framebuffer *fb)
>  {
>  	if (!fb)
>  		return false;
>  
>  	switch (fb->format->format) {
>  	case DRM_FORMAT_C8:
> -		return false;
>  	case DRM_FORMAT_XRGB16161616F:
>  	case DRM_FORMAT_ARGB16161616F:
>  	case DRM_FORMAT_XBGR16161616F:
>  	case DRM_FORMAT_ABGR16161616F:
> -		return INTEL_GEN(to_i915(fb->dev)) >= 11;
> +		return false;

We could drop a bunch of the formats here since they're not
supported by the g4x+ sprites anyway. But that could be a followup.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	default:
>  		return true;
>  	}
> @@ -1371,7 +1370,7 @@ g4x_sprite_check(struct intel_crtc_state *crtc_state,
>  	int max_scale = DRM_PLANE_HELPER_NO_SCALING;
>  	int ret;
>  
> -	if (intel_fb_scalable(plane_state->hw.fb)) {
> +	if (g4x_fb_scalable(plane_state->hw.fb)) {
>  		if (INTEL_GEN(dev_priv) < 7) {
>  			min_scale = 1;
>  			max_scale = 16 << 16;
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-16 12:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 11:29 [Intel-gfx] [PATCH v4 00/11] drm/i915: refactor intel display Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 01/11] drm/i915/display: move needs_modeset to an inline in header Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 02/11] drm/i915/display: move to_intel_frontbuffer to header Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 03/11] drm/i915/display: fix misused comma Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 04/11] drm/i915: refactor cursor code out of i915_display.c Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 05/11] drm/i915: refactor some crtc code out of intel display Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 06/11] drm/i915: refactor pll code out into intel_dpll.c Jani Nikula
2020-12-16 11:58   ` Ville Syrjälä
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 07/11] drm/i915: split fdi code out from intel_display.c Jani Nikula
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 08/11] drm/i915: migrate hsw fdi code to new file Jani Nikula
2020-12-16 12:19   ` Ville Syrjälä
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 09/11] drm/i915: migrate skl planes code " Jani Nikula
2020-12-16 12:11   ` Ville Syrjälä
2020-12-16 15:21   ` [Intel-gfx] [kbuild] " Dan Carpenter
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 10/11] drm/i915: move pipe update code into crtc Jani Nikula
2020-12-16 12:13   ` Ville Syrjälä
2020-12-16 11:29 ` [Intel-gfx] [PATCH v4 11/11] drm/i915: split fb scalable checks into g4x and skl versions Jani Nikula
2020-12-16 12:16   ` Ville Syrjälä [this message]
2020-12-16 12:54 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: refactor intel display 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=X9n6hCzikvQvnZ25@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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