mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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
This commit is contained in:
@@ -7,6 +7,23 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
struct drm_device;
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct intel_display_parent_interface - services parent driver provides to display
|
||||
@@ -21,6 +38,8 @@ struct drm_device;
|
||||
* check the optional pointers.
|
||||
*/
|
||||
struct intel_display_parent_interface {
|
||||
/** @rpm: Runtime PM functions */
|
||||
const struct intel_display_rpm_interface *rpm;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user