diff options
author | Satheeshakrishna M <satheeshakrishna.m@intel.com> | 2015-02-04 08:57:44 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-02-13 17:28:01 -0500 |
commit | 94dd5138c5ed02d26982d9704e8c1e9d72e20b40 (patch) | |
tree | 97116c2b698bc1e94a40381fb208f4b07f07542c /drivers/gpu/drm/i915/i915_reg.h | |
parent | afd65eb4cc0578a9c07d621acdb8a570e2782bf7 (diff) |
drm/i915/skl: Implementation of SKL display power well support
This patch implements core logic of SKL display power well.
v2: Addressed Imre's comments
- Added respective DDIs under power well #1 and #2
- Simplified repetitive code in power well programming
v3: Implemented Imre's comments
- Further simplified power well programming
- Made sure that PW 1 is enabled prior to PW 2
v4: Fix minor conflict with the the cherryview support (Damien)
v5: Add the PLL power domain to the always on power well (Damien)
v6: Disable BIOS power well (Imre)
Use power well data for comparison (Imre)
Put the PLL power domain into PW1 as its needed for CDCLK (Satheesh,
Damien)
v7: Addressed Imre's comments
- Lowered the time out to 1ms
- Added parantheses in macro
- Moved debug message and fixed wait_for interval
v8:
- Add a WARN() when swiching on an unknown power well (Imre, done by Damien)
- Whitespace fixes (spaces instead of tabs) (Damien)
v9: (Imre, done by Damien)
- Merge the register definitions with this patch
- Merge the MISC IO power well in this patch
v10: (Imre, done by Damien)
- Define the Misc I/O power domains to be the power well 1 ones as Misc I/O
needs to be enabled with PW1
- Added Transcoder A and VGA domains to PW 2
- Remove the MISC_IO power domains as well in the the always on
domains definition
- Move Misc I/O power well at the top of the power well list so it's turned
on right after PW1.
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v3,v6,v7)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
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.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 33b3d0a24071..cd3430f931ed 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -586,6 +586,19 @@ enum punit_power_well { | |||
586 | PUNIT_POWER_WELL_NUM, | 586 | PUNIT_POWER_WELL_NUM, |
587 | }; | 587 | }; |
588 | 588 | ||
589 | enum skl_disp_power_wells { | ||
590 | SKL_DISP_PW_MISC_IO, | ||
591 | SKL_DISP_PW_DDI_A_E, | ||
592 | SKL_DISP_PW_DDI_B, | ||
593 | SKL_DISP_PW_DDI_C, | ||
594 | SKL_DISP_PW_DDI_D, | ||
595 | SKL_DISP_PW_1 = 14, | ||
596 | SKL_DISP_PW_2, | ||
597 | }; | ||
598 | |||
599 | #define SKL_POWER_WELL_STATE(pw) (1 << ((pw) * 2)) | ||
600 | #define SKL_POWER_WELL_REQ(pw) (1 << (((pw) * 2) + 1)) | ||
601 | |||
589 | #define PUNIT_REG_PWRGT_CTRL 0x60 | 602 | #define PUNIT_REG_PWRGT_CTRL 0x60 |
590 | #define PUNIT_REG_PWRGT_STATUS 0x61 | 603 | #define PUNIT_REG_PWRGT_STATUS 0x61 |
591 | #define PUNIT_PWRGT_MASK(power_well) (3 << ((power_well) * 2)) | 604 | #define PUNIT_PWRGT_MASK(power_well) (3 << ((power_well) * 2)) |
@@ -6351,6 +6364,13 @@ enum punit_power_well { | |||
6351 | #define HSW_PWR_WELL_FORCE_ON (1<<19) | 6364 | #define HSW_PWR_WELL_FORCE_ON (1<<19) |
6352 | #define HSW_PWR_WELL_CTL6 0x45414 | 6365 | #define HSW_PWR_WELL_CTL6 0x45414 |
6353 | 6366 | ||
6367 | /* SKL Fuse Status */ | ||
6368 | #define SKL_FUSE_STATUS 0x42000 | ||
6369 | #define SKL_FUSE_DOWNLOAD_STATUS (1<<31) | ||
6370 | #define SKL_FUSE_PG0_DIST_STATUS (1<<27) | ||
6371 | #define SKL_FUSE_PG1_DIST_STATUS (1<<26) | ||
6372 | #define SKL_FUSE_PG2_DIST_STATUS (1<<25) | ||
6373 | |||
6354 | /* Per-pipe DDI Function Control */ | 6374 | /* Per-pipe DDI Function Control */ |
6355 | #define TRANS_DDI_FUNC_CTL_A 0x60400 | 6375 | #define TRANS_DDI_FUNC_CTL_A 0x60400 |
6356 | #define TRANS_DDI_FUNC_CTL_B 0x61400 | 6376 | #define TRANS_DDI_FUNC_CTL_B 0x61400 |