Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/{i915, xe}/display: Add display runtime pm parent interface

We have differing implementations for display runtime pm in i915 and xe
drivers. Add struct of function pointers into display_parent_interface
which will contain used implementation of runtime pm.

v2:
- add _interface suffix to rpm function pointer struct
- add struct ref_tracker forward declaration
- use kernel-doc comments

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patch.msgid.link/20251030202836.1815680-3-jouni.hogander@intel.com

+19
+19
include/drm/intel/display_parent_interface.h
··· 7 7 #include <linux/types.h> 8 8 9 9 struct drm_device; 10 + struct ref_tracker; 11 + 12 + struct intel_display_rpm_interface { 13 + struct ref_tracker *(*get)(const struct drm_device *drm); 14 + struct ref_tracker *(*get_raw)(const struct drm_device *drm); 15 + struct ref_tracker *(*get_if_in_use)(const struct drm_device *drm); 16 + struct ref_tracker *(*get_noresume)(const struct drm_device *drm); 17 + 18 + void (*put)(const struct drm_device *drm, struct ref_tracker *wakeref); 19 + void (*put_raw)(const struct drm_device *drm, struct ref_tracker *wakeref); 20 + void (*put_unchecked)(const struct drm_device *drm); 21 + 22 + bool (*suspended)(const struct drm_device *drm); 23 + void (*assert_held)(const struct drm_device *drm); 24 + void (*assert_block)(const struct drm_device *drm); 25 + void (*assert_unblock)(const struct drm_device *drm); 26 + }; 10 27 11 28 /** 12 29 * struct intel_display_parent_interface - services parent driver provides to display ··· 38 21 * check the optional pointers. 39 22 */ 40 23 struct intel_display_parent_interface { 24 + /** @rpm: Runtime PM functions */ 25 + const struct intel_display_rpm_interface *rpm; 41 26 }; 42 27 43 28 #endif