summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2026-01-20 18:45:41 +0300
committerJani Nikula <jani.nikula@intel.com>2026-01-26 12:56:41 +0300
commitcca7eda1c73045d6fb12b3db34f90de65412e742 (patch)
treec49e533f258542f0f288063bc502ba76c46ead2a /include
parent1617f5955c6458513787656afde819c91323ab03 (diff)
downloadlinux-cca7eda1c73045d6fb12b3db34f90de65412e742.tar.xz
drm/{i915, xe}/dsb: move DSB buffer to parent interface
Move the DSB buffer handling to the display parent interface, making display more independent of i915 and xe driver implementations. Since the DSB parent interface is only called from intel_dsb.c, add the wrappers there with smaller visibility instead of the usual intel_parent.[ch], and using struct intel_dsb as the context parameter for convenience. Unfortunately, memset() being a macro in linux/fortify-string.h, we can't use that as the function pointer name. dsb->memset() would be using the macro and leading to build failures. Therefore, use .fill() for the memset() functionality. v2: s/memset/fill/ Reviewed-by: MichaƂ Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/df117c862a6d34dae340e4a85c2482b4e29c8884.1768923917.git.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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
index ce946859a3a9..cd091120731c 100644
--- a/include/drm/intel/display_parent_interface.h
+++ b/include/drm/intel/display_parent_interface.h
@@ -14,6 +14,7 @@ struct drm_gem_object;
struct drm_plane_state;
struct drm_scanout_buffer;
struct i915_vma;
+struct intel_dsb_buffer;
struct intel_hdcp_gsc_context;
struct intel_initial_plane_config;
struct intel_panic;
@@ -22,6 +23,16 @@ struct ref_tracker;
/* Keep struct definitions sorted */
+struct intel_display_dsb_interface {
+ u32 (*ggtt_offset)(struct intel_dsb_buffer *dsb_buf);
+ void (*write)(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val);
+ u32 (*read)(struct intel_dsb_buffer *dsb_buf, u32 idx);
+ void (*fill)(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val, size_t size);
+ struct intel_dsb_buffer *(*create)(struct drm_device *drm, size_t size);
+ void (*cleanup)(struct intel_dsb_buffer *dsb_buf);
+ void (*flush_map)(struct intel_dsb_buffer *dsb_buf);
+};
+
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,
@@ -106,6 +117,9 @@ struct intel_display_stolen_interface {
* check the optional pointers.
*/
struct intel_display_parent_interface {
+ /** @dsb: DSB buffer interface */
+ const struct intel_display_dsb_interface *dsb;
+
/** @hdcp: HDCP GSC interface */
const struct intel_display_hdcp_interface *hdcp;