From 3815e8f2ffe44396d10b100fbd38f511dfefbbc7 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 17 Nov 2025 11:16:10 +0200 Subject: drm/{i915,xe}/display: move irq calls to parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an irq parent driver interface for the .enabled and .synchronize calls. This lets us drop the dependency on i915_drv.h and i915_irq.h in multiple places, and subsequently remove the compat i915_irq.h and i915_irq.c files along with the display/ext directory from xe altogether. Introduce new intel_parent.[ch] as the wrapper layer to chase the function pointers and convert between generic and more specific display types. v2: Keep static wrappers in intel_display_irq.c (Ville) v3: Full blown wrappers in intel_parent.[ch] (Ville) Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/dd62dd52ef10d9ecf77da3bdf6a70f71193d141c.1763370931.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 26bedc360044..3a008a18eb65 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -25,6 +25,11 @@ struct intel_display_rpm_interface { void (*assert_unblock)(const struct drm_device *drm); }; +struct intel_display_irq_interface { + bool (*enabled)(struct drm_device *drm); + void (*synchronize)(struct drm_device *drm); +}; + /** * struct intel_display_parent_interface - services parent driver provides to display * @@ -40,6 +45,9 @@ struct intel_display_rpm_interface { struct intel_display_parent_interface { /** @rpm: Runtime PM functions */ const struct intel_display_rpm_interface *rpm; + + /** @irq: IRQ interface */ + const struct intel_display_irq_interface *irq; }; #endif -- cgit v1.2.3 From e8916738977e29a6f1e8edc593ee336f2bcf1b7d Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 17 Nov 2025 11:16:11 +0200 Subject: drm/i915: add .vgpu_active to parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .vgpu_active() to display parent interface, removing more dependencies on struct drm_i915_private, i915_drv.h, and i915_vgpu.h. This also allows us to remove the xe compat i915_vgpu.h. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/a2d4043ebaaf8f69bb738d5d1332afd2847550ad.1763370931.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 3a008a18eb65..f3834f36ce74 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -48,6 +48,9 @@ struct intel_display_parent_interface { /** @irq: IRQ interface */ const struct intel_display_irq_interface *irq; + + /** @vgpu_active: Is vGPU active? Optional. */ + bool (*vgpu_active)(struct drm_device *drm); }; #endif -- cgit v1.2.3 From 4799ff418f9a68361331fdc7fc01f66dc314adb9 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 17 Nov 2025 11:16:12 +0200 Subject: drm/i915: add .has_fenced_regions to parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .has_fenced_regions() to display parent interface, removing more dependencies on struct drm_i915_private, i915_drv.h, and gt/intel_gt_types.h. This allows us to remove the xe compat gt/intel_gt_types.h. v2: s/fence_support_legacy/has_fenced_regions/ (Ville) Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/309f61a8742c3bf731c820b2f9e1024143db8598.1763370931.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index f3834f36ce74..927d964f2071 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -51,6 +51,9 @@ struct intel_display_parent_interface { /** @vgpu_active: Is vGPU active? Optional. */ bool (*vgpu_active)(struct drm_device *drm); + + /** @has_fenced_regions: Support legacy fencing? Optional. */ + bool (*has_fenced_regions)(struct drm_device *drm); }; #endif -- cgit v1.2.3 From 1314027632ae2d98ec7ba250495d1a6084caafc6 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 17 Nov 2025 11:16:14 +0200 Subject: drm/i915/rps: call RPS functions via the parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add struct intel_display_rps_interface to the display parent interface, and call the RPS functions through it. The RPS interface is optional. v2: s/boost/boost_if_not_started/ and keep comment in caller (Ville) Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/6a6c4420d9f2d9a545ee6df4cad5fdc32a86636b.1763370931.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 927d964f2071..0a6a26234fbe 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -6,6 +6,7 @@ #include +struct dma_fence; struct drm_device; struct ref_tracker; @@ -30,6 +31,12 @@ struct intel_display_irq_interface { void (*synchronize)(struct drm_device *drm); }; +struct intel_display_rps_interface { + void (*boost_if_not_started)(struct dma_fence *fence); + void (*mark_interactive)(struct drm_device *drm, bool interactive); + void (*ilk_irq_handler)(struct drm_device *drm); +}; + /** * struct intel_display_parent_interface - services parent driver provides to display * @@ -49,6 +56,9 @@ struct intel_display_parent_interface { /** @irq: IRQ interface */ const struct intel_display_irq_interface *irq; + /** @rpm: RPS interface. Optional. */ + const struct intel_display_rps_interface *rps; + /** @vgpu_active: Is vGPU active? Optional. */ bool (*vgpu_active)(struct drm_device *drm); -- cgit v1.2.3 From 55fc11ce96e92dbae2aab1d692735f7a9b96fefd Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 17 Nov 2025 11:16:16 +0200 Subject: drm/i915: add .fence_priority_display to parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .fence_priority_display() to display parent interface, removing a display dependency on gem/i915_gem_object.h. This allows us to remove the xe compat gem/i915_gem_object.h. v2: Don't mix this with the rps interface (Ville) v3: Rebase Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/c7782862956e3aa59eaeb6dcf80906c1fc063ae1.1763370931.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 0a6a26234fbe..4135d1e1a67e 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -64,6 +64,9 @@ struct intel_display_parent_interface { /** @has_fenced_regions: Support legacy fencing? Optional. */ bool (*has_fenced_regions)(struct drm_device *drm); + + /** @fence_priority_display: Set display priority. Optional. */ + void (*fence_priority_display)(struct dma_fence *fence); }; #endif -- cgit v1.2.3 From 29fdc6e98d3c3657c8b4874ab3bfc75f9df59bf4 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 25 Nov 2025 19:17:44 +0200 Subject: drm/{i915,xe}/hdcp: use parent interface for HDCP GSC calls The HDCP GSC implementation is different for both i915 and xe. Add it to the display parent interface, and call the hooks via the parent interface. Reviewed-by: Suraj Kandpal Link: https://patch.msgid.link/e397073e91f8aa7518754b3b79f65c1936be91ad.1764090990.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 4135d1e1a67e..61d1b22adc83 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -8,6 +8,7 @@ struct dma_fence; struct drm_device; +struct intel_hdcp_gsc_context; struct ref_tracker; struct intel_display_rpm_interface { @@ -26,6 +27,15 @@ struct intel_display_rpm_interface { void (*assert_unblock)(const struct drm_device *drm); }; +struct intel_display_hdcp_interface { + ssize_t (*gsc_msg_send)(struct intel_hdcp_gsc_context *gsc_context, + void *msg_in, size_t msg_in_len, + void *msg_out, size_t msg_out_len); + bool (*gsc_check_status)(struct drm_device *drm); + struct intel_hdcp_gsc_context *(*gsc_context_alloc)(struct drm_device *drm); + void (*gsc_context_free)(struct intel_hdcp_gsc_context *gsc_context); +}; + struct intel_display_irq_interface { bool (*enabled)(struct drm_device *drm); void (*synchronize)(struct drm_device *drm); @@ -50,6 +60,9 @@ struct intel_display_rps_interface { * check the optional pointers. */ struct intel_display_parent_interface { + /** @hdcp: HDCP GSC interface */ + const struct intel_display_hdcp_interface *hdcp; + /** @rpm: Runtime PM functions */ const struct intel_display_rpm_interface *rpm; -- cgit v1.2.3 From d6c862572b69fd92f1793738e2e8d7d326ba0740 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 5 Dec 2025 12:30:29 +0200 Subject: drm/{i915, xe}/stolen: move stolen memory handling to display parent interface Call the stolen memory interface through the display parent interface. This makes xe compat gem/i915_gem_stolen.h redundant, and it can be removed. v2: Rebase, convert one more call that appeared Reviewed-by: Vinod Govindapillai Link: https://patch.msgid.link/350c82c49fe40f6319d14d309180e2e2752145ac.1764930576.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 61d1b22adc83..f590e846464d 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -9,6 +9,7 @@ struct dma_fence; struct drm_device; struct intel_hdcp_gsc_context; +struct intel_stolen_node; struct ref_tracker; struct intel_display_rpm_interface { @@ -47,6 +48,22 @@ struct intel_display_rps_interface { void (*ilk_irq_handler)(struct drm_device *drm); }; +struct intel_display_stolen_interface { + int (*insert_node_in_range)(struct intel_stolen_node *node, u64 size, + unsigned int align, u64 start, u64 end); + int (*insert_node)(struct intel_stolen_node *node, u64 size, unsigned int align); + void (*remove_node)(struct intel_stolen_node *node); + bool (*initialized)(struct drm_device *drm); + bool (*node_allocated)(const struct intel_stolen_node *node); + u64 (*node_offset)(const struct intel_stolen_node *node); + u64 (*area_address)(struct drm_device *drm); + u64 (*area_size)(struct drm_device *drm); + u64 (*node_address)(const struct intel_stolen_node *node); + u64 (*node_size)(const struct intel_stolen_node *node); + struct intel_stolen_node *(*node_alloc)(struct drm_device *drm); + void (*node_free)(const struct intel_stolen_node *node); +}; + /** * struct intel_display_parent_interface - services parent driver provides to display * @@ -72,6 +89,9 @@ struct intel_display_parent_interface { /** @rpm: RPS interface. Optional. */ const struct intel_display_rps_interface *rps; + /** @stolen: Stolen memory. */ + const struct intel_display_stolen_interface *stolen; + /** @vgpu_active: Is vGPU active? Optional. */ bool (*vgpu_active)(struct drm_device *drm); -- cgit v1.2.3 From 0c085485a90351bb38dc97c2df99ac2038d0d87c Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 5 Dec 2025 12:30:30 +0200 Subject: drm/{i915, xe}/stolen: make insert_node, area_address, area_size optional Since the stolen memory hooks are function pointers, make some of them optional instead of having to define them for xe. insert_node, area_address, and area_size are only needed on platforms not supported by xe. Reviewed-by: Vinod Govindapillai Link: https://patch.msgid.link/0dbb460e8bd1df29df98862d08fcdfda03912673.1764930576.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index f590e846464d..cc13b2ce1324 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -51,13 +51,13 @@ struct intel_display_rps_interface { struct intel_display_stolen_interface { int (*insert_node_in_range)(struct intel_stolen_node *node, u64 size, unsigned int align, u64 start, u64 end); - int (*insert_node)(struct intel_stolen_node *node, u64 size, unsigned int align); + int (*insert_node)(struct intel_stolen_node *node, u64 size, unsigned int align); /* Optional */ void (*remove_node)(struct intel_stolen_node *node); bool (*initialized)(struct drm_device *drm); bool (*node_allocated)(const struct intel_stolen_node *node); u64 (*node_offset)(const struct intel_stolen_node *node); - u64 (*area_address)(struct drm_device *drm); - u64 (*area_size)(struct drm_device *drm); + u64 (*area_address)(struct drm_device *drm); /* Optional */ + u64 (*area_size)(struct drm_device *drm); /* Optional */ u64 (*node_address)(const struct intel_stolen_node *node); u64 (*node_size)(const struct intel_stolen_node *node); struct intel_stolen_node *(*node_alloc)(struct drm_device *drm); -- cgit v1.2.3 From 6a99e91a6ca8fec5882450128fb128265f86b32a Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Tue, 9 Dec 2025 13:00:34 +0100 Subject: drm/i915/display: Detect AuxCCS support via display parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whether AuxCCS can be properly supported depends on the support both from the display side and non-display side of the driver. Let us therefore allow for the non-display part to be queried via the display parent interface. The new interface replaces the HAS_AUX_CCS macro and we also remove the FIXME from skl_universal_plane_create since now the xe will not advertise the AuxCCS caps to start with so they do not need to be removed after enumeration. Also, by removing this build specific FIXME we come a step closer to fully de-coupling display and non-display. The existing HAS_AUX_CCS gets renamed to HAS_AUX_DIST since it is still required for determining the need for PLANE_AUX_DIST programming. Signed-off-by: Tvrtko Ursulin References: cf48bddd31de ("drm/i915/display: Disable AuxCCS framebuffers if built for Xe") Cc: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org Cc: Jani Nikula Cc: José Roberto de Souza Cc: Juha-Pekka Heikkila Cc: Rodrigo Vivi Cc: Ville Syrjälä Acked-by: Jani Nikula # v1 Reviewed-by: Jani Nikula Signed-off-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20251209120034.9143-1-tursulin@igalia.com --- include/drm/intel/display_parent_interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index cc13b2ce1324..9733c508ad4c 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -100,6 +100,9 @@ struct intel_display_parent_interface { /** @fence_priority_display: Set display priority. Optional. */ void (*fence_priority_display)(struct dma_fence *fence); + + /** @has_auxcss: Are AuxCCS formats supported by the parent. Optional. */ + bool (*has_auxccs)(struct drm_device *drm); }; #endif -- cgit v1.2.3 From 63c7f93b6033800e9bc4eca02949dc9d12553138 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Thu, 11 Dec 2025 19:37:12 +0200 Subject: drm/{i915, xe}/panic: move panic handling to parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the panic handling to the display parent interface, making display more independent of i915 and xe driver implementations. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/e27eca5424479e8936b786018d0af19a34f839f6.1765474612.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 9733c508ad4c..477ee9e735f9 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -8,7 +8,9 @@ struct dma_fence; struct drm_device; +struct drm_scanout_buffer; struct intel_hdcp_gsc_context; +struct intel_panic; struct intel_stolen_node; struct ref_tracker; @@ -42,6 +44,12 @@ struct intel_display_irq_interface { void (*synchronize)(struct drm_device *drm); }; +struct intel_display_panic_interface { + struct intel_panic *(*alloc)(void); + int (*setup)(struct intel_panic *panic, struct drm_scanout_buffer *sb); + void (*finish)(struct intel_panic *panic); +}; + struct intel_display_rps_interface { void (*boost_if_not_started)(struct dma_fence *fence); void (*mark_interactive)(struct drm_device *drm, bool interactive); @@ -86,6 +94,9 @@ struct intel_display_parent_interface { /** @irq: IRQ interface */ const struct intel_display_irq_interface *irq; + /** @panic: Panic interface */ + const struct intel_display_panic_interface *panic; + /** @rpm: RPS interface. Optional. */ const struct intel_display_rps_interface *rps; -- cgit v1.2.3 From 4e899d9b4ea7798debb0c24e201a27fe2694d222 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 12 Dec 2025 16:14:04 +0200 Subject: drm/intel: fix parent interface kernel-doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix some typos in the kernel-doc. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/b293e25aa00418908e67576e8adcab325319705a.1765548786.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 477ee9e735f9..87e26ee0ecbf 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -97,7 +97,7 @@ struct intel_display_parent_interface { /** @panic: Panic interface */ const struct intel_display_panic_interface *panic; - /** @rpm: RPS interface. Optional. */ + /** @rps: RPS interface. Optional. */ const struct intel_display_rps_interface *rps; /** @stolen: Stolen memory. */ @@ -112,7 +112,7 @@ struct intel_display_parent_interface { /** @fence_priority_display: Set display priority. Optional. */ void (*fence_priority_display)(struct dma_fence *fence); - /** @has_auxcss: Are AuxCCS formats supported by the parent. Optional. */ + /** @has_auxccs: Are AuxCCS formats supported by the parent. Optional. */ bool (*has_auxccs)(struct drm_device *drm); }; -- cgit v1.2.3 From 8c88104ac6b8bdf5099a22165ff79348f84a0d77 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 12 Dec 2025 16:14:05 +0200 Subject: drm/intel: group individual funcs in parent interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are a handful of function pointers that don't really warrant a dedicated sub-struct for the functionality. Group all of them together in a single anonymous sub-struct. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/4305b09a93ce2c8ca83bf1fbb3cc7ef5a29d1567.1765548786.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 87e26ee0ecbf..5d4b9dc837d9 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -103,17 +103,20 @@ struct intel_display_parent_interface { /** @stolen: Stolen memory. */ const struct intel_display_stolen_interface *stolen; - /** @vgpu_active: Is vGPU active? Optional. */ - bool (*vgpu_active)(struct drm_device *drm); + /* Generic independent functions */ + struct { + /** @vgpu_active: Is vGPU active? Optional. */ + bool (*vgpu_active)(struct drm_device *drm); - /** @has_fenced_regions: Support legacy fencing? Optional. */ - bool (*has_fenced_regions)(struct drm_device *drm); + /** @has_fenced_regions: Support legacy fencing? Optional. */ + bool (*has_fenced_regions)(struct drm_device *drm); - /** @fence_priority_display: Set display priority. Optional. */ - void (*fence_priority_display)(struct dma_fence *fence); + /** @fence_priority_display: Set display priority. Optional. */ + void (*fence_priority_display)(struct dma_fence *fence); - /** @has_auxccs: Are AuxCCS formats supported by the parent. Optional. */ - bool (*has_auxccs)(struct drm_device *drm); + /** @has_auxccs: Are AuxCCS formats supported by the parent. Optional. */ + bool (*has_auxccs)(struct drm_device *drm); + }; }; #endif -- cgit v1.2.3 From 07d46ada28813393af461d9b739995d00368b93b Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 12 Dec 2025 16:14:06 +0200 Subject: drm/intel: sort parent interface struct definitions and members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sort the parent interface struct definitions and members to improve clarity on where to add new stuff. Reviewed-by: Ville Syrjälä Link: https://patch.msgid.link/7f2e45d030e78928ebc8cf0a6d0fb47a3aa13c48.1765548786.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/intel/display_parent_interface.h | 50 +++++++++++++++------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 5d4b9dc837d9..55d4df714645 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -14,21 +14,7 @@ struct intel_panic; struct intel_stolen_node; struct ref_tracker; -struct intel_display_rpm_interface { - struct ref_tracker *(*get)(const struct drm_device *drm); - struct ref_tracker *(*get_raw)(const struct drm_device *drm); - struct ref_tracker *(*get_if_in_use)(const struct drm_device *drm); - struct ref_tracker *(*get_noresume)(const struct drm_device *drm); - - void (*put)(const struct drm_device *drm, struct ref_tracker *wakeref); - void (*put_raw)(const struct drm_device *drm, struct ref_tracker *wakeref); - void (*put_unchecked)(const struct drm_device *drm); - - bool (*suspended)(const struct drm_device *drm); - void (*assert_held)(const struct drm_device *drm); - void (*assert_block)(const struct drm_device *drm); - void (*assert_unblock)(const struct drm_device *drm); -}; +/* Keep struct definitions sorted */ struct intel_display_hdcp_interface { ssize_t (*gsc_msg_send)(struct intel_hdcp_gsc_context *gsc_context, @@ -50,6 +36,22 @@ struct intel_display_panic_interface { void (*finish)(struct intel_panic *panic); }; +struct intel_display_rpm_interface { + struct ref_tracker *(*get)(const struct drm_device *drm); + struct ref_tracker *(*get_raw)(const struct drm_device *drm); + struct ref_tracker *(*get_if_in_use)(const struct drm_device *drm); + struct ref_tracker *(*get_noresume)(const struct drm_device *drm); + + void (*put)(const struct drm_device *drm, struct ref_tracker *wakeref); + void (*put_raw)(const struct drm_device *drm, struct ref_tracker *wakeref); + void (*put_unchecked)(const struct drm_device *drm); + + bool (*suspended)(const struct drm_device *drm); + void (*assert_held)(const struct drm_device *drm); + void (*assert_block)(const struct drm_device *drm); + void (*assert_unblock)(const struct drm_device *drm); +}; + struct intel_display_rps_interface { void (*boost_if_not_started)(struct dma_fence *fence); void (*mark_interactive)(struct drm_device *drm, bool interactive); @@ -88,15 +90,15 @@ struct intel_display_parent_interface { /** @hdcp: HDCP GSC interface */ const struct intel_display_hdcp_interface *hdcp; - /** @rpm: Runtime PM functions */ - const struct intel_display_rpm_interface *rpm; - /** @irq: IRQ interface */ const struct intel_display_irq_interface *irq; /** @panic: Panic interface */ const struct intel_display_panic_interface *panic; + /** @rpm: Runtime PM functions */ + const struct intel_display_rpm_interface *rpm; + /** @rps: RPS interface. Optional. */ const struct intel_display_rps_interface *rps; @@ -105,17 +107,17 @@ struct intel_display_parent_interface { /* Generic independent functions */ struct { - /** @vgpu_active: Is vGPU active? Optional. */ - bool (*vgpu_active)(struct drm_device *drm); - - /** @has_fenced_regions: Support legacy fencing? Optional. */ - bool (*has_fenced_regions)(struct drm_device *drm); - /** @fence_priority_display: Set display priority. Optional. */ void (*fence_priority_display)(struct dma_fence *fence); /** @has_auxccs: Are AuxCCS formats supported by the parent. Optional. */ bool (*has_auxccs)(struct drm_device *drm); + + /** @has_fenced_regions: Support legacy fencing? Optional. */ + bool (*has_fenced_regions)(struct drm_device *drm); + + /** @vgpu_active: Is vGPU active? Optional. */ + bool (*vgpu_active)(struct drm_device *drm); }; }; -- cgit v1.2.3 From 92a73fec6acdcef3f2da7b2d1d4574308ebbe975 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 15 Dec 2025 21:23:42 +0200 Subject: drm/dp: Add drm_dp_dsc_sink_slice_count_mask() A DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count. Add the helper functions required for this. Cc: dri-devel@lists.freedesktop.org Reviewed-by: Luca Coelho Acked-by: Maarten Lankhorst Signed-off-by: Imre Deak Link: https://patch.msgid.link/20251215192357.172201-3-imre.deak@intel.com --- include/drm/display/drm_dp_helper.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index df2f24b950e4..85e868238e28 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -206,6 +206,9 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) /* DP/eDP DSC support */ u8 drm_dp_dsc_sink_bpp_incr(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]); +u32 drm_dp_dsc_slice_count_to_mask(int slice_count); +u32 drm_dp_dsc_sink_slice_count_mask(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], + bool is_edp); u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], bool is_edp); u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]); -- cgit v1.2.3 From 35ec71285c9311395b14bedc60fa94f6b7e24d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Thu, 18 Dec 2025 20:20:52 +0200 Subject: drm/i915/pc8: Add parent interface for PC8 forcewake tricks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use forcewake to prevent the SoC from actually entering PC8 while performing the PC8 disable sequence. Hide that behind a new parent interface to eliminate the naked forcewake/uncore usage from the display power code. v2: Mark the interface optional and warn if someone calls it when not provided (Jani) Include the header to make sure the extern declaration matches the definition (Jani) v3: Rebase due to shuffling Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patch.msgid.link/20251218182052.18756-1-ville.syrjala@linux.intel.com --- include/drm/intel/display_parent_interface.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h index 55d4df714645..10c50b42844e 100644 --- a/include/drm/intel/display_parent_interface.h +++ b/include/drm/intel/display_parent_interface.h @@ -36,6 +36,11 @@ struct intel_display_panic_interface { void (*finish)(struct intel_panic *panic); }; +struct intel_display_pc8_interface { + void (*block)(struct drm_device *drm); + void (*unblock)(struct drm_device *drm); +}; + struct intel_display_rpm_interface { struct ref_tracker *(*get)(const struct drm_device *drm); struct ref_tracker *(*get_raw)(const struct drm_device *drm); @@ -96,6 +101,9 @@ struct intel_display_parent_interface { /** @panic: Panic interface */ const struct intel_display_panic_interface *panic; + /** @pc8: PC8 interface. Optional. */ + const struct intel_display_pc8_interface *pc8; + /** @rpm: Runtime PM functions */ const struct intel_display_rpm_interface *rpm; -- cgit v1.2.3