Commit 4c4cc7ac authored by Mika Kahola's avatar Mika Kahola Committed by Radhakrishna Sripada

drm/i915/mtl: Add support for PM DEMAND

MTL introduces a new way to instruct the PUnit with
power and bandwidth requirements of DE. Add the functionality
to program the registers and handle waits using interrupts.
The current wait time for timeouts is programmed for 10 msecs to
factor in the worst case scenarios. Changes made to use REG_BIT
for a register that we touched(GEN8_DE_MISC_IER _MMIO).

Wa_14016740474 is added which applies to Xe_LPD+ display

v2: checkpatch warning fixes, simplify program pmdemand part

v3: update to dbufs and pipes values to pmdemand register(stan)
    Removed the macro usage in update_pmdemand_values()

v4: move the pmdemand_pre_plane_update before cdclk update
    pmdemand_needs_update included cdclk params comparisons
    pmdemand_state NULL check (Gustavo)
    pmdemand.o in sorted order in the makefile (Jani)
    update pmdemand misc irq handler loop (Gustavo)
    active phys bitmask and programming correction (Gustavo)

v5: simplify pmdemand_state structure
    simplify methods to find active phys and max port clock
    Timeout in case of previou pmdemand task pending (Gustavo)

v6: rebasing
    updates to max_ddiclk calculations (Gustavo)
    updates to active_phys count method (Gustavo)

v7: use two separate loop to iterate throug old and new
    crtc states to calculate the active phys (Gustavo)

v8: use uniform function names (Gustavo)

v9: For phys change iterate through connectors (Imre)
    Look for change in phys for pmdemand update (Gustavo, Imre)
    Some more stlying changes (Imre)
    Update pmdemand state during HW readout/sanitize (Imre)

v10: Fix CI checkpatch warnings

v11: use correct pmdemand object pointer during hw readout,
     simplify the check for phys need update (Gustavo)

v12: Handle possible non serialize cases (Imre)
     Initialise also pmdemand params HW readout (Imre)
     Update active phys mask during sanitize calls (Imre)
     Check TC/encoder changes to limit connector update (Imre)

v13: Check display version before accessing pmdemand functions

v14: Move is_serialized to intel_global_state.c
     simplify update params and other stlying issues (Imre)

Bspec: 66451, 64636, 64602, 64603
Cc: Matt Atwood <matthew.s.atwood@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
Signed-off-by: default avatarVinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> #v4
Acked-by: Gustavo Sousa <gustavo.sousa@intel.com> #v11
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
[RK: Fixed minor typo in one of the comments. s/qclck_gc/qclk_gv/]
Signed-off-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230606201032.347449-1-vinod.govindapillai@intel.com
parent a5819e51
...@@ -269,6 +269,7 @@ i915-y += \ ...@@ -269,6 +269,7 @@ i915-y += \
display/intel_pch_display.o \ display/intel_pch_display.o \
display/intel_pch_refclk.o \ display/intel_pch_refclk.o \
display/intel_plane_initial.o \ display/intel_plane_initial.o \
display/intel_pmdemand.o \
display/intel_psr.o \ display/intel_psr.o \
display/intel_quirks.o \ display/intel_quirks.o \
display/intel_sprite.o \ display/intel_sprite.o \
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
#include "intel_pcode.h" #include "intel_pcode.h"
#include "intel_pipe_crc.h" #include "intel_pipe_crc.h"
#include "intel_plane_initial.h" #include "intel_plane_initial.h"
#include "intel_pmdemand.h"
#include "intel_pps.h" #include "intel_pps.h"
#include "intel_psr.h" #include "intel_psr.h"
#include "intel_sdvo.h" #include "intel_sdvo.h"
...@@ -6354,6 +6355,10 @@ int intel_atomic_check(struct drm_device *dev, ...@@ -6354,6 +6355,10 @@ int intel_atomic_check(struct drm_device *dev,
return ret; return ret;
} }
ret = intel_pmdemand_atomic_check(state);
if (ret)
goto fail;
ret = intel_atomic_check_crtcs(state); ret = intel_atomic_check_crtcs(state);
if (ret) if (ret)
goto fail; goto fail;
...@@ -6999,6 +7004,14 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state) ...@@ -6999,6 +7004,14 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i)
crtc->config = new_crtc_state; crtc->config = new_crtc_state;
/*
* In XE_LPD+ Pmdemand combines many parameters such as voltage index,
* plls, cdclk frequency, QGV point selection parameter etc. Voltage
* index, cdclk/ddiclk frequencies are supposed to be configured before
* the cdclk config is set.
*/
intel_pmdemand_pre_plane_update(state);
if (state->modeset) { if (state->modeset) {
drm_atomic_helper_update_legacy_modeset_state(dev, &state->base); drm_atomic_helper_update_legacy_modeset_state(dev, &state->base);
...@@ -7118,6 +7131,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state) ...@@ -7118,6 +7131,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
intel_verify_planes(state); intel_verify_planes(state);
intel_sagv_post_plane_update(state); intel_sagv_post_plane_update(state);
intel_pmdemand_post_plane_update(state);
drm_atomic_helper_commit_hw_done(&state->base); drm_atomic_helper_commit_hw_done(&state->base);
......
...@@ -345,6 +345,15 @@ struct intel_display { ...@@ -345,6 +345,15 @@ struct intel_display {
struct intel_global_obj obj; struct intel_global_obj obj;
} dbuf; } dbuf;
struct {
wait_queue_head_t waitqueue;
/* mutex to protect pmdemand programming sequence */
struct mutex lock;
struct intel_global_obj obj;
} pmdemand;
struct { struct {
/* /*
* dkl.phy_lock protects against concurrent access of the * dkl.phy_lock protects against concurrent access of the
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "intel_opregion.h" #include "intel_opregion.h"
#include "intel_overlay.h" #include "intel_overlay.h"
#include "intel_plane_initial.h" #include "intel_plane_initial.h"
#include "intel_pmdemand.h"
#include "intel_pps.h" #include "intel_pps.h"
#include "intel_quirks.h" #include "intel_quirks.h"
#include "intel_vga.h" #include "intel_vga.h"
...@@ -211,6 +212,8 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915) ...@@ -211,6 +212,8 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
if (ret < 0) if (ret < 0)
goto cleanup_vga; goto cleanup_vga;
intel_pmdemand_init_early(i915);
intel_power_domains_init_hw(i915, false); intel_power_domains_init_hw(i915, false);
if (!HAS_DISPLAY(i915)) if (!HAS_DISPLAY(i915))
...@@ -240,6 +243,10 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915) ...@@ -240,6 +243,10 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
if (ret) if (ret)
goto cleanup_vga_client_pw_domain_dmc; goto cleanup_vga_client_pw_domain_dmc;
ret = intel_pmdemand_init(i915);
if (ret)
goto cleanup_vga_client_pw_domain_dmc;
init_llist_head(&i915->display.atomic_helper.free_list); init_llist_head(&i915->display.atomic_helper.free_list);
INIT_WORK(&i915->display.atomic_helper.free_work, INIT_WORK(&i915->display.atomic_helper.free_work,
intel_atomic_helper_free_state_worker); intel_atomic_helper_free_state_worker);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "intel_fifo_underrun.h" #include "intel_fifo_underrun.h"
#include "intel_gmbus.h" #include "intel_gmbus.h"
#include "intel_hotplug_irq.h" #include "intel_hotplug_irq.h"
#include "intel_pmdemand.h"
#include "intel_psr.h" #include "intel_psr.h"
#include "intel_psr_regs.h" #include "intel_psr_regs.h"
...@@ -827,12 +828,27 @@ static u32 gen8_de_pipe_fault_mask(struct drm_i915_private *dev_priv) ...@@ -827,12 +828,27 @@ static u32 gen8_de_pipe_fault_mask(struct drm_i915_private *dev_priv)
return GEN8_DE_PIPE_IRQ_FAULT_ERRORS; return GEN8_DE_PIPE_IRQ_FAULT_ERRORS;
} }
static void intel_pmdemand_irq_handler(struct drm_i915_private *dev_priv)
{
wake_up_all(&dev_priv->display.pmdemand.waitqueue);
}
static void static void
gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir) gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
{ {
bool found = false; bool found = false;
if (iir & GEN8_DE_MISC_GSE) { if (DISPLAY_VER(dev_priv) >= 14) {
if (iir & (XELPDP_PMDEMAND_RSP |
XELPDP_PMDEMAND_RSPTOUT_ERR)) {
if (iir & XELPDP_PMDEMAND_RSPTOUT_ERR)
drm_dbg(&dev_priv->drm,
"Error waiting for Punit PM Demand Response\n");
intel_pmdemand_irq_handler(dev_priv);
found = true;
}
} else if (iir & GEN8_DE_MISC_GSE) {
intel_opregion_asle_intr(dev_priv); intel_opregion_asle_intr(dev_priv);
found = true; found = true;
} }
...@@ -1576,7 +1592,10 @@ void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv) ...@@ -1576,7 +1592,10 @@ void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
de_port_masked |= BXT_DE_PORT_GMBUS; de_port_masked |= BXT_DE_PORT_GMBUS;
if (DISPLAY_VER(dev_priv) >= 11) { if (DISPLAY_VER(dev_priv) >= 14) {
de_misc_masked |= XELPDP_PMDEMAND_RSPTOUT_ERR |
XELPDP_PMDEMAND_RSP;
} else if (DISPLAY_VER(dev_priv) >= 11) {
enum port port; enum port port;
if (intel_bios_is_dsi_present(dev_priv, &port)) if (intel_bios_is_dsi_present(dev_priv, &port))
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "intel_mchbar_regs.h" #include "intel_mchbar_regs.h"
#include "intel_pch_refclk.h" #include "intel_pch_refclk.h"
#include "intel_pcode.h" #include "intel_pcode.h"
#include "intel_pmdemand.h"
#include "intel_pps_regs.h" #include "intel_pps_regs.h"
#include "intel_snps_phy.h" #include "intel_snps_phy.h"
#include "skl_watermark.h" #include "skl_watermark.h"
...@@ -1082,20 +1083,29 @@ void gen9_dbuf_slices_update(struct drm_i915_private *dev_priv, ...@@ -1082,20 +1083,29 @@ void gen9_dbuf_slices_update(struct drm_i915_private *dev_priv,
static void gen9_dbuf_enable(struct drm_i915_private *dev_priv) static void gen9_dbuf_enable(struct drm_i915_private *dev_priv)
{ {
u8 slices_mask;
dev_priv->display.dbuf.enabled_slices = dev_priv->display.dbuf.enabled_slices =
intel_enabled_dbuf_slices_mask(dev_priv); intel_enabled_dbuf_slices_mask(dev_priv);
slices_mask = BIT(DBUF_S1) | dev_priv->display.dbuf.enabled_slices;
if (DISPLAY_VER(dev_priv) >= 14)
intel_pmdemand_program_dbuf(dev_priv, slices_mask);
/* /*
* Just power up at least 1 slice, we will * Just power up at least 1 slice, we will
* figure out later which slices we have and what we need. * figure out later which slices we have and what we need.
*/ */
gen9_dbuf_slices_update(dev_priv, BIT(DBUF_S1) | gen9_dbuf_slices_update(dev_priv, slices_mask);
dev_priv->display.dbuf.enabled_slices);
} }
static void gen9_dbuf_disable(struct drm_i915_private *dev_priv) static void gen9_dbuf_disable(struct drm_i915_private *dev_priv)
{ {
gen9_dbuf_slices_update(dev_priv, 0); gen9_dbuf_slices_update(dev_priv, 0);
if (DISPLAY_VER(dev_priv) >= 14)
intel_pmdemand_program_dbuf(dev_priv, 0);
} }
static void gen12_dbuf_slices_config(struct drm_i915_private *dev_priv) static void gen12_dbuf_slices_config(struct drm_i915_private *dev_priv)
......
...@@ -255,3 +255,15 @@ int intel_atomic_serialize_global_state(struct intel_global_state *obj_state) ...@@ -255,3 +255,15 @@ int intel_atomic_serialize_global_state(struct intel_global_state *obj_state)
return 0; return 0;
} }
bool
intel_atomic_global_state_is_serialized(struct intel_atomic_state *state)
{
struct drm_i915_private *i915 = to_i915(state->base.dev);
struct intel_crtc *crtc;
for_each_intel_crtc(&i915->drm, crtc)
if (!intel_atomic_get_new_crtc_state(state, crtc))
return false;
return true;
}
...@@ -87,4 +87,6 @@ void intel_atomic_clear_global_state(struct intel_atomic_state *state); ...@@ -87,4 +87,6 @@ void intel_atomic_clear_global_state(struct intel_atomic_state *state);
int intel_atomic_lock_global_state(struct intel_global_state *obj_state); int intel_atomic_lock_global_state(struct intel_global_state *obj_state);
int intel_atomic_serialize_global_state(struct intel_global_state *obj_state); int intel_atomic_serialize_global_state(struct intel_global_state *obj_state);
bool intel_atomic_global_state_is_serialized(struct intel_atomic_state *state);
#endif #endif
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "intel_fifo_underrun.h" #include "intel_fifo_underrun.h"
#include "intel_modeset_setup.h" #include "intel_modeset_setup.h"
#include "intel_pch_display.h" #include "intel_pch_display.h"
#include "intel_pmdemand.h"
#include "intel_tc.h" #include "intel_tc.h"
#include "intel_vblank.h" #include "intel_vblank.h"
#include "intel_wm.h" #include "intel_wm.h"
...@@ -115,6 +116,8 @@ static void set_encoder_for_connector(struct intel_connector *connector, ...@@ -115,6 +116,8 @@ static void set_encoder_for_connector(struct intel_connector *connector,
static void reset_encoder_connector_state(struct intel_encoder *encoder) static void reset_encoder_connector_state(struct intel_encoder *encoder)
{ {
struct drm_i915_private *i915 = to_i915(encoder->base.dev); struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct intel_pmdemand_state *pmdemand_state =
to_intel_pmdemand_state(i915->display.pmdemand.obj.state);
struct intel_connector *connector; struct intel_connector *connector;
struct drm_connector_list_iter conn_iter; struct drm_connector_list_iter conn_iter;
...@@ -123,6 +126,10 @@ static void reset_encoder_connector_state(struct intel_encoder *encoder) ...@@ -123,6 +126,10 @@ static void reset_encoder_connector_state(struct intel_encoder *encoder)
if (connector->base.encoder != &encoder->base) if (connector->base.encoder != &encoder->base)
continue; continue;
/* Clear the corresponding bit in pmdemand active phys mask */
intel_pmdemand_update_phys_mask(i915, encoder,
pmdemand_state, false);
set_encoder_for_connector(connector, NULL); set_encoder_for_connector(connector, NULL);
connector->base.dpms = DRM_MODE_DPMS_OFF; connector->base.dpms = DRM_MODE_DPMS_OFF;
...@@ -151,6 +158,8 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc) ...@@ -151,6 +158,8 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
to_intel_cdclk_state(i915->display.cdclk.obj.state); to_intel_cdclk_state(i915->display.cdclk.obj.state);
struct intel_dbuf_state *dbuf_state = struct intel_dbuf_state *dbuf_state =
to_intel_dbuf_state(i915->display.dbuf.obj.state); to_intel_dbuf_state(i915->display.dbuf.obj.state);
struct intel_pmdemand_state *pmdemand_state =
to_intel_pmdemand_state(i915->display.pmdemand.obj.state);
struct intel_crtc_state *crtc_state = struct intel_crtc_state *crtc_state =
to_intel_crtc_state(crtc->base.state); to_intel_crtc_state(crtc->base.state);
enum pipe pipe = crtc->pipe; enum pipe pipe = crtc->pipe;
...@@ -174,6 +183,8 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc) ...@@ -174,6 +183,8 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
bw_state->data_rate[pipe] = 0; bw_state->data_rate[pipe] = 0;
bw_state->num_active_planes[pipe] = 0; bw_state->num_active_planes[pipe] = 0;
intel_pmdemand_update_port_clock(i915, pmdemand_state, pipe, 0);
} }
/* /*
...@@ -552,6 +563,8 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) ...@@ -552,6 +563,8 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
struct intel_crtc_state *crtc_state = crtc ? struct intel_crtc_state *crtc_state = crtc ?
to_intel_crtc_state(crtc->base.state) : NULL; to_intel_crtc_state(crtc->base.state) : NULL;
struct intel_pmdemand_state *pmdemand_state =
to_intel_pmdemand_state(i915->display.pmdemand.obj.state);
/* /*
* We need to check both for a crtc link (meaning that the encoder is * We need to check both for a crtc link (meaning that the encoder is
...@@ -575,6 +588,10 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) ...@@ -575,6 +588,10 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
encoder->base.base.id, encoder->base.base.id,
encoder->base.name); encoder->base.name);
/* Clear the corresponding bit in pmdemand active phys mask */
intel_pmdemand_update_phys_mask(i915, encoder,
pmdemand_state, false);
/* /*
* Connector is active, but has no active pipe. This is fallout * Connector is active, but has no active pipe. This is fallout
* from our resume register restoring. Disable the encoder * from our resume register restoring. Disable the encoder
...@@ -661,6 +678,8 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915) ...@@ -661,6 +678,8 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
to_intel_cdclk_state(i915->display.cdclk.obj.state); to_intel_cdclk_state(i915->display.cdclk.obj.state);
struct intel_dbuf_state *dbuf_state = struct intel_dbuf_state *dbuf_state =
to_intel_dbuf_state(i915->display.dbuf.obj.state); to_intel_dbuf_state(i915->display.dbuf.obj.state);
struct intel_pmdemand_state *pmdemand_state =
to_intel_pmdemand_state(i915->display.pmdemand.obj.state);
enum pipe pipe; enum pipe pipe;
struct intel_crtc *crtc; struct intel_crtc *crtc;
struct intel_encoder *encoder; struct intel_encoder *encoder;
...@@ -724,7 +743,15 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915) ...@@ -724,7 +743,15 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
intel_encoder_get_config(encoder, slave_crtc_state); intel_encoder_get_config(encoder, slave_crtc_state);
} }
} }
intel_pmdemand_update_phys_mask(i915, encoder,
pmdemand_state,
true);
} else { } else {
intel_pmdemand_update_phys_mask(i915, encoder,
pmdemand_state,
false);
encoder->base.crtc = NULL; encoder->base.crtc = NULL;
} }
...@@ -841,8 +868,13 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915) ...@@ -841,8 +868,13 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
cdclk_state->min_voltage_level[crtc->pipe] = cdclk_state->min_voltage_level[crtc->pipe] =
crtc_state->min_voltage_level; crtc_state->min_voltage_level;
intel_pmdemand_update_port_clock(i915, pmdemand_state, pipe,
crtc_state->port_clock);
intel_bw_crtc_update(bw_state, crtc_state); intel_bw_crtc_update(bw_state, crtc_state);
} }
intel_pmdemand_init_pmdemand_params(i915, pmdemand_state);
} }
static void static void
......
This diff is collapsed.
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2023 Intel Corporation
*/
#ifndef __INTEL_PMDEMAND_H__
#define __INTEL_PMDEMAND_H__
#include "intel_display_limits.h"
#include "intel_global_state.h"
struct drm_i915_private;
struct intel_atomic_state;
struct intel_crtc_state;
struct intel_encoder;
struct intel_plane_state;
struct pmdemand_params {
u16 qclk_gv_bw;
u8 voltage_index;
u8 qclk_gv_index;
u8 active_pipes;
u8 active_dbufs;
/* Total number of non type C active phys from active_phys_mask */
u8 active_phys;
u8 plls;
u16 cdclk_freq_mhz;
/* max from ddi_clocks[] */
u16 ddiclk_max;
u8 scalers;
};
struct intel_pmdemand_state {
struct intel_global_state base;
/* Maintain a persistent list of port clocks across all crtcs */
int ddi_clocks[I915_MAX_PIPES];
/* Maintain a persistent list of non type C phys mask */
u16 active_combo_phys_mask;
/* Parameters to be configured in the pmdemand registers */
struct pmdemand_params params;
};
#define to_intel_pmdemand_state(x) container_of((x), \
struct intel_pmdemand_state, \
base)
void intel_pmdemand_init_early(struct drm_i915_private *i915);
int intel_pmdemand_init(struct drm_i915_private *i915);
void intel_pmdemand_init_pmdemand_params(struct drm_i915_private *i915,
struct intel_pmdemand_state *pmdemand_state);
void intel_pmdemand_update_port_clock(struct drm_i915_private *i915,
struct intel_pmdemand_state *pmdemand_state,
enum pipe pipe, int port_clock);
void intel_pmdemand_update_phys_mask(struct drm_i915_private *i915,
struct intel_encoder *encoder,
struct intel_pmdemand_state *pmdemand_state,
bool clear_bit);
void intel_pmdemand_program_dbuf(struct drm_i915_private *i915,
u8 dbuf_slices);
void intel_pmdemand_pre_plane_update(struct intel_atomic_state *state);
void intel_pmdemand_post_plane_update(struct intel_atomic_state *state);
int intel_pmdemand_atomic_check(struct intel_atomic_state *state);
#endif /* __INTEL_PMDEMAND_H__ */
...@@ -4418,8 +4418,10 @@ ...@@ -4418,8 +4418,10 @@
#define GEN8_DE_MISC_IMR _MMIO(0x44464) #define GEN8_DE_MISC_IMR _MMIO(0x44464)
#define GEN8_DE_MISC_IIR _MMIO(0x44468) #define GEN8_DE_MISC_IIR _MMIO(0x44468)
#define GEN8_DE_MISC_IER _MMIO(0x4446c) #define GEN8_DE_MISC_IER _MMIO(0x4446c)
#define GEN8_DE_MISC_GSE (1 << 27) #define XELPDP_PMDEMAND_RSPTOUT_ERR REG_BIT(27)
#define GEN8_DE_EDP_PSR (1 << 19) #define GEN8_DE_MISC_GSE REG_BIT(27)
#define GEN8_DE_EDP_PSR REG_BIT(19)
#define XELPDP_PMDEMAND_RSP REG_BIT(3)
#define GEN8_PCU_ISR _MMIO(0x444e0) #define GEN8_PCU_ISR _MMIO(0x444e0)
#define GEN8_PCU_IMR _MMIO(0x444e4) #define GEN8_PCU_IMR _MMIO(0x444e4)
...@@ -4504,6 +4506,23 @@ ...@@ -4504,6 +4506,23 @@
#define XELPDP_DP_ALT_HPD_LONG_DETECT REG_BIT(1) #define XELPDP_DP_ALT_HPD_LONG_DETECT REG_BIT(1)
#define XELPDP_DP_ALT_HPD_SHORT_DETECT REG_BIT(0) #define XELPDP_DP_ALT_HPD_SHORT_DETECT REG_BIT(0)
#define XELPDP_INITIATE_PMDEMAND_REQUEST(dword) _MMIO(0x45230 + 4 * (dword))
#define XELPDP_PMDEMAND_QCLK_GV_BW_MASK REG_GENMASK(31, 16)
#define XELPDP_PMDEMAND_VOLTAGE_INDEX_MASK REG_GENMASK(14, 12)
#define XELPDP_PMDEMAND_QCLK_GV_INDEX_MASK REG_GENMASK(11, 8)
#define XELPDP_PMDEMAND_PIPES_MASK REG_GENMASK(7, 6)
#define XELPDP_PMDEMAND_DBUFS_MASK REG_GENMASK(5, 4)
#define XELPDP_PMDEMAND_PHYS_MASK REG_GENMASK(2, 0)
#define XELPDP_PMDEMAND_REQ_ENABLE REG_BIT(31)
#define XELPDP_PMDEMAND_CDCLK_FREQ_MASK REG_GENMASK(30, 20)
#define XELPDP_PMDEMAND_DDICLK_FREQ_MASK REG_GENMASK(18, 8)
#define XELPDP_PMDEMAND_SCALERS_MASK REG_GENMASK(6, 4)
#define XELPDP_PMDEMAND_PLLS_MASK REG_GENMASK(2, 0)
#define GEN12_DCPR_STATUS_1 _MMIO(0x46440)
#define XELPDP_PMDEMAND_INFLIGHT_STATUS REG_BIT(26)
#define ILK_DISPLAY_CHICKEN2 _MMIO(0x42004) #define ILK_DISPLAY_CHICKEN2 _MMIO(0x42004)
/* Required on all Ironlake and Sandybridge according to the B-Spec. */ /* Required on all Ironlake and Sandybridge according to the B-Spec. */
#define ILK_ELPIN_409_SELECT REG_BIT(25) #define ILK_ELPIN_409_SELECT REG_BIT(25)
...@@ -4663,6 +4682,9 @@ ...@@ -4663,6 +4682,9 @@
#define DCPR_SEND_RESP_IMM REG_BIT(25) #define DCPR_SEND_RESP_IMM REG_BIT(25)
#define DCPR_CLEAR_MEMSTAT_DIS REG_BIT(24) #define DCPR_CLEAR_MEMSTAT_DIS REG_BIT(24)
#define XELPD_CHICKEN_DCPR_3 _MMIO(0x46438)
#define DMD_RSP_TIMEOUT_DISABLE REG_BIT(19)
#define SKL_DFSM _MMIO(0x51000) #define SKL_DFSM _MMIO(0x51000)
#define SKL_DFSM_DISPLAY_PM_DISABLE (1 << 27) #define SKL_DFSM_DISPLAY_PM_DISABLE (1 << 27)
#define SKL_DFSM_DISPLAY_HDCP_DISABLE (1 << 25) #define SKL_DFSM_DISPLAY_HDCP_DISABLE (1 << 25)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment