Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Move port definition back to i915 header

We dont need the definition of the enum port outside I915, anymore.
Hence move enum port definition into I915 driver itself.

v2:
intel_display.h is included in intel_hdcp.h
v3:
enum port is declared in headers.
v4:
commit msg is rephrased.
v5:
copyright year is updated [Tomas]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-3-ramalingam.c@intel.com

authored by

Ramalingam C and committed by
Uma Shankar
5b6030da 0dcceb35

+26 -20
+2 -1
drivers/gpu/drm/i915/display/intel_bios.h
··· 1 1 /* 2 - * Copyright © 2016 Intel Corporation 2 + * Copyright © 2016-2019 Intel Corporation 3 3 * 4 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 5 * copy of this software and associated documentation files (the "Software"), ··· 35 35 #include <drm/i915_drm.h> 36 36 37 37 struct drm_i915_private; 38 + enum port; 38 39 39 40 enum intel_backlight_type { 40 41 INTEL_BACKLIGHT_PMIC,
+19 -1
drivers/gpu/drm/i915/display/intel_display.h
··· 1 1 /* 2 - * Copyright © 2006-2017 Intel Corporation 2 + * Copyright © 2006-2019 Intel Corporation 3 3 * 4 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 5 * copy of this software and associated documentation files (the "Software"), ··· 181 181 #define for_each_plane_id_on_crtc(__crtc, __p) \ 182 182 for ((__p) = PLANE_PRIMARY; (__p) < I915_MAX_PLANES; (__p)++) \ 183 183 for_each_if((__crtc)->plane_ids_mask & BIT(__p)) 184 + 185 + enum port { 186 + PORT_NONE = -1, 187 + 188 + PORT_A = 0, 189 + PORT_B, 190 + PORT_C, 191 + PORT_D, 192 + PORT_E, 193 + PORT_F, 194 + PORT_G, 195 + PORT_H, 196 + PORT_I, 197 + 198 + I915_MAX_PORTS 199 + }; 200 + 201 + #define port_name(p) ((p) + 'A') 184 202 185 203 /* 186 204 * Ports identifier referenced from other drivers.
+1
drivers/gpu/drm/i915/display/intel_dp.h
··· 13 13 #include "i915_reg.h" 14 14 15 15 enum pipe; 16 + enum port; 16 17 struct drm_connector_state; 17 18 struct drm_encoder; 18 19 struct drm_i915_private;
+1
drivers/gpu/drm/i915/display/intel_hdcp.h
··· 15 15 struct drm_i915_private; 16 16 struct intel_connector; 17 17 struct intel_hdcp_shim; 18 + enum port; 18 19 19 20 void intel_hdcp_atomic_check(struct drm_connector *connector, 20 21 struct drm_connector_state *old_state,
+1
drivers/gpu/drm/i915/display/intel_hdmi.h
··· 23 23 struct intel_hdmi; 24 24 struct drm_connector_state; 25 25 union hdmi_infoframe; 26 + enum port; 26 27 27 28 void intel_hdmi_init(struct drm_i915_private *dev_priv, i915_reg_t hdmi_reg, 28 29 enum port port);
+1
drivers/gpu/drm/i915/display/intel_hotplug.h
··· 13 13 struct drm_i915_private; 14 14 struct intel_connector; 15 15 struct intel_encoder; 16 + enum port; 16 17 17 18 void intel_hpd_poll_init(struct drm_i915_private *dev_priv); 18 19 enum intel_hotplug_state intel_encoder_hotplug(struct intel_encoder *encoder,
+1
drivers/gpu/drm/i915/display/intel_sdvo.h
··· 14 14 15 15 struct drm_i915_private; 16 16 enum pipe; 17 + enum port; 17 18 18 19 bool intel_sdvo_port_enabled(struct drm_i915_private *dev_priv, 19 20 i915_reg_t sdvo_reg, enum pipe *pipe);
-18
include/drm/i915_drm.h
··· 100 100 #define INTEL_GEN11_BSM_DW1 0xc4 101 101 #define INTEL_BSM_MASK (-(1u << 20)) 102 102 103 - enum port { 104 - PORT_NONE = -1, 105 - 106 - PORT_A = 0, 107 - PORT_B, 108 - PORT_C, 109 - PORT_D, 110 - PORT_E, 111 - PORT_F, 112 - PORT_G, 113 - PORT_H, 114 - PORT_I, 115 - 116 - I915_MAX_PORTS 117 - }; 118 - 119 - #define port_name(p) ((p) + 'A') 120 - 121 103 #endif /* _I915_DRM_H_ */