aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2016-10-06 12:22:18 -0400
committerAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2016-10-28 05:24:37 -0400
commitf38861b814b530fbf5add9fa845da99444ebbde0 (patch)
tree6f9aacfb83774b5037d676f39a8019333421eb67
parent47a6bc61b86657646aea38e837a7f25c68cec7f8 (diff)
drm/i915: Move DPIO phy documentation section to intel_dpio_phy.c
Move the DPIO phy documentation section to intel_dpio_phy.c, since that is a more suitable place now that there is a source file dedicated for those phys. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/55a2d38c15c06a8c5bce498b28decc03948f0224.1475770848.git-series.ander.conselvan.de.oliveira@intel.com
-rw-r--r--Documentation/gpu/i915.rst2
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h91
-rw-r--r--drivers/gpu/drm/i915/intel_dpio_phy.c91
3 files changed, 93 insertions, 91 deletions
diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
index 95ce77ff4342..ba83b7d88f1f 100644
--- a/Documentation/gpu/i915.rst
+++ b/Documentation/gpu/i915.rst
@@ -189,7 +189,7 @@ Display Refresh Rate Switching (DRRS)
189DPIO 189DPIO
190---- 190----
191 191
192.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h 192.. kernel-doc:: drivers/gpu/drm/i915/intel_dpio_phy.c
193 :doc: DPIO 193 :doc: DPIO
194 194
195CSR firmware support for DMC 195CSR firmware support for DMC
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 542e570b3578..2f504f6a1c51 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -830,96 +830,7 @@ enum skl_disp_power_wells {
830#define CCK_FREQUENCY_STATUS_SHIFT 8 830#define CCK_FREQUENCY_STATUS_SHIFT 8
831#define CCK_FREQUENCY_VALUES (0x1f << 0) 831#define CCK_FREQUENCY_VALUES (0x1f << 0)
832 832
833/** 833/* DPIO registers */
834 * DOC: DPIO
835 *
836 * VLV, CHV and BXT have slightly peculiar display PHYs for driving DP/HDMI
837 * ports. DPIO is the name given to such a display PHY. These PHYs
838 * don't follow the standard programming model using direct MMIO
839 * registers, and instead their registers must be accessed trough IOSF
840 * sideband. VLV has one such PHY for driving ports B and C, and CHV
841 * adds another PHY for driving port D. Each PHY responds to specific
842 * IOSF-SB port.
843 *
844 * Each display PHY is made up of one or two channels. Each channel
845 * houses a common lane part which contains the PLL and other common
846 * logic. CH0 common lane also contains the IOSF-SB logic for the
847 * Common Register Interface (CRI) ie. the DPIO registers. CRI clock
848 * must be running when any DPIO registers are accessed.
849 *
850 * In addition to having their own registers, the PHYs are also
851 * controlled through some dedicated signals from the display
852 * controller. These include PLL reference clock enable, PLL enable,
853 * and CRI clock selection, for example.
854 *
855 * Eeach channel also has two splines (also called data lanes), and
856 * each spline is made up of one Physical Access Coding Sub-Layer
857 * (PCS) block and two TX lanes. So each channel has two PCS blocks
858 * and four TX lanes. The TX lanes are used as DP lanes or TMDS
859 * data/clock pairs depending on the output type.
860 *
861 * Additionally the PHY also contains an AUX lane with AUX blocks
862 * for each channel. This is used for DP AUX communication, but
863 * this fact isn't really relevant for the driver since AUX is
864 * controlled from the display controller side. No DPIO registers
865 * need to be accessed during AUX communication,
866 *
867 * Generally on VLV/CHV the common lane corresponds to the pipe and
868 * the spline (PCS/TX) corresponds to the port.
869 *
870 * For dual channel PHY (VLV/CHV):
871 *
872 * pipe A == CMN/PLL/REF CH0
873 *
874 * pipe B == CMN/PLL/REF CH1
875 *
876 * port B == PCS/TX CH0
877 *
878 * port C == PCS/TX CH1
879 *
880 * This is especially important when we cross the streams
881 * ie. drive port B with pipe B, or port C with pipe A.
882 *
883 * For single channel PHY (CHV):
884 *
885 * pipe C == CMN/PLL/REF CH0
886 *
887 * port D == PCS/TX CH0
888 *
889 * On BXT the entire PHY channel corresponds to the port. That means
890 * the PLL is also now associated with the port rather than the pipe,
891 * and so the clock needs to be routed to the appropriate transcoder.
892 * Port A PLL is directly connected to transcoder EDP and port B/C
893 * PLLs can be routed to any transcoder A/B/C.
894 *
895 * Note: DDI0 is digital port B, DD1 is digital port C, and DDI2 is
896 * digital port D (CHV) or port A (BXT). ::
897 *
898 *
899 * Dual channel PHY (VLV/CHV/BXT)
900 * ---------------------------------
901 * | CH0 | CH1 |
902 * | CMN/PLL/REF | CMN/PLL/REF |
903 * |---------------|---------------| Display PHY
904 * | PCS01 | PCS23 | PCS01 | PCS23 |
905 * |-------|-------|-------|-------|
906 * |TX0|TX1|TX2|TX3|TX0|TX1|TX2|TX3|
907 * ---------------------------------
908 * | DDI0 | DDI1 | DP/HDMI ports
909 * ---------------------------------
910 *
911 * Single channel PHY (CHV/BXT)
912 * -----------------
913 * | CH0 |
914 * | CMN/PLL/REF |
915 * |---------------| Display PHY
916 * | PCS01 | PCS23 |
917 * |-------|-------|
918 * |TX0|TX1|TX2|TX3|
919 * -----------------
920 * | DDI2 | DP/HDMI port
921 * -----------------
922 */
923#define DPIO_DEVFN 0 834#define DPIO_DEVFN 0
924 835
925#define DPIO_CTL _MMIO(VLV_DISPLAY_BASE + 0x2110) 836#define DPIO_CTL _MMIO(VLV_DISPLAY_BASE + 0x2110)
diff --git a/drivers/gpu/drm/i915/intel_dpio_phy.c b/drivers/gpu/drm/i915/intel_dpio_phy.c
index edf0cfd860c4..680629697ea6 100644
--- a/drivers/gpu/drm/i915/intel_dpio_phy.c
+++ b/drivers/gpu/drm/i915/intel_dpio_phy.c
@@ -23,6 +23,97 @@
23 23
24#include "intel_drv.h" 24#include "intel_drv.h"
25 25
26/**
27 * DOC: DPIO
28 *
29 * VLV, CHV and BXT have slightly peculiar display PHYs for driving DP/HDMI
30 * ports. DPIO is the name given to such a display PHY. These PHYs
31 * don't follow the standard programming model using direct MMIO
32 * registers, and instead their registers must be accessed trough IOSF
33 * sideband. VLV has one such PHY for driving ports B and C, and CHV
34 * adds another PHY for driving port D. Each PHY responds to specific
35 * IOSF-SB port.
36 *
37 * Each display PHY is made up of one or two channels. Each channel
38 * houses a common lane part which contains the PLL and other common
39 * logic. CH0 common lane also contains the IOSF-SB logic for the
40 * Common Register Interface (CRI) ie. the DPIO registers. CRI clock
41 * must be running when any DPIO registers are accessed.
42 *
43 * In addition to having their own registers, the PHYs are also
44 * controlled through some dedicated signals from the display
45 * controller. These include PLL reference clock enable, PLL enable,
46 * and CRI clock selection, for example.
47 *
48 * Eeach channel also has two splines (also called data lanes), and
49 * each spline is made up of one Physical Access Coding Sub-Layer
50 * (PCS) block and two TX lanes. So each channel has two PCS blocks
51 * and four TX lanes. The TX lanes are used as DP lanes or TMDS
52 * data/clock pairs depending on the output type.
53 *
54 * Additionally the PHY also contains an AUX lane with AUX blocks
55 * for each channel. This is used for DP AUX communication, but
56 * this fact isn't really relevant for the driver since AUX is
57 * controlled from the display controller side. No DPIO registers
58 * need to be accessed during AUX communication,
59 *
60 * Generally on VLV/CHV the common lane corresponds to the pipe and
61 * the spline (PCS/TX) corresponds to the port.
62 *
63 * For dual channel PHY (VLV/CHV):
64 *
65 * pipe A == CMN/PLL/REF CH0
66 *
67 * pipe B == CMN/PLL/REF CH1
68 *
69 * port B == PCS/TX CH0
70 *
71 * port C == PCS/TX CH1
72 *
73 * This is especially important when we cross the streams
74 * ie. drive port B with pipe B, or port C with pipe A.
75 *
76 * For single channel PHY (CHV):
77 *
78 * pipe C == CMN/PLL/REF CH0
79 *
80 * port D == PCS/TX CH0
81 *
82 * On BXT the entire PHY channel corresponds to the port. That means
83 * the PLL is also now associated with the port rather than the pipe,
84 * and so the clock needs to be routed to the appropriate transcoder.
85 * Port A PLL is directly connected to transcoder EDP and port B/C
86 * PLLs can be routed to any transcoder A/B/C.
87 *
88 * Note: DDI0 is digital port B, DD1 is digital port C, and DDI2 is
89 * digital port D (CHV) or port A (BXT). ::
90 *
91 *
92 * Dual channel PHY (VLV/CHV/BXT)
93 * ---------------------------------
94 * | CH0 | CH1 |
95 * | CMN/PLL/REF | CMN/PLL/REF |
96 * |---------------|---------------| Display PHY
97 * | PCS01 | PCS23 | PCS01 | PCS23 |
98 * |-------|-------|-------|-------|
99 * |TX0|TX1|TX2|TX3|TX0|TX1|TX2|TX3|
100 * ---------------------------------
101 * | DDI0 | DDI1 | DP/HDMI ports
102 * ---------------------------------
103 *
104 * Single channel PHY (CHV/BXT)
105 * -----------------
106 * | CH0 |
107 * | CMN/PLL/REF |
108 * |---------------| Display PHY
109 * | PCS01 | PCS23 |
110 * |-------|-------|
111 * |TX0|TX1|TX2|TX3|
112 * -----------------
113 * | DDI2 | DP/HDMI port
114 * -----------------
115 */
116
26bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv, 117bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
27 enum dpio_phy phy) 118 enum dpio_phy phy)
28{ 119{