drm/i915: Merge the PPS register definitions
Subsystems (2)
PATCH v3 1/6 drm/i915: Merge the PPS register definitions
The PPS registers are pretty much the same everywhere, the differences being:
- Register fields appearing, disappearing from one platform to the
next: panel-reset-on-powerdown, backlight-on, panel-port, register-unlock
- Different register base addresses
- Different number of PPS instances: 2 on VLV/CHV/BXT, 1 everywhere else.
We can merge the separate set of PPS definitions by extending the PPS instance argument to all platforms and using instance 0 on platforms with a single instance. This means we'll need to calculate the register addresses dynamically based on the given platform and PPS instance.
v2:
- Simplify if ladder in intel_pps_get_registers(). (Ville)
--- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_reg.h | 145 ++++++++++++++--------------------- drivers/gpu/drm/i915/i915_suspend.c | 30 +++----- drivers/gpu/drm/i915/intel_display.c | 22 ++++-- drivers/gpu/drm/i915/intel_dp.c | 45 +++++------ drivers/gpu/drm/i915/intel_lvds.c | 43 +++-------- 6 files changed, 117 insertions(+), 170 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1749,6 +1749,8 @@ struct drm_i915_private {uint32_t psr_mmio_base; +uint32_t pps_mmio_base; +wait_queue_head_t gmbus_wait_queue;struct pci_dev *bridge_dev;
drivers/gpu/drm/i915/i915_reg.h +59 -86
169 lines not on this page · raw message
drivers/gpu/drm/i915/i915_suspend.c +10 -20
@@ -44,16 +44,11 @@ static void i915_save_display(struct drm_device *dev) dev_priv->regfile.saveLVDS =I915_READ (LVDS );/* Panel power sequencer */ -if (HAS_PCH_SPLIT (dev)) { - dev_priv->regfile.savePP_CONTROL =I915_READ (PCH_PP_CONTROL ); - dev_priv->regfile.savePP_ON_DELAYS =I915_READ (PCH_PP_ON_DELAYS ); - dev_priv->regfile.savePP_OFF_DELAYS =I915_READ (PCH_PP_OFF_DELAYS ); - dev_priv->regfile.savePP_DIVISOR =I915_READ (PCH_PP_DIVISOR ); - }else if (INTEL_INFO (dev)->gen <=4 ) { - dev_priv->regfile.savePP_CONTROL =I915_READ (PP_CONTROL ); - dev_priv->regfile.savePP_ON_DELAYS =I915_READ (PP_ON_DELAYS ); - dev_priv->regfile.savePP_OFF_DELAYS =I915_READ (PP_OFF_DELAYS ); - dev_priv->regfile.savePP_DIVISOR =I915_READ (PP_DIVISOR ); +if (HAS_PCH_SPLIT (dev_priv) ||INTEL_GEN (dev_priv) <=4 ) { + dev_priv->regfile.savePP_CONTROL =I915_READ (PP_CONTROL (0 )); + dev_priv->regfile.savePP_ON_DELAYS =I915_READ (PP_ON_DELAYS (0 )); + dev_priv->regfile.savePP_OFF_DELAYS =I915_READ (PP_OFF_DELAYS (0 )); + dev_priv->regfile.savePP_DIVISOR =I915_READ (PP_DIVISOR (0 )); }/* save FBC interval */
@@ -79,16 +74,11 @@ static void i915_restore_display(struct drm_device *dev)I915_WRITE (LVDS , dev_priv->regfile.saveLVDS & mask);/* Panel power sequencer */ -if (HAS_PCH_SPLIT (dev)) { -I915_WRITE (PCH_PP_ON_DELAYS , dev_priv->regfile.savePP_ON_DELAYS); -I915_WRITE (PCH_PP_OFF_DELAYS , dev_priv->regfile.savePP_OFF_DELAYS); -I915_WRITE (PCH_PP_DIVISOR , dev_priv->regfile.savePP_DIVISOR); -I915_WRITE (PCH_PP_CONTROL , dev_priv->regfile.savePP_CONTROL); - }else if (INTEL_INFO (dev)->gen <=4 ) { -I915_WRITE (PP_ON_DELAYS , dev_priv->regfile.savePP_ON_DELAYS); -I915_WRITE (PP_OFF_DELAYS , dev_priv->regfile.savePP_OFF_DELAYS); -I915_WRITE (PP_DIVISOR , dev_priv->regfile.savePP_DIVISOR); -I915_WRITE (PP_CONTROL , dev_priv->regfile.savePP_CONTROL); +if (HAS_PCH_SPLIT (dev_priv) ||INTEL_GEN (dev_priv) <=4 ) { +I915_WRITE (PP_ON_DELAYS (0 ), dev_priv->regfile.savePP_ON_DELAYS); +I915_WRITE (PP_OFF_DELAYS (0 ), dev_priv->regfile.savePP_OFF_DELAYS); +I915_WRITE (PP_DIVISOR (0 ), dev_priv->regfile.savePP_DIVISOR); +I915_WRITE (PP_CONTROL (0 ), dev_priv->regfile.savePP_CONTROL); }/* only restore FBC info on the platform that supports FBC*/
drivers/gpu/drm/i915/intel_display.c +17 -5
@@ -1202,8 +1202,8 @@ void assert_panel_unlocked(struct drm_i915_private *dev_priv,if (HAS_PCH_SPLIT (dev)) {u32 port_sel; - pp_reg =PCH_PP_CONTROL ; - port_sel =I915_READ (PCH_PP_ON_DELAYS ) &PANEL_PORT_SELECT_MASK ; + pp_reg =PP_CONTROL (0 ); + port_sel =I915_READ (PP_ON_DELAYS (0 )) &PANEL_PORT_SELECT_MASK ;if (port_sel ==PANEL_PORT_SELECT_LVDS &&I915_READ (PCH_LVDS ) &LVDS_PIPEB_SELECT )
@@ -1211,10 +1211,10 @@ void assert_panel_unlocked(struct drm_i915_private *dev_priv,/* XXX: else fix for eDP */ }else if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) {/* presumably write lock depends on pipe, not port select */ - pp_reg =VLV_PIPE_PP_CONTROL (pipe); + pp_reg =PP_CONTROL (pipe); panel_pipe = pipe; }else { - pp_reg =PP_CONTROL ; + pp_reg =PP_CONTROL (0 );if (I915_READ (LVDS ) &LVDS_PIPEB_SELECT ) panel_pipe =PIPE_B ; }
@@ -9491,7 +9491,7 @@ static void assert_can_disable_lcpll(struct drm_i915_private *dev_priv)I915_STATE_WARN (I915_READ (SPLL_CTL ) &SPLL_PLL_ENABLE ,"SPLL enabled\n" );I915_STATE_WARN (I915_READ (WRPLL_CTL (0 )) &WRPLL_PLL_ENABLE ,"WRPLL1 enabled\n" );I915_STATE_WARN (I915_READ (WRPLL_CTL (1 )) &WRPLL_PLL_ENABLE ,"WRPLL2 enabled\n" ); -I915_STATE_WARN (I915_READ (PCH_PP_STATUS ) &PP_ON ,"Panel power on\n" ); +I915_STATE_WARN (I915_READ (PP_STATUS (0 )) &PP_ON ,"Panel power on\n" );I915_STATE_WARN (I915_READ (BLC_PWM_CPU_CTL2 ) &BLM_PWM_ENABLE ,"CPU PWM1 enabled\n" );if (IS_HASWELL (dev))
@@ -14715,12 +14715,24 @@ static bool intel_crt_present(struct drm_device *dev)return true; } +static void intel_pps_init (struct drm_i915_private *dev_priv) +{ +if (HAS_PCH_SPLIT (dev_priv) ||IS_BROXTON (dev_priv)) + dev_priv->pps_mmio_base =PCH_PPS_BASE ; +else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) + dev_priv->pps_mmio_base =VLV_PPS_BASE ; +else + dev_priv->pps_mmio_base =PPS_BASE ; +} +static void intel_setup_outputs (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_encoder *encoder;bool dpd_is_edp = false; +intel_pps_init (dev_priv); +/* * intel_edp_init_connector() depends on this completing first, to * prevent the registeration of both eDP and LVDS and the incorrect
drivers/gpu/drm/i915/intel_dp.c +18 -27
83 lines not on this page · raw message
drivers/gpu/drm/i915/intel_lvds.c +11 -32
75 lines not on this page · raw message
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 2/6 drm/i915: Merge TARGET_POWER_ON and PANEL_POWER_ON flag definitions
These two flags mean the same thing, so remove the duplication.
--- drivers/gpu/drm/i915/i915_reg.h | 1 - drivers/gpu/drm/i915/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/intel_lvds.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -1
@@ -3707,7 +3707,6 @@ enum {#define PANEL_POWER_RESET (1 << 1)#define PANEL_POWER_OFF (0 << 0)#define PANEL_POWER_ON (1 << 0) -#define POWER_TARGET_ON (1 << 0)#define _PP_ON_DELAYS 0x61208#define PP_ON_DELAYS (pps_idx) _MMIO_PPS(pps_idx, _PP_ON_DELAYS)
drivers/gpu/drm/i915/intel_dp.c +3 -3
@@ -1948,7 +1948,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)DRM_DEBUG_KMS ("PP_STATUS: 0x%08x PP_CONTROL: 0x%08x\n" ,I915_READ (pp_stat_reg),I915_READ (pp_ctrl_reg)); -if ((pp &POWER_TARGET_ON ) ==0 ) +if ((pp &PANEL_POWER_ON ) ==0 ) intel_dp->panel_power_off_time =ktime_get_boottime (); power_domain =intel_display_port_aux_power_domain (intel_encoder);
@@ -2035,7 +2035,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)POSTING_READ (pp_ctrl_reg); } - pp |=POWER_TARGET_ON ; + pp |=PANEL_POWER_ON ;if (!IS_GEN5 (dev)) pp |=PANEL_POWER_RESET ;
@@ -2087,7 +2087,7 @@ static void edp_panel_off(struct intel_dp *intel_dp) pp =ironlake_get_pp_control (intel_dp);/* We need to switch off panel power _and_ force vdd, for otherwise some * panels get very unhappy and cease to work. */ - pp &= ~(POWER_TARGET_ON |PANEL_POWER_RESET |EDP_FORCE_VDD | + pp &= ~(PANEL_POWER_ON |PANEL_POWER_RESET |EDP_FORCE_VDD |EDP_BLC_ENABLE ); pp_ctrl_reg =_pp_ctrl_reg (intel_dp);
drivers/gpu/drm/i915/intel_lvds.c +2 -2
@@ -220,7 +220,7 @@ static void intel_enable_lvds(struct intel_encoder *encoder)I915_WRITE (lvds_encoder->reg,I915_READ (lvds_encoder->reg) |LVDS_PORT_EN ); -I915_WRITE (PP_CONTROL (0 ),I915_READ (PP_CONTROL (0 )) |POWER_TARGET_ON ); +I915_WRITE (PP_CONTROL (0 ),I915_READ (PP_CONTROL (0 )) |PANEL_POWER_ON );POSTING_READ (lvds_encoder->reg);if (intel_wait_for_register (dev_priv,PP_STATUS (0 ),PP_ON ,PP_ON ,1000 ))DRM_ERROR ("timed out waiting for panel to power on\n" );
@@ -234,7 +234,7 @@ static void intel_disable_lvds(struct intel_encoder *encoder)struct intel_lvds_encoder *lvds_encoder =to_lvds_encoder (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (dev); -I915_WRITE (PP_CONTROL (0 ),I915_READ (PP_CONTROL (0 )) & ~POWER_TARGET_ON ); +I915_WRITE (PP_CONTROL (0 ),I915_READ (PP_CONTROL (0 )) & ~PANEL_POWER_ON );if (intel_wait_for_register (dev_priv,PP_STATUS (0 ),PP_ON ,0 ,1000 ))DRM_ERROR ("timed out waiting for panel to power off\n" );
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 3/6 drm/i915/lvds: Restore initial HW state during encoder enabling
In reply to Imre DeakAtm the LVDS encoder depends on the PPS HW context being saved/restored from generic suspend/resume code. Since the PPS is specific to the LVDS and eDP encoders a cleaner way is to reinitialize it during encoder enabling, so do this here for LVDS. Follow-up patches will init the PPS for the eDP encoder similarly and remove the suspend/resume time save / restore.
v2:
- Apply BSpec +1 offset and use DIV_ROUND_UP() when programming the power cycle delay. (Ville)
v3: (Ville)
- Fix +1 vs. round-up order.
- s/reset_on_powerdown/powerdown_on_reset/
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 114 +++++++++++++++++++++++++++++++++----- 2 files changed, 102 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -3710,6 +3710,7 @@ enum {#define _PP_ON_DELAYS 0x61208#define PP_ON_DELAYS (pps_idx) _MMIO_PPS(pps_idx, _PP_ON_DELAYS) +#define PANEL_PORT_SELECT_SHIFT 30#define PANEL_PORT_SELECT_MASK (3 << 30)#define PANEL_PORT_SELECT_LVDS (0 << 30)#define PANEL_PORT_SELECT_DPA (1 << 30)
drivers/gpu/drm/i915/intel_lvds.c +101 -13
150 lines not on this page · raw message
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 4/6 drm/i915/dp: Restore PPS HW state from the encoder resume hook
In reply to Imre DeakSimilarly to the previous patch, initialize the PPS from the DP encoder's resume hook. Note that as opposed to LVDS we can't do this during encoder enabling, since we need the PPS for DP detection as well. The PPS init code is now the same for init and resume, so factor out a new intel_dp_pps_init() helper for this.
v2:
- Factor out intel_dp_pps_init() (Ville).
--- drivers/gpu/drm/i915/intel_dp.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +16 -15
@@ -256,6 +256,8 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,static void intel_dp_init_panel_power_sequencer_registers (struct drm_device *dev,struct intel_dp *intel_dp); +static void +intel_dp_pps_init (struct drm_device *dev,struct intel_dp *intel_dp);static void pps_lock (struct intel_dp *intel_dp) {
@@ -4657,13 +4659,8 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)pps_lock (intel_dp); -/* -* Read out the current power sequencer assignment, -* in case the BIOS did something with it. -*/ -if (IS_VALLEYVIEW (encoder->dev) ||IS_CHERRYVIEW (encoder->dev)) -vlv_initial_power_sequencer_setup (intel_dp); - +/* Reinit the power sequencer, in case BIOS did something with it. */ +intel_dp_pps_init (encoder->dev, intel_dp);intel_edp_panel_vdd_sanitize (intel_dp);pps_unlock (intel_dp);
@@ -5011,6 +5008,17 @@ intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev, I915_READ(regs.pp_div)); } +static void intel_dp_pps_init (struct drm_device *dev, +struct intel_dp *intel_dp) +{ +if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) { +vlv_initial_power_sequencer_setup (intel_dp); + }else { +intel_dp_init_panel_power_sequencer (dev, intel_dp); +intel_dp_init_panel_power_sequencer_registers (dev, intel_dp); + } +} +/** * intel_dp_set_drrs_state - program registers for RR switch to take effect * @dev: DRM device
@@ -5425,14 +5433,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,pps_lock (intel_dp);intel_dp_init_panel_power_timestamps (intel_dp); - -if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) { -vlv_initial_power_sequencer_setup (intel_dp); - }else { -intel_dp_init_panel_power_sequencer (dev, intel_dp); -intel_dp_init_panel_power_sequencer_registers (dev, intel_dp); - } - +intel_dp_pps_init (dev, intel_dp);intel_edp_panel_vdd_sanitize (intel_dp);pps_unlock (intel_dp);
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 5/6 drm/i915: Apply the PPS register unlock workaround more consistently
In reply to Imre DeakAtm, we apply this workaround somewhat inconsistently at the following
points: driver loading, LVDS init, eDP PPS init, system resume. As this workaround also affects registers other than PPS (timing, PLL) a more consistent way is to apply it early after the PPS HW context is known to be lost: driver loading, system resume and on VLV/CHV/BXT when turning on power domains.
This is needed by the next patch that removes saving/restoring of the PP_CONTROL register.
This also removes the incorrect programming of the workaround on HSW+ PCH platforms which don't have the register locking mechanism.
v2: (Ville)
- Don't apply the workaround on BXT.
- Simplify platform checks using HAS_DDI().
v3:
- Move the call of intel_pps_unlock_regs_wa() to the more logical vlv_display_power_well_init() (also fixing CHV) (Ville).
--- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 3 ++- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 8 -------- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++ 6 files changed, 34 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -0
@@ -1560,6 +1560,7 @@ static int i915_drm_resume(struct drm_device *dev)i915_gem_resume (dev);i915_restore_state (dev); +intel_pps_unlock_regs_wa (dev_priv);intel_opregion_setup (dev_priv);intel_init_pch_refclk (dev);
drivers/gpu/drm/i915/intel_display.c +26 -0
@@ -14715,6 +14715,30 @@ static bool intel_crt_present(struct drm_device *dev)return true; } +void intel_pps_unlock_regs_wa (struct drm_i915_private *dev_priv) +{ +int pps_num; +int pps_idx; + +if (HAS_DDI (dev_priv)) +return ; +/* +* This w/a is needed at least on CPT/PPT, but to be sure apply it +* everywhere where registers can be write protected. +*/ +if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) + pps_num =2 ; +else + pps_num =1 ; + +for (pps_idx =0 ; pps_idx < pps_num; pps_idx++) { +u32 val =I915_READ (PP_CONTROL (pps_idx)); + + val = (val & ~PANEL_UNLOCK_MASK ) |PANEL_UNLOCK_REGS ; +I915_WRITE (PP_CONTROL (pps_idx), val); + } +} +static void intel_pps_init (struct drm_i915_private *dev_priv) {if (HAS_PCH_SPLIT (dev_priv) ||IS_BROXTON (dev_priv))
@@ -14723,6 +14747,8 @@ static void intel_pps_init(struct drm_i915_private *dev_priv) dev_priv->pps_mmio_base =VLV_PPS_BASE ; else dev_priv->pps_mmio_base = PPS_BASE; + +intel_pps_unlock_regs_wa (dev_priv); }static void intel_setup_outputs (struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +2 -1
@@ -1829,7 +1829,8 @@ static u32 ironlake_get_pp_control(struct intel_dp *intel_dp)lockdep_assert_held (&dev_priv->pps_mutex); control =I915_READ (_pp_ctrl_reg (intel_dp)); -if (!IS_BROXTON (dev)) { +if (WARN_ON (!HAS_DDI (dev_priv) && + (control &PANEL_UNLOCK_MASK ) !=PANEL_UNLOCK_REGS )) { control &= ~PANEL_UNLOCK_MASK ; control |=PANEL_UNLOCK_REGS ; }
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -1159,6 +1159,7 @@ void intel_mark_busy(struct drm_i915_private *dev_priv);void intel_mark_idle (struct drm_i915_private *dev_priv);void intel_crtc_restore_mode (struct drm_crtc *crtc);int intel_display_suspend (struct drm_device *dev); +void intel_pps_unlock_regs_wa (struct drm_i915_private *dev_priv);void intel_encoder_destroy (struct drm_encoder *encoder);int intel_connector_init (struct intel_connector *);struct intel_connector *intel_connector_alloc (void );
drivers/gpu/drm/i915/intel_lvds.c +0 -8
@@ -978,14 +978,6 @@ void intel_lvds_init(struct drm_device *dev)int pipe;u8 pin; -/* -* Unlock registers and just leave them unlocked. Do this before -* checking quirk lists to avoid bogus WARNINGs. -*/ -if (HAS_PCH_SPLIT (dev_priv) ||INTEL_GEN (dev_priv) <=4 ) -I915_WRITE (PP_CONTROL (0 ), -I915_READ (PP_CONTROL (0 )) |PANEL_UNLOCK_REGS ); -if (!intel_lvds_supported (dev))return ;
drivers/gpu/drm/i915/intel_runtime_pm.c +4 -0
@@ -592,6 +592,8 @@ void bxt_disable_dc9(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Disabling DC9\n" );gen9_set_dc_state (dev_priv,DC_STATE_DISABLE ); + +intel_pps_unlock_regs_wa (dev_priv); }static void assert_csr_loaded (struct drm_i915_private *dev_priv)
@@ -1121,6 +1123,8 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv) }i915_redisable_vga_power_on (&dev_priv->drm); + +intel_pps_unlock_regs_wa (dev_priv); }static void vlv_display_power_well_deinit (struct drm_i915_private *dev_priv)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 6/6 drm/i915: Remove LVDS and PPS suspend time save/restore
In reply to Imre DeakIn the preceeding patches we made sure that:
- the LVDS encoder takes care of reiniting both the LVDS register and its PPS
- the eDP encoder takes care of reiniting its PPS
- the PPS register unlocking workaround is applied explicitly whenever the PPS context is lost
Based on the above we can safely remove the opaque LVDS and PPS save / restore from generic code.
--- drivers/gpu/drm/i915/i915_drv.h | 7 ------- drivers/gpu/drm/i915/i915_suspend.c | 31 ------------------------------- 2 files changed, 38 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -7
@@ -1061,13 +1061,6 @@ struct intel_gmbus {struct i915_suspend_saved_registers {u32 saveDSPARB; -u32 saveLVDS; -u32 savePP_ON_DELAYS; -u32 savePP_OFF_DELAYS; -u32 savePP_ON; -u32 savePP_OFF; -u32 savePP_CONTROL; -u32 savePP_DIVISOR;u32 saveFBC_CONTROL;u32 saveCACHE_MODE_0;u32 saveMI_ARB_STATE;
drivers/gpu/drm/i915/i915_suspend.c +0 -31
@@ -37,20 +37,6 @@ static void i915_save_display(struct drm_device *dev)if (INTEL_INFO (dev)->gen <=4 ) dev_priv->regfile.saveDSPARB =I915_READ (DSPARB ); -/* LVDS state */ -if (HAS_PCH_IBX (dev) ||HAS_PCH_CPT (dev)) - dev_priv->regfile.saveLVDS =I915_READ (PCH_LVDS ); -else if (INTEL_INFO (dev)->gen <=4 &&IS_MOBILE (dev) && !IS_I830 (dev)) - dev_priv->regfile.saveLVDS =I915_READ (LVDS ); - -/* Panel power sequencer */ -if (HAS_PCH_SPLIT (dev_priv) ||INTEL_GEN (dev_priv) <=4 ) { - dev_priv->regfile.savePP_CONTROL =I915_READ (PP_CONTROL (0 )); - dev_priv->regfile.savePP_ON_DELAYS =I915_READ (PP_ON_DELAYS (0 )); - dev_priv->regfile.savePP_OFF_DELAYS =I915_READ (PP_OFF_DELAYS (0 )); - dev_priv->regfile.savePP_DIVISOR =I915_READ (PP_DIVISOR (0 )); - } -/* save FBC interval */ if (HAS_FBC (dev) &&INTEL_INFO (dev)->gen <=4 && !IS_G4X (dev)) dev_priv->regfile.saveFBC_CONTROL =I915_READ (FBC_CONTROL );
@@ -59,28 +45,11 @@ static void i915_save_display(struct drm_device *dev)static void i915_restore_display (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -u32 mask =0xffffffff ;/* Display arbitration */ if (INTEL_INFO (dev)->gen <=4 )I915_WRITE (DSPARB , dev_priv->regfile.saveDSPARB); - mask = ~LVDS_PORT_EN ; - -/* LVDS state */ -if (HAS_PCH_IBX (dev) ||HAS_PCH_CPT (dev)) -I915_WRITE (PCH_LVDS , dev_priv->regfile.saveLVDS & mask); -else if (INTEL_INFO (dev)->gen <=4 &&IS_MOBILE (dev) && !IS_I830 (dev)) -I915_WRITE (LVDS , dev_priv->regfile.saveLVDS & mask); - -/* Panel power sequencer */ -if (HAS_PCH_SPLIT (dev_priv) ||INTEL_GEN (dev_priv) <=4 ) { -I915_WRITE (PP_ON_DELAYS (0 ), dev_priv->regfile.savePP_ON_DELAYS); -I915_WRITE (PP_OFF_DELAYS (0 ), dev_priv->regfile.savePP_OFF_DELAYS); -I915_WRITE (PP_DIVISOR (0 ), dev_priv->regfile.savePP_DIVISOR); -I915_WRITE (PP_CONTROL (0 ), dev_priv->regfile.savePP_CONTROL); - } -/* only restore FBC info on the platform that supports FBC*/ intel_fbc_global_disable (dev_priv);
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: failure for series starting with [CI,v3,1/6] drm/i915: Merge the PPS register definitions
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: series starting with [CI,v3,1/6] drm/i915: Merge the PPS register definitions
URL : https://patchwork.freedesktop.org/series/10901/
State : failure
== Summary ==
Series 10901v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/10901/revisions/1/mbox
Test drv_module_reload_basic:
pass -> SKIP (ro-ivb-i7-3770)
pass -> SKIP (fi-skl-i5-6260u)
Test kms_cursor_legacy:
Subgroup basic-cursor-vs-flip-varying-size:
fail -> PASS (ro-ilk1-i5-650)
Subgroup basic-flip-vs-cursor-legacy:
pass -> FAIL (fi-hsw-i7-4770k)
pass -> FAIL (ro-bdw-i5-5250u)
pass -> FAIL (ro-skl3-i5-6260u)
Subgroup basic-flip-vs-cursor-varying-size:
fail -> PASS (ro-bdw-i5-5250u)
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
fail -> PASS (ro-byt-n2820)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (ro-bdw-i7-5600u)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (ro-bdw-i7-5600u)fi-hsw-i7-4770k total:244 pass:221 dwarn:0 dfail:0 fail:1 skip:22 fi-kbl-qkkr total:244 pass:185 dwarn:28 dfail:1 fail:3 skip:27 fi-skl-i5-6260u total:244 pass:223 dwarn:4 dfail:0 fail:2 skip:15 fi-skl-i7-6700k total:244 pass:208 dwarn:4 dfail:2 fail:2 skip:28 fi-snb-i7-2600 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 ro-bdw-i5-5250u total:240 pass:219 dwarn:1 dfail:0 fail:1 skip:19 ro-bdw-i7-5557U total:240 pass:220 dwarn:1 dfail:0 fail:0 skip:19 ro-bdw-i7-5600u total:240 pass:207 dwarn:0 dfail:0 fail:1 skip:32 ro-bsw-n3050 total:240 pass:194 dwarn:0 dfail:0 fail:4 skip:42 ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40 ro-hsw-i7-4770r total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26 ro-ilk1-i5-650 total:235 pass:174 dwarn:0 dfail:0 fail:1 skip:60 ro-ivb-i7-3770 total:240 pass:204 dwarn:0 dfail:0 fail:0 skip:36 ro-ivb2-i7-3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31 ro-skl3-i5-6260u total:240 pass:222 dwarn:0 dfail:0 fail:4 skip:14
Results at /archive/results/CI_IGT_test/RO_Patchwork_1811/
fa68dcb drm-intel-nightly: 2016y-08m-10d-09h-40m-37s UTC integration manifest 134f003 drm/i915: Remove LVDS and PPS suspend time save/restore 02fa1c8 drm/i915: Apply the PPS register unlock workaround more consistently c664164 drm/i915/dp: Restore PPS HW state from the encoder resume hook a58bc75 drm/i915/lvds: Restore initial HW state during encoder enabling 9e3452e drm/i915: Merge TARGET_POWER_ON and PANEL_POWER_ON flag definitions b672938 drm/i915: Merge the PPS register definitions
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Ro.CI.BAT: failure for series starting with [CI,v3,1/6] drm/i915: Merge the PPS register definitions
Quoted 9 lines · Patchwork
== Series Details ==
Series: series starting with [CI,v3,1/6] drm/i915: Merge the PPS register definitions
URL : https://patchwork.freedesktop.org/series/10901/
State : failure== Summary ==
Quoted 7 lines
Series 10901v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/10901/revisions/1/mbo
xTest
drv_module_reload_basic:
pass -> SKIP (ro-ivb-i7-3770) pass -> SKIP (fi-skl-i5-6260u)
Reported already earlier by Ville:
rmmod: ERROR: Module i915 is in use
Quoted 7 lines
Test
kms_cursor_legacy:
Subgroup basic-cursor-vs-flip-varying-size:
fail -> PASS (ro-ilk1-i5-650) Subgroup basic-flip-vs-cursor-legacy:
pass -> FAIL (fi-hsw-i7-4770k) pass -> FAIL (ro-bdw-i5-5250u) pass -> FAIL (ro-skl3-i5-6260u)
(kms_cursor_legacy:10925) DEBUG: Test requirement passed: target > 1
(kms_cursor_legacy:10925) DEBUG: Using a target of 128 cursor updates per half-vblank (kms_cursor_legacy:10925) CRITICAL: Test assertion failure function basic_flip_vs_cursor, file kms_cursor_legacy.c:514:
(kms_cursor_legacy:10925) CRITICAL: Failed assertion: get_vblank(display->drm_fd, pipe, 0) == vblank_start (kms_cursor_legacy:10925) CRITICAL: error: 11174 != 11173
https://bugs.freedesktop.org/show_bug.cgi?id=97188
I pushed the patchset to -dinq, thanks for the review.
Quoted 44 lines
Subgroup basic-flip-vs-cursor-varying-size:
fail -> PASS (ro-bdw-i5-5250u) Testkms_flip:
Subgroup basic-flip-vs-wf_vblank:
fail -> PASS (ro-byt-n2820) Testkms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (ro-bdw-i7-5600u) Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (ro-bdw-i7-5600u)fi-hsw-i7-
4770k total:244 pass:221 dwarn:0 dfail:0 fail:1 skip:22 fi-kbl-
qkkr total:244 pass:185 dwarn:28 dfail:1 fail:3 skip:27 fi-skl-i5-
6260u total:244 pass:223 dwarn:4 dfail:0 fail:2 skip:15 fi-skl-i7-
6700k total:244 pass:208 dwarn:4 dfail:2 fail:2 skip:28 fi-snb-i7-
2600 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 ro-bdw-i5-
5250u total:240 pass:219 dwarn:1 dfail:0 fail:1 skip:19 ro-bdw-i7-
5557U total:240 pass:220 dwarn:1 dfail:0 fail:0 skip:19 ro-bdw-i7-
5600u total:240 pass:207 dwarn:0 dfail:0 fail:1 skip:32 ro-bsw-
n3050 total:240 pass:194 dwarn:0 dfail:0 fail:4 skip:42 ro-byt-
n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40 ro-hsw-i7-
4770r total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26 ro-ilk1-i5-
650 total:235 pass:174 dwarn:0 dfail:0 fail:1 skip:60 ro-ivb-i7-
3770 total:240 pass:204 dwarn:0 dfail:0 fail:0 skip:36 ro-ivb2-i7-
3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31 ro-skl3-i5-6260u
total:240 pass:222 dwarn:0 dfail:0 fail:4 skip:14Results at /archive/results/CI_IGT_test/RO_Patchwork_1811/
Quoted 13 lines
fa68dcb drm-intel-nightly: 2016y-08m-10d-09h-40m-37s UTC integration manifest
134f003 drm/i915: Remove LVDS and PPS suspend time save/restore 02fa1c8 drm/i915: Apply the PPS register unlock workaround more consistently
c664164 drm/i915/dp: Restore PPS HW state from the encoder resume hook
a58bc75 drm/i915/lvds: Restore initial HW state during encoder enabling
9e3452e drm/i915: MergeTARGET_POWER_ONandPANEL_POWER_ONflag definitions
b672938 drm/i915: Merge the PPS register definitions
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx