aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_reg.h
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@gmail.com>2013-07-11 17:44:58 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-18 03:59:41 -0400
commit2b28bb1b6440fadececc4cf8f29c55d510c6db09 (patch)
tree5c1176d0ef91bb094d3fc432a38d1eb8af19255d /drivers/gpu/drm/i915/i915_reg.h
parentb84a1cf8950ed075c4ab2630514d4caaae504176 (diff)
drm/i915: Enable/Disable PSR
Adding Enable and Disable PSR functionalities. This includes setting the PSR configuration over AUX, sending SDP VSC DIP over the eDP PIPE config, enabling PSR in the sink via DPCD register and finally enabling PSR on the host. This patch is based on initial PSR code by Sateesh Kavuri and Kumar Shobhit but in a different implementation. v2: * moved functions around and changed its names. * removed VSC DIP unset from disable. * remove FBC wa. * don't mask LSPS anymore. * incorporate new crtc usage after a rebase. v3: Make a clear separation between Sink (Panel) and Source (HW) enabling. v4: Fix identation and other style issues raised by checkpatch (by Paulo). v5: Changes according to Paulo's review: static on write_vsc; avoid using dp_to_dev when already calling dp_to_dig_port; remove unecessary TP default time setting; remove unecessary interrupts disabling; remove unecessary wait_for_vblank when disabling psr; v6: remove unecessary wait_for_vblank when writing vsc; v7: adding setup once function to avoid unnecessarily write to vsc and set debug_ctl every time we enable or disable psr. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Credits-by: Sateesh Kavuri <sateesh.kavuri@intel.com> Credits-by: Shobhit Kumar <shobhit.kumar@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Shobhit Kumar <shobhit.kumar@intel.com> [danvet: Apply Paulo's suggestion for unconditionally clearing the control register when writing the DIP.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 5e58a44c5fe3..56cb79d4a980 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1779,6 +1779,47 @@
1779#define BCLRPAT(pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B) 1779#define BCLRPAT(pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B)
1780#define VSYNCSHIFT(trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B) 1780#define VSYNCSHIFT(trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B)
1781 1781
1782/* HSW eDP PSR registers */
1783#define EDP_PSR_CTL 0x64800
1784#define EDP_PSR_ENABLE (1<<31)
1785#define EDP_PSR_LINK_DISABLE (0<<27)
1786#define EDP_PSR_LINK_STANDBY (1<<27)
1787#define EDP_PSR_MIN_LINK_ENTRY_TIME_MASK (3<<25)
1788#define EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES (0<<25)
1789#define EDP_PSR_MIN_LINK_ENTRY_TIME_4_LINES (1<<25)
1790#define EDP_PSR_MIN_LINK_ENTRY_TIME_2_LINES (2<<25)
1791#define EDP_PSR_MIN_LINK_ENTRY_TIME_0_LINES (3<<25)
1792#define EDP_PSR_MAX_SLEEP_TIME_SHIFT 20
1793#define EDP_PSR_SKIP_AUX_EXIT (1<<12)
1794#define EDP_PSR_TP1_TP2_SEL (0<<11)
1795#define EDP_PSR_TP1_TP3_SEL (1<<11)
1796#define EDP_PSR_TP2_TP3_TIME_500us (0<<8)
1797#define EDP_PSR_TP2_TP3_TIME_100us (1<<8)
1798#define EDP_PSR_TP2_TP3_TIME_2500us (2<<8)
1799#define EDP_PSR_TP2_TP3_TIME_0us (3<<8)
1800#define EDP_PSR_TP1_TIME_500us (0<<4)
1801#define EDP_PSR_TP1_TIME_100us (1<<4)
1802#define EDP_PSR_TP1_TIME_2500us (2<<4)
1803#define EDP_PSR_TP1_TIME_0us (3<<4)
1804#define EDP_PSR_IDLE_FRAME_SHIFT 0
1805
1806#define EDP_PSR_AUX_CTL 0x64810
1807#define EDP_PSR_AUX_DATA1 0x64814
1808#define EDP_PSR_DPCD_COMMAND 0x80060000
1809#define EDP_PSR_AUX_DATA2 0x64818
1810#define EDP_PSR_DPCD_NORMAL_OPERATION (1<<24)
1811#define EDP_PSR_AUX_DATA3 0x6481c
1812#define EDP_PSR_AUX_DATA4 0x64820
1813#define EDP_PSR_AUX_DATA5 0x64824
1814
1815#define EDP_PSR_STATUS_CTL 0x64840
1816#define EDP_PSR_STATUS_STATE_MASK (7<<29)
1817
1818#define EDP_PSR_DEBUG_CTL 0x64860
1819#define EDP_PSR_DEBUG_MASK_LPSP (1<<27)
1820#define EDP_PSR_DEBUG_MASK_MEMUP (1<<26)
1821#define EDP_PSR_DEBUG_MASK_HPD (1<<25)
1822
1782/* VGA port control */ 1823/* VGA port control */
1783#define ADPA 0x61100 1824#define ADPA 0x61100
1784#define PCH_ADPA 0xe1100 1825#define PCH_ADPA 0xe1100
@@ -2048,6 +2089,7 @@
2048 * (Haswell and newer) to see which VIDEO_DIP_DATA byte corresponds to each byte 2089 * (Haswell and newer) to see which VIDEO_DIP_DATA byte corresponds to each byte
2049 * of the infoframe structure specified by CEA-861. */ 2090 * of the infoframe structure specified by CEA-861. */
2050#define VIDEO_DIP_DATA_SIZE 32 2091#define VIDEO_DIP_DATA_SIZE 32
2092#define VIDEO_DIP_VSC_DATA_SIZE 36
2051#define VIDEO_DIP_CTL 0x61170 2093#define VIDEO_DIP_CTL 0x61170
2052/* Pre HSW: */ 2094/* Pre HSW: */
2053#define VIDEO_DIP_ENABLE (1 << 31) 2095#define VIDEO_DIP_ENABLE (1 << 31)