Skip to content

Commit 3eafcdd

Browse files
committed
drm/i915/tc: Move TC port fields to a new intel_tc_port struct
Move the TC port specific fields from intel_digital_port to a new intel_tc_port struct. Pass an intel_tc_port pointer to all static functions in intel_tc.c keeping dig_port accessible for these via a pointer stored in the new struct. The next patch will allocate the intel_tc_port dynamically, allowing moving the struct definition to intel_tc.c. Reviewed-by: Mika Kahola <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 39feb7b commit 3eafcdd

File tree

4 files changed

+335
-289
lines changed

4 files changed

+335
-289
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ enum tc_port {
164164
I915_MAX_TC_PORTS
165165
};
166166

167-
enum tc_port_mode {
168-
TC_PORT_DISCONNECTED,
169-
TC_PORT_TBT_ALT,
170-
TC_PORT_DP_ALT,
171-
TC_PORT_LEGACY,
172-
};
173-
174167
enum aux_ch {
175168
AUX_CH_NONE = -1,
176169

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "intel_display_power.h"
5555
#include "intel_dpll_mgr.h"
5656
#include "intel_wm_types.h"
57+
#include "intel_tc.h"
5758

5859
struct drm_printer;
5960
struct __intel_global_objs_state;
@@ -1782,17 +1783,7 @@ struct intel_digital_port {
17821783
intel_wakeref_t ddi_io_wakeref;
17831784
intel_wakeref_t aux_wakeref;
17841785

1785-
struct mutex tc_lock; /* protects the TypeC port mode */
1786-
intel_wakeref_t tc_lock_wakeref;
1787-
enum intel_display_power_domain tc_lock_power_domain;
1788-
struct delayed_work tc_disconnect_phy_work;
1789-
int tc_link_refcount;
1790-
bool tc_legacy_port:1;
1791-
char tc_port_name[8];
1792-
enum tc_port_mode tc_mode;
1793-
enum tc_port_mode tc_init_mode;
1794-
enum phy_fia tc_phy_fia;
1795-
u8 tc_phy_fia_idx;
1786+
struct intel_tc_port tc;
17961787

17971788
/* protects num_hdcp_streams reference count, hdcp_port_data and hdcp_auth_status */
17981789
struct mutex hdcp_mutex;

0 commit comments

Comments
 (0)