|
1 | 1 | // SPDX-License-Identifier: MIT |
2 | 2 | /* Copyright © 2025 Intel Corporation */ |
3 | 3 |
|
4 | | -#include "i915_drv.h" |
| 4 | +#include <drm/intel/display_parent_interface.h> |
| 5 | + |
5 | 6 | #include "intel_display_core.h" |
6 | 7 | #include "intel_display_rpm.h" |
7 | | -#include "intel_runtime_pm.h" |
8 | | - |
9 | | -static struct intel_runtime_pm *display_to_rpm(struct intel_display *display) |
10 | | -{ |
11 | | - struct drm_i915_private *i915 = to_i915(display->drm); |
12 | | - |
13 | | - return &i915->runtime_pm; |
14 | | -} |
15 | 8 |
|
16 | 9 | struct ref_tracker *intel_display_rpm_get_raw(struct intel_display *display) |
17 | 10 | { |
18 | | - return intel_runtime_pm_get_raw(display_to_rpm(display)); |
| 11 | + return display->parent->rpm->get_raw(display->drm); |
19 | 12 | } |
20 | 13 |
|
21 | 14 | void intel_display_rpm_put_raw(struct intel_display *display, struct ref_tracker *wakeref) |
22 | 15 | { |
23 | | - intel_runtime_pm_put_raw(display_to_rpm(display), wakeref); |
| 16 | + display->parent->rpm->put_raw(display->drm, wakeref); |
24 | 17 | } |
25 | 18 |
|
26 | 19 | struct ref_tracker *intel_display_rpm_get(struct intel_display *display) |
27 | 20 | { |
28 | | - return intel_runtime_pm_get(display_to_rpm(display)); |
| 21 | + return display->parent->rpm->get(display->drm); |
29 | 22 | } |
30 | 23 |
|
31 | 24 | struct ref_tracker *intel_display_rpm_get_if_in_use(struct intel_display *display) |
32 | 25 | { |
33 | | - return intel_runtime_pm_get_if_in_use(display_to_rpm(display)); |
| 26 | + return display->parent->rpm->get_if_in_use(display->drm); |
34 | 27 | } |
35 | 28 |
|
36 | 29 | struct ref_tracker *intel_display_rpm_get_noresume(struct intel_display *display) |
37 | 30 | { |
38 | | - return intel_runtime_pm_get_noresume(display_to_rpm(display)); |
| 31 | + return display->parent->rpm->get_noresume(display->drm); |
39 | 32 | } |
40 | 33 |
|
41 | 34 | void intel_display_rpm_put(struct intel_display *display, struct ref_tracker *wakeref) |
42 | 35 | { |
43 | | - intel_runtime_pm_put(display_to_rpm(display), wakeref); |
| 36 | + display->parent->rpm->put(display->drm, wakeref); |
44 | 37 | } |
45 | 38 |
|
46 | 39 | void intel_display_rpm_put_unchecked(struct intel_display *display) |
47 | 40 | { |
48 | | - intel_runtime_pm_put_unchecked(display_to_rpm(display)); |
| 41 | + display->parent->rpm->put_unchecked(display->drm); |
49 | 42 | } |
50 | 43 |
|
51 | 44 | bool intel_display_rpm_suspended(struct intel_display *display) |
52 | 45 | { |
53 | | - return intel_runtime_pm_suspended(display_to_rpm(display)); |
| 46 | + return display->parent->rpm->suspended(display->drm); |
54 | 47 | } |
55 | 48 |
|
56 | 49 | void assert_display_rpm_held(struct intel_display *display) |
57 | 50 | { |
58 | | - assert_rpm_wakelock_held(display_to_rpm(display)); |
| 51 | + display->parent->rpm->assert_held(display->drm); |
59 | 52 | } |
60 | 53 |
|
61 | 54 | void intel_display_rpm_assert_block(struct intel_display *display) |
62 | 55 | { |
63 | | - disable_rpm_wakeref_asserts(display_to_rpm(display)); |
| 56 | + display->parent->rpm->assert_block(display->drm); |
64 | 57 | } |
65 | 58 |
|
66 | 59 | void intel_display_rpm_assert_unblock(struct intel_display *display) |
67 | 60 | { |
68 | | - enable_rpm_wakeref_asserts(display_to_rpm(display)); |
| 61 | + display->parent->rpm->assert_unblock(display->drm); |
69 | 62 | } |
0 commit comments