summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2026-01-26 13:29:25 +0200
committerJani Nikula <jani.nikula@intel.com>2026-01-27 16:45:53 +0200
commitb3a2a91ae9b48c74e50833242af7d73f8a0ec3a6 (patch)
tree5346ce272f13e5678c40e584b269f8a5fa4fc52b /include
parentad381460c90bd3b9d39a5160df0b8b446b098736 (diff)
downloadlinux-b3a2a91ae9b48c74e50833242af7d73f8a0ec3a6.tar.gz
linux-b3a2a91ae9b48c74e50833242af7d73f8a0ec3a6.zip
drm/{i915, xe}/pcode: move display pcode calls to parent interface
Call the parent driver pcode functions through the parent interface function pointers instead of expecting both to have functions of the same name. In i915, add the interface to existing intel_pcode.[ch], while in xe move them to new display/xe_display_pcode.[ch] and build it only for CONFIG_DRM_XE_DISPLAY=y. Do not add separate write and write_timeout calls in the interface. Instead, handle the default 1 ms timeout in the intel_parent.c glue layer. This drops the last intel_pcode.h includes from display, and allows us to remove the corresponding xe compat header. v2: initialize .pcode in i915 Reviewed-by: MichaƂ Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260126112925.2452171-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/intel/display_parent_interface.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
index cd091120731c..41f4afe7928c 100644
--- a/include/drm/intel/display_parent_interface.h
+++ b/include/drm/intel/display_parent_interface.h
@@ -66,6 +66,13 @@ struct intel_display_pc8_interface {
void (*unblock)(struct drm_device *drm);
};
+struct intel_display_pcode_interface {
+ int (*read)(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1);
+ int (*write)(struct drm_device *drm, u32 mbox, u32 val, int timeout_ms);
+ int (*request)(struct drm_device *drm, u32 mbox, u32 request,
+ u32 reply_mask, u32 reply, int timeout_base_ms);
+};
+
struct intel_display_rpm_interface {
struct ref_tracker *(*get)(const struct drm_device *drm);
struct ref_tracker *(*get_raw)(const struct drm_device *drm);
@@ -135,6 +142,9 @@ struct intel_display_parent_interface {
/** @pc8: PC8 interface. Optional. */
const struct intel_display_pc8_interface *pc8;
+ /** @pcode: Pcode interface */
+ const struct intel_display_pcode_interface *pcode;
+
/** @rpm: Runtime PM functions */
const struct intel_display_rpm_interface *rpm;