Skip to content

Commit 0a08320

Browse files
committed
drm/i915/pmdemand: make struct intel_pmdemand_state opaque
Only intel_pmdemand.c should look inside the struct intel_pmdemand_state. Indeed, this is already the case. Finish the job and make struct intel_pmdemand_state opaque, preventing any direct pokes at the guts of it in the future. Cc: Gustavo Sousa <[email protected]> Reviewed-by: Gustavo Sousa <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/bc5f418785ecd51454761e9a55f21340470a92e3.1735662324.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent eb18e25 commit 0a08320

File tree

2 files changed

+32
-30
lines changed

2 files changed

+32
-30
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@
1515
#include "intel_pmdemand.h"
1616
#include "skl_watermark.h"
1717

18+
struct pmdemand_params {
19+
u16 qclk_gv_bw;
20+
u8 voltage_index;
21+
u8 qclk_gv_index;
22+
u8 active_pipes;
23+
u8 active_dbufs; /* pre-Xe3 only */
24+
/* Total number of non type C active phys from active_phys_mask */
25+
u8 active_phys;
26+
u8 plls;
27+
u16 cdclk_freq_mhz;
28+
/* max from ddi_clocks[] */
29+
u16 ddiclk_max;
30+
u8 scalers; /* pre-Xe3 only */
31+
};
32+
33+
struct intel_pmdemand_state {
34+
struct intel_global_state base;
35+
36+
/* Maintain a persistent list of port clocks across all crtcs */
37+
int ddi_clocks[I915_MAX_PIPES];
38+
39+
/* Maintain a persistent list of non type C phys mask */
40+
u16 active_combo_phys_mask;
41+
42+
/* Parameters to be configured in the pmdemand registers */
43+
struct pmdemand_params params;
44+
};
45+
1846
struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state)
1947
{
2048
return container_of(obj_state, struct intel_pmdemand_state, base);

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

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,16 @@
66
#ifndef __INTEL_PMDEMAND_H__
77
#define __INTEL_PMDEMAND_H__
88

9-
#include "intel_display_limits.h"
10-
#include "intel_global_state.h"
9+
#include <linux/types.h>
1110

11+
enum pipe;
1212
struct drm_i915_private;
1313
struct intel_atomic_state;
1414
struct intel_crtc_state;
1515
struct intel_encoder;
16+
struct intel_global_state;
1617
struct intel_plane_state;
17-
18-
struct pmdemand_params {
19-
u16 qclk_gv_bw;
20-
u8 voltage_index;
21-
u8 qclk_gv_index;
22-
u8 active_pipes;
23-
u8 active_dbufs; /* pre-Xe3 only */
24-
/* Total number of non type C active phys from active_phys_mask */
25-
u8 active_phys;
26-
u8 plls;
27-
u16 cdclk_freq_mhz;
28-
/* max from ddi_clocks[] */
29-
u16 ddiclk_max;
30-
u8 scalers; /* pre-Xe3 only */
31-
};
32-
33-
struct intel_pmdemand_state {
34-
struct intel_global_state base;
35-
36-
/* Maintain a persistent list of port clocks across all crtcs */
37-
int ddi_clocks[I915_MAX_PIPES];
38-
39-
/* Maintain a persistent list of non type C phys mask */
40-
u16 active_combo_phys_mask;
41-
42-
/* Parameters to be configured in the pmdemand registers */
43-
struct pmdemand_params params;
44-
};
18+
struct intel_pmdemand_state;
4519

4620
struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state);
4721

0 commit comments

Comments
 (0)