Skip to content

Commit 9807aba

Browse files
committed
drm/i915/cdclk: make struct intel_cdclk_state opaque
With all the code touching struct intel_cdclk_state moved inside intel_cdclk.c, we move the struct definition there too, and make the type opaque. This nicely reduces includes from intel_cdclk.h. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/2b58c52e8cbcb66a48ecd4a1453e49dc7bd66289.1750847509.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 79be2da commit 9807aba

2 files changed

Lines changed: 38 additions & 39 deletions

File tree

drivers/gpu/drm/i915/display/intel_cdclk.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,42 @@
114114
* dividers can be programmed correctly.
115115
*/
116116

117+
struct intel_cdclk_state {
118+
struct intel_global_state base;
119+
120+
/*
121+
* Logical configuration of cdclk (used for all scaling,
122+
* watermark, etc. calculations and checks). This is
123+
* computed as if all enabled crtcs were active.
124+
*/
125+
struct intel_cdclk_config logical;
126+
127+
/*
128+
* Actual configuration of cdclk, can be different from the
129+
* logical configuration only when all crtc's are DPMS off.
130+
*/
131+
struct intel_cdclk_config actual;
132+
133+
/* minimum acceptable cdclk to satisfy bandwidth requirements */
134+
int bw_min_cdclk;
135+
/* minimum acceptable cdclk for each pipe */
136+
int min_cdclk[I915_MAX_PIPES];
137+
/* minimum acceptable voltage level for each pipe */
138+
u8 min_voltage_level[I915_MAX_PIPES];
139+
140+
/* pipe to which cd2x update is synchronized */
141+
enum pipe pipe;
142+
143+
/* forced minimum cdclk for glk+ audio w/a */
144+
int force_min_cdclk;
145+
146+
/* bitmask of active pipes */
147+
u8 active_pipes;
148+
149+
/* update cdclk with pipes disabled */
150+
bool disable_pipes;
151+
};
152+
117153
struct intel_cdclk_funcs {
118154
void (*get_cdclk)(struct intel_display *display,
119155
struct intel_cdclk_config *cdclk_config);

drivers/gpu/drm/i915/display/intel_cdclk.h

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88

99
#include <linux/types.h>
1010

11-
#include "intel_display_limits.h"
12-
#include "intel_global_state.h"
13-
11+
enum pipe;
1412
struct intel_atomic_state;
13+
struct intel_cdclk_state;
1514
struct intel_crtc;
1615
struct intel_crtc_state;
1716
struct intel_display;
@@ -23,42 +22,6 @@ struct intel_cdclk_config {
2322
bool joined_mbus;
2423
};
2524

26-
struct intel_cdclk_state {
27-
struct intel_global_state base;
28-
29-
/*
30-
* Logical configuration of cdclk (used for all scaling,
31-
* watermark, etc. calculations and checks). This is
32-
* computed as if all enabled crtcs were active.
33-
*/
34-
struct intel_cdclk_config logical;
35-
36-
/*
37-
* Actual configuration of cdclk, can be different from the
38-
* logical configuration only when all crtc's are DPMS off.
39-
*/
40-
struct intel_cdclk_config actual;
41-
42-
/* minimum acceptable cdclk to satisfy bandwidth requirements */
43-
int bw_min_cdclk;
44-
/* minimum acceptable cdclk for each pipe */
45-
int min_cdclk[I915_MAX_PIPES];
46-
/* minimum acceptable voltage level for each pipe */
47-
u8 min_voltage_level[I915_MAX_PIPES];
48-
49-
/* pipe to which cd2x update is synchronized */
50-
enum pipe pipe;
51-
52-
/* forced minimum cdclk for glk+ audio w/a */
53-
int force_min_cdclk;
54-
55-
/* bitmask of active pipes */
56-
u8 active_pipes;
57-
58-
/* update cdclk with pipes disabled */
59-
bool disable_pipes;
60-
};
61-
6225
void intel_cdclk_init_hw(struct intel_display *display);
6326
void intel_cdclk_uninit_hw(struct intel_display *display);
6427
void intel_init_cdclk_hooks(struct intel_display *display);

0 commit comments

Comments
 (0)