All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Subject: [Intel-gfx] [PATCH 2/3] drm/i915/fb: Don't store bitmasks in the intel_plane_caps enum
Date: Tue, 26 Oct 2021 19:15:16 +0300	[thread overview]
Message-ID: <20211026161517.2694067-3-imre.deak@intel.com> (raw)
In-Reply-To: <20211026161517.2694067-1-imre.deak@intel.com>

Variables of enum types can contain only the values listed at the enums
definition, so don't store bitmasks in intel_plane_caps enum variables.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb.c            | 4 ++--
 drivers/gpu/drm/i915/display/intel_fb.h            | 2 +-
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 9ce1d273dc7e1..6b68f69940f0b 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -309,7 +309,7 @@ static bool check_modifier_display_ver_range(const struct intel_modifier_desc *m
 }
 
 static bool plane_has_modifier(struct drm_i915_private *i915,
-			       enum intel_plane_caps plane_caps,
+			       u8 plane_caps,
 			       const struct intel_modifier_desc *md)
 {
 	if (!IS_DISPLAY_VER(i915, md->display_ver.from, md->display_ver.until))
@@ -340,7 +340,7 @@ static bool plane_has_modifier(struct drm_i915_private *i915,
  * The caller must free the returned buffer.
  */
 u64 *intel_fb_plane_get_modifiers(struct drm_i915_private *i915,
-				  enum intel_plane_caps plane_caps)
+				  u8 plane_caps)
 {
 	u64 *list, *p;
 	int count = 1;		/* +1 for invalid modifier terminator */
diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h
index 042ad81f86082..19f46144474d8 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.h
+++ b/drivers/gpu/drm/i915/display/intel_fb.h
@@ -35,7 +35,7 @@ bool intel_fb_is_ccs_aux_plane(const struct drm_framebuffer *fb, int color_plane
 int intel_fb_rc_ccs_cc_plane(const struct drm_framebuffer *fb);
 
 u64 *intel_fb_plane_get_modifiers(struct drm_i915_private *i915,
-				  enum intel_plane_caps plane_caps);
+				  u8 plane_caps);
 bool intel_fb_plane_supports_modifier(struct intel_plane *plane, u64 modifier);
 
 const struct drm_format_info *
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 8fa0ae89e5b3d..317108e009bba 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2023,7 +2023,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
 	const struct drm_plane_funcs *plane_funcs;
 	struct intel_plane *plane;
 	enum drm_plane_type plane_type;
-	enum intel_plane_caps plane_caps;
+	u8 plane_caps;
 	unsigned int supported_rotations;
 	unsigned int supported_csc;
 	const u64 *modifiers;
-- 
2.27.0


  parent reply	other threads:[~2021-10-26 16:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 16:15 [Intel-gfx] [PATCH 0/3] drm/i915/fb: Simplify modifier handling more Imre Deak
2021-10-26 16:15 ` [Intel-gfx] [PATCH 1/3] drm/i915/fb: Don't report MC CCS plane capability on GEN<12 Imre Deak
2021-10-26 16:15 ` Imre Deak [this message]
2021-10-26 16:15 ` [Intel-gfx] [PATCH 3/3] drm/i915/fb: Fold modifier CCS type/tiling attribute to plane caps Imre Deak
2021-10-26 17:52   ` Jani Nikula
2021-10-27  6:33     ` Imre Deak
2021-10-27  8:05       ` Jani Nikula
2021-10-27 12:51   ` [Intel-gfx] [PATCH v2 " Imre Deak
2021-10-26 20:24 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/fb: Simplify modifier handling more Patchwork
2021-10-27 16:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/fb: Simplify modifier handling more (rev2) Patchwork
2021-10-27 20:51 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-10-29 14:39   ` Imre Deak
2021-10-28 14:21 ` [Intel-gfx] [PATCH 0/3] drm/i915/fb: Simplify modifier handling more Juha-Pekka Heikkila

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=20211026161517.2694067-3-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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.