All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>, Dave Airlie <airlied@redhat.com>
Subject: [Intel-gfx] [PATCH 08/11] drm/i915: split fb scalable checks into g4x and skl versions
Date: Thu, 14 Jan 2021 19:05:19 +1000	[thread overview]
Message-ID: <20210114090522.22750-9-airlied@gmail.com> (raw)
In-Reply-To: <20210114090522.22750-1-airlied@gmail.com>

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>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_sprite.c        | 7 +++----
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index 7d779402cef7..9995bf6c39b9 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -1345,19 +1345,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;
 	default:
 		return true;
 	}
@@ -1434,7 +1433,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;
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index f9659079ac18..fb590580223e 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1645,7 +1645,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;
@@ -1678,7 +1678,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);
 	}
-- 
2.27.0

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

  parent reply	other threads:[~2021-01-14  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  9:05 [Intel-gfx] [rfc v7] rebased refactor of intel_display Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 01/11] drm/i915: refactor some crtc code out of intel display. (v2) Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 02/11] drm/i915: refactor pll code out into intel_dpll.c Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 03/11] drm/i915: split fdi code out from intel_display.c Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 04/11] drm/i915: refactor ddi translations into a separate file Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 05/11] drm/i915: migrate hsw fdi code to new file Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 06/11] drm/i915: migrate skl planes code new file (v3) Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 07/11] drm/i915: move pipe update code into crtc Dave Airlie
2021-01-14  9:05 ` Dave Airlie [this message]
2021-01-14  9:05 ` [Intel-gfx] [PATCH 09/11] drm/i915: move is_ccs_modifier to an inline Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 10/11] drm/i915: migrate pll enable/disable code to intel_dpll.[ch] Dave Airlie
2021-01-14  9:05 ` [Intel-gfx] [PATCH 11/11] drm/i915: migrate i9xx plane get config Dave Airlie
2021-01-14 10:08 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [01/11] drm/i915: refactor some crtc code out of intel display. (v2) Patchwork
2021-01-14 11:15   ` Jani Nikula
2021-01-14 11:13 [Intel-gfx] [PATCH 00/11] [rfc v7.1] rebased refactor of intel_display Jani Nikula
2021-01-14 11:13 ` [Intel-gfx] [PATCH 08/11] drm/i915: split fb scalable checks into g4x and skl versions Jani Nikula

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=20210114090522.22750-9-airlied@gmail.com \
    --to=airlied@gmail.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 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.