aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-25 13:14:31 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-05-22 08:10:38 -0400
commit0e76718923ca71548636bf02adc48e6104e4fb05 (patch)
treece67032573b0e4e3f9940e0bad6ada724ceb64ac
parent46470fc932ac8a0e8317a220b3f4ea4ed903338e (diff)
drm/i915: Add a brief description of the VLV display PHY internals
Document the internal structure of the VLV display PHY a bit to help people understand how the different register blocks relate to each other. v2: Add a bit more text Make it a DOC: comment, but leave the ascii art out since it would get mangled Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chon Ming Lee <chon.ming.lee@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--Documentation/DocBook/drm.tmpl4
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h85
2 files changed, 85 insertions, 4 deletions
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 62573c17091d..b4f12d455166 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -2937,6 +2937,10 @@ int num_ioctls;</synopsis>
2937 probing, so those sections fully apply. 2937 probing, so those sections fully apply.
2938 </para> 2938 </para>
2939 </sect2> 2939 </sect2>
2940 <sect2>
2941 <title>DPIO</title>
2942!Pdrivers/gpu/drm/i915/i915_reg.h DPIO
2943 </sect2>
2940 </sect1> 2944 </sect1>
2941 2945
2942 <sect1> 2946 <sect1>
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index bab5d17f67d1..9b3681ee4a69 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -575,12 +575,89 @@ enum punit_power_well {
575#define DSI_PLL_M1_DIV_MASK (0x1ff << 0) 575#define DSI_PLL_M1_DIV_MASK (0x1ff << 0)
576#define CCK_DISPLAY_CLOCK_CONTROL 0x6b 576#define CCK_DISPLAY_CLOCK_CONTROL 0x6b
577 577
578/* 578/**
579 * DPIO - a special bus for various display related registers to hide behind 579 * DOC: DPIO
580 *
581 * VLV and CHV have slightly peculiar display PHYs for driving DP/HDMI
582 * ports. DPIO is the name given to such a display PHY. These PHYs
583 * don't follow the standard programming model using direct MMIO
584 * registers, and instead their registers must be accessed trough IOSF
585 * sideband. VLV has one such PHY for driving ports B and C, and CHV
586 * adds another PHY for driving port D. Each PHY responds to specific
587 * IOSF-SB port.
588 *
589 * Each display PHY is made up of one or two channels. Each channel
590 * houses a common lane part which contains the PLL and other common
591 * logic. CH0 common lane also contains the IOSF-SB logic for the
592 * Common Register Interface (CRI) ie. the DPIO registers. CRI clock
593 * must be running when any DPIO registers are accessed.
594 *
595 * In addition to having their own registers, the PHYs are also
596 * controlled through some dedicated signals from the display
597 * controller. These include PLL reference clock enable, PLL enable,
598 * and CRI clock selection, for example.
599 *
600 * Eeach channel also has two splines (also called data lanes), and
601 * each spline is made up of one Physical Access Coding Sub-Layer
602 * (PCS) block and two TX lanes. So each channel has two PCS blocks
603 * and four TX lanes. The TX lanes are used as DP lanes or TMDS
604 * data/clock pairs depending on the output type.
605 *
606 * Additionally the PHY also contains an AUX lane with AUX blocks
607 * for each channel. This is used for DP AUX communication, but
608 * this fact isn't really relevant for the driver since AUX is
609 * controlled from the display controller side. No DPIO registers
610 * need to be accessed during AUX communication,
611 *
612 * Generally the common lane corresponds to the pipe and
613 * the spline (PCS/TX) correponds to the port.
614 *
615 * For dual channel PHY (VLV/CHV):
616 *
617 * pipe A == CMN/PLL/REF CH0
580 * 618 *
581 * DPIO is VLV only. 619 * pipe B == CMN/PLL/REF CH1
620 *
621 * port B == PCS/TX CH0
622 *
623 * port C == PCS/TX CH1
624 *
625 * This is especially important when we cross the streams
626 * ie. drive port B with pipe B, or port C with pipe A.
627 *
628 * For single channel PHY (CHV):
629 *
630 * pipe C == CMN/PLL/REF CH0
631 *
632 * port D == PCS/TX CH0
633 *
634 * Note: digital port B is DDI0, digital port C is DDI1,
635 * digital port D is DDI2
636 */
637/*
638 * Dual channel PHY (VLV/CHV)
639 * ---------------------------------
640 * | CH0 | CH1 |
641 * | CMN/PLL/REF | CMN/PLL/REF |
642 * |---------------|---------------| Display PHY
643 * | PCS01 | PCS23 | PCS01 | PCS23 |
644 * |-------|-------|-------|-------|
645 * |TX0|TX1|TX2|TX3|TX0|TX1|TX2|TX3|
646 * ---------------------------------
647 * | DDI0 | DDI1 | DP/HDMI ports
648 * ---------------------------------
582 * 649 *
583 * Note: digital port B is DDI0, digital pot C is DDI1 650 * Single channel PHY (CHV)
651 * -----------------
652 * | CH0 |
653 * | CMN/PLL/REF |
654 * |---------------| Display PHY
655 * | PCS01 | PCS23 |
656 * |-------|-------|
657 * |TX0|TX1|TX2|TX3|
658 * -----------------
659 * | DDI2 | DP/HDMI port
660 * -----------------
584 */ 661 */
585#define DPIO_DEVFN 0 662#define DPIO_DEVFN 0
586 663