Skip to content

Commit 13e1592

Browse files
committed
drm/i915: Add documentation to gen9_set_dc_state()
Add documentation to gen9_set_dc_state() on what enabling a given DC state means and at what point HW/DMC actually enters/exits these states. Cc: Jani Nikula <jani.nikula@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180417113147.25120-1-imre.deak@intel.com
1 parent 52cc801 commit 13e1592

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,29 @@ void gen9_sanitize_dc_state(struct drm_i915_private *dev_priv)
542542
dev_priv->csr.dc_state = val;
543543
}
544544

545+
/**
546+
* gen9_set_dc_state - set target display C power state
547+
* @dev_priv: i915 device instance
548+
* @state: target DC power state
549+
* - DC_STATE_DISABLE
550+
* - DC_STATE_EN_UPTO_DC5
551+
* - DC_STATE_EN_UPTO_DC6
552+
* - DC_STATE_EN_DC9
553+
*
554+
* Signal to DMC firmware/HW the target DC power state passed in @state.
555+
* DMC/HW can turn off individual display clocks and power rails when entering
556+
* a deeper DC power state (higher in number) and turns these back when exiting
557+
* that state to a shallower power state (lower in number). The HW will decide
558+
* when to actually enter a given state on an on-demand basis, for instance
559+
* depending on the active state of display pipes. The state of display
560+
* registers backed by affected power rails are saved/restored as needed.
561+
*
562+
* Based on the above enabling a deeper DC power state is asynchronous wrt.
563+
* enabling it. Disabling a deeper power state is synchronous: for instance
564+
* setting %DC_STATE_DISABLE won't complete until all HW resources are turned
565+
* back on and register state is restored. This is guaranteed by the MMIO write
566+
* to DC_STATE_EN blocking until the state is restored.
567+
*/
545568
static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state)
546569
{
547570
uint32_t val;

0 commit comments

Comments
 (0)