Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/4] drm/i915: Handle intel_plane and intel_plane_state in to_intel_display()
Date: Thu, 24 Oct 2024 19:53:54 +0300	[thread overview]
Message-ID: <20241024165356.17756-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20241024165356.17756-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Allow one to pass intel_plane/intel_plane_state to
to_intel_display(). Works exactly like their crtc
counterparts.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 2bb1fa64da2f..e63a1d23316c 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -2104,6 +2104,10 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
 	__drm_device_to_intel_display((p)->base.dev)
 #define __intel_hdmi_to_intel_display(p)	\
 	__drm_device_to_intel_display(hdmi_to_dig_port(p)->base.base.dev)
+#define __intel_plane_to_intel_display(p)		\
+	__drm_device_to_intel_display((p)->base.dev)
+#define __intel_plane_state_to_intel_display(p)			\
+	__drm_device_to_intel_display((p)->uapi.plane->dev)
 
 /* Helper for generic association. Map types to conversion functions/macros. */
 #define __assoc(type, p) \
@@ -2122,6 +2126,8 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
 		 __assoc(intel_digital_port, p),	\
 		 __assoc(intel_dp, p),			\
 		 __assoc(intel_encoder, p),		\
-		 __assoc(intel_hdmi, p))
+		 __assoc(intel_hdmi, p),		\
+		 __assoc(intel_plane, p),		\
+		 __assoc(intel_plane_state, p))
 
 #endif /*  __INTEL_DISPLAY_TYPES_H__ */
-- 
2.45.2


  parent reply	other threads:[~2024-10-24 16:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 16:53 [PATCH 0/4] drm/i915/color: Debug improvements and intel_display conversion Ville Syrjala
2024-10-24 16:53 ` [PATCH 1/4] drm/i915/color: Pimp debugs Ville Syrjala
2024-10-24 16:53 ` Ville Syrjala [this message]
2024-10-24 16:53 ` [PATCH 3/4] drm/i915/color: Convert color management code to intel_display Ville Syrjala
2024-10-24 16:53 ` [PATCH 4/4] drm/i915/color: Make color .get_config() mandatory Ville Syrjala
2024-10-24 17:20 ` [PATCH 0/4] drm/i915/color: Debug improvements and intel_display conversion Jani Nikula
2024-10-24 17:25 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-10-24 17:42 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-10-25  6:35 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/color: Debug improvements and intel_display conversion (rev2) Patchwork
2024-10-25  6:35 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-25  7:12 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-25  8:13 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-29 12:31 ` ✓ Fi.CI.BAT: success for drm/i915/color: Debug improvements and intel_display conversion (rev4) Patchwork
2024-10-29 12:32 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2024-10-29 12:32 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-29 15:37 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-30 20:11 ` 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=20241024165356.17756-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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