drm/i915: use intel_uncore_rmw when appropriate
Subsystems (2)
PATCH v2 1/2 drm/i915: use intel_uncore_rmw when appropriate
This patch replaces all occurences of the form intel_uncore_write(reg, intel_uncore_read(reg) OP val) with intel_uncore_rmw.
---
v2:
- removed spare parens and moved clear/set args to the same line (Ville)
- split i915 and gt stuff (Ville)
- rebased on the latest drm-tip
--- drivers/gpu/drm/i915/intel_pm.c | 187 +++++++++++--------------------- 1 file changed, 66 insertions(+), 121 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +66 -121
@@ -60,25 +60,20 @@ static void gen9_init_clock_gating(struct drm_i915_private *dev_priv)* Must match Sampler, Pixel Back End, and Media. See * WaCompressedResourceSamplerPbeMediaNewHashMode. */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) | -SKL_DE_COMPRESSED_HASH_MODE ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_DE_COMPRESSED_HASH_MODE ); }/* See Bspec note for PSR2_CTL bit 31, Wa#828:skl,bxt,kbl,cfl */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |SKL_EDP_PSR_FIX_RDWRAP ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_EDP_PSR_FIX_RDWRAP );/* WaEnableChickenDCPR:skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 , -intel_uncore_read (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ) |MASK_WAKEMEM ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ,0 ,MASK_WAKEMEM );/* * WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl * Display WA #0859: skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_MEMORY_WAKE ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_MEMORY_WAKE ); }static void bxt_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -86,15 +81,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WaDisableSDEUnitClockGating:bxt */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * FIXME: * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only. */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ );/* * Wa: Backlight PWM may stop in the asserted state, causing backlight
@@ -115,16 +108,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)* WaFbcTurnOffFbcWatermark:bxt * Display WA #0562: bxt */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcHighMemBwCorruptionAvoidance:bxt * Display WA #0883: bxt */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void glk_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4055,9 +4045,9 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv)*/ static void ilk_init_lp_watermarks (struct drm_i915_private *dev_priv) { -intel_uncore_write (&dev_priv->uncore,WM3_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM3_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM2_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM2_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM1_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM1_LP_ILK ) & ~WM_LP_ENABLE ); +intel_uncore_rmw (&dev_priv->uncore,WM3_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM2_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM1_LP_ILK ,WM_LP_ENABLE ,0 );/* * Don't touch WM_LP_SPRITE_ENABLE here.
@@ -4111,9 +4101,7 @@ static void g4x_disable_trickle_feed(struct drm_i915_private *dev_priv)enum pipe pipe;for_each_pipe (dev_priv, pipe) { -intel_uncore_write (&dev_priv->uncore,DSPCNTR (pipe), -intel_uncore_read (&dev_priv->uncore,DSPCNTR (pipe)) | -DISP_TRICKLE_FEED_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,DSPCNTR (pipe),0 ,DISP_TRICKLE_FEED_DISABLE );intel_uncore_rmw (&dev_priv->uncore,DSPSURF (pipe),0 ,0 );intel_uncore_posting_read (&dev_priv->uncore,DSPSURF (pipe));
@@ -4162,19 +4150,13 @@ static void ilk_init_clock_gating(struct drm_i915_private *dev_priv)*/ if (IS_IRONLAKE_M (dev_priv)) {/* WaFbcAsynchFlipDisableFbcQueue:ilk */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_DPARB_GATE ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_DPARB_GATE ); }intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT );g4x_disable_trickle_feed (dev_priv);
@@ -4194,8 +4176,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,PCH_DPLSUNIT_CLOCK_GATE_DISABLE |PCH_DPLUNIT_CLOCK_GATE_DISABLE |PCH_CPUNIT_CLOCK_GATE_DISABLE ); -intel_uncore_write (&dev_priv->uncore,SOUTH_CHICKEN2 ,intel_uncore_read (&dev_priv->uncore,SOUTH_CHICKEN2 ) | -DPLS_EDP_PPS_FIX_DIS ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_CHICKEN2 ,0 ,DPLS_EDP_PPS_FIX_DIS );/* The below fixes the weird display corruption, a few pixels shifted * downward, on (only) LVDS of some HP laptops with IVY. */
@@ -4233,9 +4214,7 @@ static void gen6_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT ); intel_uncore_write(&dev_priv->uncore, GEN6_UCGCTL1, intel_uncore_read(&dev_priv->uncore, GEN6_UCGCTL1) |
@@ -4295,14 +4274,12 @@ static void lpt_init_clock_gating(struct drm_i915_private *dev_priv)* disabled when not needed anymore in order to save power. */ if (HAS_PCH_LPT_LP (dev_priv)) -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , -intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -PCH_LP_PARTITION_LEVEL_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , +0 ,PCH_LP_PARTITION_LEVEL_DISABLE );/* WADPOClockGatingDisable:hsw */ -intel_uncore_write (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A )) | -TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), +0 ,TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); }static void lpt_suspend_hw (struct drm_i915_private *dev_priv)
@@ -4361,8 +4338,7 @@ static void gen12lp_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409825376:tgl (pre-prod)*/ if (IS_TGL_DISPLAY_STEP (dev_priv,STEP_A0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -TGL_VRH_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,TGL_VRH_GATING_DIS );/* Wa_14013723622:tgl,rkl,dg1,adl-s */ if (DISPLAY_VER (dev_priv) ==12 )
@@ -4387,8 +4363,7 @@ static void dg1_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409836686:dg1[a0] */ if (IS_DG1_GRAPHICS_STEP (dev_priv,STEP_A0 ,STEP_B0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -DPT_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,DPT_GATING_DIS ); }static void xehpsdv_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4430,8 +4405,7 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv)return ;/* Display WA #1181 WaSouthDisplayDisablePWMCGEGating: cnp */ -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -CNP_PWM_CGE_GATING_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,0 ,CNP_PWM_CGE_GATING_DISABLE ); }static void cfl_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4440,23 +4414,20 @@ static void cfl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:cfl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:cfl * Display WA #0562: cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:cfl * Display WA #0873: cfl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void kbl_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4464,33 +4435,30 @@ static void kbl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:kbl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* WaDisableSDEUnitClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 , +0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaDisableGamClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 , +0 ,GEN6_GAMUNIT_CLOCK_GATE_DISABLE );/* * WaFbcTurnOffFbcWatermark:kbl * Display WA #0562: kbl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:kbl * Display WA #0873: kbl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void skl_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4502,31 +4470,26 @@ static void skl_init_clock_gating(struct drm_i915_private *dev_priv) GEN8_DOP_CLOCK_GATE_ENABLE, 0);/* WAC6entrylatency:skl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:skl * Display WA #0562: skl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:skl * Display WA #0873: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION );/* * WaFbcHighMemBwCorruptionAvoidance:skl * Display WA #0883: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void bdw_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -4534,43 +4497,37 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)enum pipe pipe;/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* WaSwitchSolVfFArbitrationPriority:bdw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );/* WaPsrDPAMaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |DPA_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,DPA_MASK_VBLANK_SRD );for_each_pipe (dev_priv, pipe) {/* WaPsrDPRSUnmaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe)) | -BDW_DPRS_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), +0 ,BDW_DPRS_MASK_VBLANK_SRD ); }/* WaVSRefCountFullforceMissDisable:bdw */ /* WaDSRefCountFullforceMissDisable:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableSDEUnitClockGating:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaProgramL3SqcReg1Default:bdw */ gen8_set_l3sqc_credits (dev_priv,30 ,2 );/* WaKVMNotificationOnConfigChange:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR2_1 ,intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR2_1 ) - |KVM_CONFIG_CHANGE_NOTIFICATION_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR2_1 , +0 ,KVM_CONFIG_CHANGE_NOTIFICATION_SELECT );lpt_init_clock_gating (dev_priv);
@@ -4579,24 +4536,20 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)* Also see the CHICKEN2 write in bdw_init_workarounds() to disable DOP * clock gating. */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 , -intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) |GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); }static void hsw_init_clock_gating (struct drm_i915_private *dev_priv) {/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* This is required by WaCatErrorRejectionIssue:hsw */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* WaSwitchSolVfFArbitrationPriority:hsw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );lpt_init_clock_gating (dev_priv); }
@@ -4606,9 +4559,7 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D ,ILK_VRHUNIT_CLOCK_GATE_DISABLE );/* WaFbcAsynchFlipDisableFbcQueue:ivb */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS );/* WaDisableBackToBackFlipFix:ivb */ intel_uncore_write(&dev_priv->uncore, IVB_CHICKEN3,
@@ -4634,9 +4585,8 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv) GEN6_RCZUNIT_CLOCK_GATE_DISABLE);/* This is required by WaCatErrorRejectionIssue:ivb */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );g4x_disable_trickle_feed (dev_priv);
@@ -4661,9 +4611,8 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv) _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));/* This is required by WaCatErrorRejectionIssue:vlv */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
@@ -4675,8 +4624,7 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv)/* WaDisableL3Bank2xClockGate:vlv * Disabling L3 clock gating- MMIO 940c[25] = 1 * Set bit 25, to disable L3_BANK_2x_CLK_GATING */ -intel_uncore_write (&dev_priv->uncore,GEN7_UCGCTL4 , -intel_uncore_read (&dev_priv->uncore,GEN7_UCGCTL4 ) |GEN7_L3BANK2X_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_UCGCTL4 ,0 ,GEN7_L3BANK2X_CLOCK_GATE_DISABLE );/* * WaDisableVLVClockGating_VBIIssue:vlv
@@ -4690,21 +4638,18 @@ static void chv_init_clock_gating(struct drm_i915_private *dev_priv) {/* WaVSRefCountFullforceMissDisable:chv */ /* WaDSRefCountFullforceMissDisable:chv */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );/* WaDisableSemaphoreAndSyncFlipWait:chv */ intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableCSUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_CSUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_CSUNIT_CLOCK_GATE_DISABLE );/* WaDisableSDEUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * WaProgramL3SqcReg1Default:chv
Signature · 1 line
2.34.1
PATCH v2 2/2 drm/i915/gt: use intel_uncore_rmw when appropriate
This patch replaces all occurences of the form intel_uncore_write(reg, intel_uncore_read(reg) OP val) with intel_uncore_rmw.
--- drivers/gpu/drm/i915/gt/intel_rps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_rps.c +1 -3
@@ -625,9 +625,7 @@ static void gen5_rps_disable(struct intel_rps *rps) rgvswctl =intel_uncore_read16 (uncore,MEMSWCTL );/* Ack interrupts, disable EFC interrupt */ -intel_uncore_write (uncore,MEMINTREN , -intel_uncore_read (uncore,MEMINTREN ) & - ~MEMINT_EVAL_CHG_EN ); +intel_uncore_rmw (uncore,MEMINTREN ,MEMINT_EVAL_CHG_EN ,0 );intel_uncore_write (uncore,MEMINTRSTS ,MEMINT_EVAL_CHG );/* Go back to the starting frequency */
Signature · 1 line
2.34.1
Re: [Intel-gfx] [PATCH v2 2/2] drm/i915/gt: use intel_uncore_rmw when appropriate
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/i915/gt/intel_rps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_rps.c +1
-3@@ -625,9 +625,7 @@ static void gen5_rps_disable(struct intel_rps *rps) rgvswctl =intel_uncore_read16 (uncore,MEMSWCTL );/* Ack interrupts, disable EFC interrupt */ -intel_uncore_write (uncore,MEMINTREN , -intel_uncore_read (uncore,MEMINTREN ) & - ~MEMINT_EVAL_CHG_EN ); +intel_uncore_rmw (uncore,MEMINTREN ,MEMINT_EVAL_CHG_EN ,0 );intel_uncore_write (uncore,MEMINTRSTS ,MEMINT_EVAL_CHG );/* Go back to the starting frequency */ Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä Intel
Re: [Intel-gfx] [PATCH v2 2/2] drm/i915/gt: use intel_uncore_rmw when appropriate
In reply to Andrzej HajdaHi Andrzej,
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>
Thanks,
Andi
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>
Quoted 461 lines
---
v2:
- removed spare parens and moved clear/set args to the same line (Ville)
- split i915 and gt stuff (Ville)
- rebased on the latest drm-tip--- drivers/gpu/drm/i915/intel_pm.c | 187 +++++++++++--------------------- 1 file changed, 66 insertions(+), 121 deletions(-)drivers/gpu/drm/i915/intel_pm.c +66
-121@@ -60,25 +60,20 @@ static void gen9_init_clock_gating(struct drm_i915_private *dev_priv)* Must match Sampler, Pixel Back End, and Media. See * WaCompressedResourceSamplerPbeMediaNewHashMode. */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) | -SKL_DE_COMPRESSED_HASH_MODE ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_DE_COMPRESSED_HASH_MODE ); }/* See Bspec note for PSR2_CTL bit 31, Wa#828:skl,bxt,kbl,cfl */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |SKL_EDP_PSR_FIX_RDWRAP ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_EDP_PSR_FIX_RDWRAP );/* WaEnableChickenDCPR:skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 , -intel_uncore_read (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ) |MASK_WAKEMEM ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ,0 ,MASK_WAKEMEM );/* * WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl * Display WA #0859: skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_MEMORY_WAKE ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_MEMORY_WAKE ); }static void bxt_init_clock_gating (struct drm_i915_private *dev_priv)@@ -86,15 +81,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WaDisableSDEUnitClockGating:bxt */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * FIXME: * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only. */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ );/* * Wa: Backlight PWM may stop in the asserted state, causing backlight @@ -115,16 +108,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)* WaFbcTurnOffFbcWatermark:bxt * Display WA #0562: bxt */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcHighMemBwCorruptionAvoidance:bxt * Display WA #0883: bxt */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void glk_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4055,9 +4045,9 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv)*/ static void ilk_init_lp_watermarks (struct drm_i915_private *dev_priv) { -intel_uncore_write (&dev_priv->uncore,WM3_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM3_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM2_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM2_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM1_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM1_LP_ILK ) & ~WM_LP_ENABLE ); +intel_uncore_rmw (&dev_priv->uncore,WM3_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM2_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM1_LP_ILK ,WM_LP_ENABLE ,0 );/* * Don't touch WM_LP_SPRITE_ENABLE here. @@ -4111,9 +4101,7 @@ static void g4x_disable_trickle_feed(struct drm_i915_private *dev_priv)enum pipe pipe;for_each_pipe (dev_priv, pipe) { -intel_uncore_write (&dev_priv->uncore,DSPCNTR (pipe), -intel_uncore_read (&dev_priv->uncore,DSPCNTR (pipe)) | -DISP_TRICKLE_FEED_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,DSPCNTR (pipe),0 ,DISP_TRICKLE_FEED_DISABLE );intel_uncore_rmw (&dev_priv->uncore,DSPSURF (pipe),0 ,0 );intel_uncore_posting_read (&dev_priv->uncore,DSPSURF (pipe));@@ -4162,19 +4150,13 @@ static void ilk_init_clock_gating(struct drm_i915_private *dev_priv)*/ if (IS_IRONLAKE_M (dev_priv)) {/* WaFbcAsynchFlipDisableFbcQueue:ilk */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_DPARB_GATE ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_DPARB_GATE ); }intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT );g4x_disable_trickle_feed (dev_priv);@@ -4194,8 +4176,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,PCH_DPLSUNIT_CLOCK_GATE_DISABLE |PCH_DPLUNIT_CLOCK_GATE_DISABLE |PCH_CPUNIT_CLOCK_GATE_DISABLE ); -intel_uncore_write (&dev_priv->uncore,SOUTH_CHICKEN2 ,intel_uncore_read (&dev_priv->uncore,SOUTH_CHICKEN2 ) | -DPLS_EDP_PPS_FIX_DIS ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_CHICKEN2 ,0 ,DPLS_EDP_PPS_FIX_DIS );/* The below fixes the weird display corruption, a few pixels shifted * downward, on (only) LVDS of some HP laptops with IVY. */ @@ -4233,9 +4214,7 @@ static void gen6_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT ); intel_uncore_write(&dev_priv->uncore, GEN6_UCGCTL1, intel_uncore_read(&dev_priv->uncore, GEN6_UCGCTL1) |@@ -4295,14 +4274,12 @@ static void lpt_init_clock_gating(struct drm_i915_private *dev_priv)* disabled when not needed anymore in order to save power. */ if (HAS_PCH_LPT_LP (dev_priv)) -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , -intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -PCH_LP_PARTITION_LEVEL_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , +0 ,PCH_LP_PARTITION_LEVEL_DISABLE );/* WADPOClockGatingDisable:hsw */ -intel_uncore_write (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A )) | -TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), +0 ,TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); }static void lpt_suspend_hw (struct drm_i915_private *dev_priv)@@ -4361,8 +4338,7 @@ static void gen12lp_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409825376:tgl (pre-prod)*/ if (IS_TGL_DISPLAY_STEP (dev_priv,STEP_A0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -TGL_VRH_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,TGL_VRH_GATING_DIS );/* Wa_14013723622:tgl,rkl,dg1,adl-s */ if (DISPLAY_VER (dev_priv) ==12 )@@ -4387,8 +4363,7 @@ static void dg1_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409836686:dg1[a0] */ if (IS_DG1_GRAPHICS_STEP (dev_priv,STEP_A0 ,STEP_B0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -DPT_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,DPT_GATING_DIS ); }static void xehpsdv_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4430,8 +4405,7 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv)return ;/* Display WA #1181 WaSouthDisplayDisablePWMCGEGating: cnp */ -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -CNP_PWM_CGE_GATING_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,0 ,CNP_PWM_CGE_GATING_DISABLE ); }static void cfl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4440,23 +4414,20 @@ static void cfl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:cfl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:cfl * Display WA #0562: cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:cfl * Display WA #0873: cfl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void kbl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4464,33 +4435,30 @@ static void kbl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:kbl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* WaDisableSDEUnitClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 , +0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaDisableGamClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 , +0 ,GEN6_GAMUNIT_CLOCK_GATE_DISABLE );/* * WaFbcTurnOffFbcWatermark:kbl * Display WA #0562: kbl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:kbl * Display WA #0873: kbl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void skl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4502,31 +4470,26 @@ static void skl_init_clock_gating(struct drm_i915_private *dev_priv) GEN8_DOP_CLOCK_GATE_ENABLE, 0);/* WAC6entrylatency:skl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:skl * Display WA #0562: skl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:skl * Display WA #0873: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION );/* * WaFbcHighMemBwCorruptionAvoidance:skl * Display WA #0883: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void bdw_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4534,43 +4497,37 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)enum pipe pipe;/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* WaSwitchSolVfFArbitrationPriority:bdw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );/* WaPsrDPAMaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |DPA_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,DPA_MASK_VBLANK_SRD );for_each_pipe (dev_priv, pipe) {/* WaPsrDPRSUnmaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe)) | -BDW_DPRS_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), +0 ,BDW_DPRS_MASK_VBLANK_SRD ); }/* WaVSRefCountFullforceMissDisable:bdw */ /* WaDSRefCountFullforceMissDisable:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableSDEUnitClockGating:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaProgramL3SqcReg1Default:bdw */ gen8_set_l3sqc_credits (dev_priv,30 ,2 );/* WaKVMNotificationOnConfigChange:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR2_1 ,intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR2_1 ) - |KVM_CONFIG_CHANGE_NOTIFICATION_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR2_1 , +0 ,KVM_CONFIG_CHANGE_NOTIFICATION_SELECT );lpt_init_clock_gating (dev_priv);@@ -4579,24 +4536,20 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)* Also see the CHICKEN2 write in bdw_init_workarounds() to disable DOP * clock gating. */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 , -intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) |GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); }static void hsw_init_clock_gating (struct drm_i915_private *dev_priv) {/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* This is required by WaCatErrorRejectionIssue:hsw */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* WaSwitchSolVfFArbitrationPriority:hsw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );lpt_init_clock_gating (dev_priv); }@@ -4606,9 +4559,7 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D ,ILK_VRHUNIT_CLOCK_GATE_DISABLE );/* WaFbcAsynchFlipDisableFbcQueue:ivb */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS );/* WaDisableBackToBackFlipFix:ivb */ intel_uncore_write(&dev_priv->uncore, IVB_CHICKEN3,@@ -4634,9 +4585,8 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv) GEN6_RCZUNIT_CLOCK_GATE_DISABLE);/* This is required by WaCatErrorRejectionIssue:ivb */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );g4x_disable_trickle_feed (dev_priv);@@ -4661,9 +4611,8 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv) _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));/* This is required by WaCatErrorRejectionIssue:vlv */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* * According to the spec, bit 13 (RCZUNIT) must be set on IVB. @@ -4675,8 +4624,7 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv)/* WaDisableL3Bank2xClockGate:vlv * Disabling L3 clock gating- MMIO 940c[25] = 1 * Set bit 25, to disable L3_BANK_2x_CLK_GATING */ -intel_uncore_write (&dev_priv->uncore,GEN7_UCGCTL4 , -intel_uncore_read (&dev_priv->uncore,GEN7_UCGCTL4 ) |GEN7_L3BANK2X_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_UCGCTL4 ,0 ,GEN7_L3BANK2X_CLOCK_GATE_DISABLE );/* * WaDisableVLVClockGating_VBIIssue:vlv @@ -4690,21 +4638,18 @@ static void chv_init_clock_gating(struct drm_i915_private *dev_priv) {/* WaVSRefCountFullforceMissDisable:chv */ /* WaDSRefCountFullforceMissDisable:chv */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );/* WaDisableSemaphoreAndSyncFlipWait:chv */ intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableCSUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_CSUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_CSUNIT_CLOCK_GATE_DISABLE );/* WaDisableSDEUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * WaProgramL3SqcReg1Default:chv Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä Intel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
URL : https://patchwork.freedesktop.org/series/109888/
State : warning
== Summary ==
Error: dim checkpatch failede5106a45cb30 drm/i915: use intel_uncore_rmw when appropriate -:64: WARNING:LONG_LINE: line length of 101 exceeds 100 columns #64: FILE: drivers/gpu/drm/i915/intel_pm.c:90:
+ intel_uncore_rmw(&dev_priv->uncore, GEN8_UCGCTL6, 0, GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
total: 0 errors, 1 warnings, 0 checks, 424 lines checked 7937d76b0d1a drm/i915/gt: use intel_uncore_rmw when appropriate
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
URL : https://patchwork.freedesktop.org/series/109888/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately. +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./drivers/gpu/drm/i915/intel_uncore.h:333:1: warning: trying to copy expression type 31 +./drivers/gpu/drm/i915/intel_uncore.h:338:1: warning: trying to copy expression type 31 +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return'
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: use intel_uncore_rmw when appropriate
URL : https://patchwork.freedesktop.org/series/109888/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12261 -> Patchwork_109888v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_109888v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_109888v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/index.html
Participating hosts (42 -> 41)
------------------------------
Additional (2): fi-rkl-11600 fi-tgl-dsi
Missing (3): fi-kbl-soraka fi-cml-u2 fi-cfl-guc
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109888v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@gem_contexts:
- fi-cfl-8109u: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-cfl-8109u/igt@i915_selftest@live@gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-cfl-8109u/igt@i915_selftest@live@gem_contexts.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_pm_rpm@module-reload:
- {bat-rpls-2}: [DMESG-WARN][3] ([i915#5537]) -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-rpls-2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-rpls-2/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109888v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-rkl-11600: NOTRUN -> [SKIP][5] ([i915#2190])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-rkl-11600: NOTRUN -> [SKIP][6] ([i915#4613]) +3 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@gem_tiled_pread_basic:
- fi-rkl-11600: NOTRUN -> [SKIP][7] ([i915#3282])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@gem_tiled_pread_basic.html
* igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600: NOTRUN -> [SKIP][8] ([i915#3012])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-glk-j4005: [PASS][9] -> [DMESG-FAIL][10] ([i915#5334])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][11] -> [INCOMPLETE][12] ([i915#4785])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-hsw-4770/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-hsw-4770/igt@i915_selftest@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: NOTRUN -> [INCOMPLETE][13] ([i915#5982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-ivb-3770: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-ivb-3770/igt@[email protected]
- fi-bdw-5557u: NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111827])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-bdw-5557u/igt@[email protected]
* igt@kms_chamelium@hdmi-edid-read:
- fi-rkl-11600: NOTRUN -> [SKIP][16] ([fdo#111827]) +7 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-rkl-11600: NOTRUN -> [SKIP][17] ([i915#4103])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-rkl-11600: NOTRUN -> [SKIP][18] ([fdo#109285] / [i915#4098])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@kms_psr@primary_page_flip:
- fi-rkl-11600: NOTRUN -> [SKIP][19] ([i915#1072]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@kms_psr@primary_page_flip.html
* igt@kms_setmode@basic-clone-single-crtc:
- fi-rkl-11600: NOTRUN -> [SKIP][20] ([i915#3555] / [i915#4098])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@prime_vgem@basic-read:
- fi-rkl-11600: NOTRUN -> [SKIP][21] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- fi-rkl-11600: NOTRUN -> [SKIP][22] ([fdo#109295] / [i915#3301] / [i915#3708])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-rkl-11600/igt@[email protected]
* igt@runner@aborted:
- fi-hsw-4770: NOTRUN -> [FAIL][23] ([fdo#109271] / [i915#4312] / [i915#5594])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-hsw-4770/igt@[email protected]
#### Possible fixes ####
* igt@fbdev@read:
- {bat-rpls-2}: [SKIP][24] ([i915#2582]) -> [PASS][25] +4 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-rpls-2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-rpls-2/igt@[email protected]
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [SKIP][26] ([fdo#109271]) -> [PASS][27] +1 similar issue
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-pnv-d510/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-pnv-d510/igt@[email protected]
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-adlm-1}: [DMESG-WARN][28] ([i915#2867]) -> [PASS][29] +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-adlm-1/igt@gem_exec_suspend@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-adlm-1/igt@gem_exec_suspend@[email protected]
* igt@gem_huc_copy@huc-copy:
- {bat-dg2-8}: [FAIL][30] ([i915#7029]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-dg2-8/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-dg2-8/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- {bat-rplp-1}: [DMESG-WARN][32] -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-rplp-1/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-rplp-1/igt@[email protected]
* igt@i915_selftest@live@gem_contexts:
- fi-skl-guc: [DMESG-FAIL][34] ([i915#7270]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-skl-guc/igt@i915_selftest@live@gem_contexts.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-skl-guc/igt@i915_selftest@live@gem_contexts.html
- {bat-jsl-1}: [DMESG-FAIL][36] ([i915#7270]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-jsl-1/igt@i915_selftest@live@gem_contexts.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-jsl-1/igt@i915_selftest@live@gem_contexts.html
- {fi-jsl-1}: [DMESG-FAIL][38] ([i915#7270]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-jsl-1/igt@i915_selftest@live@gem_contexts.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-jsl-1/igt@i915_selftest@live@gem_contexts.html
* igt@i915_selftest@live@gt_heartbeat:
- {bat-jsl-1}: [DMESG-FAIL][40] -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@hangcheck:
- fi-ivb-3770: [INCOMPLETE][42] ([i915#3303] / [i915#7122]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-ivb-3770/igt@i915_selftest@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-ivb-3770/igt@i915_selftest@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-bdw-5557u: [INCOMPLETE][44] ([i915#146] / [i915#6712]) -> [PASS][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12261/fi-bdw-5557u/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/fi-bdw-5557u/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#1759]: https://gitlab.freedesktop.org/drm/intel/issues/1759
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5537]: https://gitlab.freedesktop.org/drm/intel/issues/5537
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6712]: https://gitlab.freedesktop.org/drm/intel/issues/6712
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7122]: https://gitlab.freedesktop.org/drm/intel/issues/7122
[i915#7269]: https://gitlab.freedesktop.org/drm/intel/issues/7269
[i915#7270]: https://gitlab.freedesktop.org/drm/intel/issues/7270
Build changes
-------------
* Linux: CI_DRM_12261 -> Patchwork_109888v1
CI-20190529: 20190529
CI_DRM_12261: 41447224fdfbfbfd1e9ffa5fabc9d277f9c02f8a @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7019: fdbafce2b74e84739bb1d81223ae6f01fb442980 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109888v1: 41447224fdfbfbfd1e9ffa5fabc9d277f9c02f8a @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
7603789631bb drm/i915/gt: use intel_uncore_rmw when appropriate e367dce24d26 drm/i915: use intel_uncore_rmw when appropriate
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109888v1/index.html
Hi Andrzej,
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>
There are some lines that go over 80 characters... do you mind if I fix them before pushing it?
Andi
Hi,
Thx for review.
Quoted 7 lines · Andi Shyti
Hi Andrzej,
Quoted 4 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.
Quoted 5 lines
Quoted 1 line
Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>There are some lines that go over 80 characters... do you mind if I fix them before pushing it?
No problem, I guess you know that for some time the 'hard' limit has been raised to 100 chars/line [1], and this is for aesthetic reasons :) If you do, please follow advice from Ville to break the line after the 2nd argument - to keep 'clear' and 'set' args on the same line, if possible.
Regards
Andrzej
Quoted 2 lines
Andi
Jani Nikula
maintainerQuoted 15 lines · Andrzej Hajda
Hi,
Thx for review.
Quoted 10 lines · Andi Shyti
Hi Andrzej,
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>
Quoted 7 lines
Quoted 2 lines
There are some lines that go over 80 characters... do you mind if I fix them before pushing it?
No problem, I guess you know that for some time the 'hard' limit has been raised to 100 chars/line [1], and this is for aesthetic reasons :) If you do, please follow advice from Ville to break the line after the 2nd argument - to keep 'clear' and 'set' args on the same line, if possible.
Please don't get into the habit of changing stuff while pushing. Please prefer pushing stuff that was sent to the list and the CI crunched through as-is.
Changing the commit message is fine. Doing some glaring comment/whitespace fixes is acceptable. But going through entire patches and fixing issues while pushing, not so much.
And in this case in particular, please don't go out of your way to limit to 80 characters.
BR,
Jani.
Quoted 10 lines
Regards
AndrzejQuoted 2 lines
Andi
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Hi,
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>Quoted 7 lines
Quoted 2 lines
There are some lines that go over 80 characters... do you mind if I fix them before pushing it?
No problem, I guess you know that for some time the 'hard' limit has been raised to 100 chars/line [1], and this is for aesthetic reasons :) If you do, please follow advice from Ville to break the line after the 2nd argument - to keep 'clear' and 'set' args on the same line, if possible.
Quoted 7 lines
Please don't get into the habit of changing stuff while pushing. Please prefer pushing stuff that was sent to the list and the CI crunched through as-is.
Changing the commit message is fine. Doing some glaring comment/whitespace fixes is acceptable. But going through entire patches and fixing issues while pushing, not so much.
OK, will leave it as it is.
Quoted 2 lines
And in this case in particular, please don't go out of your way to limit to 80 characters.
All right! I won't enforce it!
Thanks Jani,
Andi
Quoted 6 lines
BR,
Jani.
PS Hard habits are hard to die: I still like the 80 characters because they force programmers to write cleaner code and, as a tiling wm user, I find it more convenient.
Jani Nikula
maintainerQuoted 3 lines · Andi Shyti
PS Hard habits are hard to die: I still like the 80 characters because they force programmers to write cleaner code and, as a tiling wm user, I find it more convenient.
I generally try to fit everything in 80 columns too, but I also don't like to split it up just because some line goes a few chars over.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Hi Andrzej,
Quoted 5 lines · Andrzej Hajda
This patch replaces all occurences of the form
intel_uncore_write(reg, intel_uncore_read(reg) OP val)withintel_uncore_rmw.Signed-off-by Andrzej Hajda <[email protected]>
both the patches pushed in drm-intel-gt-next.
Thanks,
Andi
Quoted 461 lines
---
v2:
- removed spare parens and moved clear/set args to the same line (Ville)
- split i915 and gt stuff (Ville)
- rebased on the latest drm-tip--- drivers/gpu/drm/i915/intel_pm.c | 187 +++++++++++--------------------- 1 file changed, 66 insertions(+), 121 deletions(-)drivers/gpu/drm/i915/intel_pm.c +66
-121@@ -60,25 +60,20 @@ static void gen9_init_clock_gating(struct drm_i915_private *dev_priv)* Must match Sampler, Pixel Back End, and Media. See * WaCompressedResourceSamplerPbeMediaNewHashMode. */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) | -SKL_DE_COMPRESSED_HASH_MODE ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_DE_COMPRESSED_HASH_MODE ); }/* See Bspec note for PSR2_CTL bit 31, Wa#828:skl,bxt,kbl,cfl */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |SKL_EDP_PSR_FIX_RDWRAP ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,SKL_EDP_PSR_FIX_RDWRAP );/* WaEnableChickenDCPR:skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 , -intel_uncore_read (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ) |MASK_WAKEMEM ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_CHICKEN_DCPR_1 ,0 ,MASK_WAKEMEM );/* * WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl * Display WA #0859: skl,bxt,kbl,glk,cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_MEMORY_WAKE ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_MEMORY_WAKE ); }static void bxt_init_clock_gating (struct drm_i915_private *dev_priv)@@ -86,15 +81,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WaDisableSDEUnitClockGating:bxt */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * FIXME: * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only. */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ );/* * Wa: Backlight PWM may stop in the asserted state, causing backlight @@ -115,16 +108,13 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)* WaFbcTurnOffFbcWatermark:bxt * Display WA #0562: bxt */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcHighMemBwCorruptionAvoidance:bxt * Display WA #0883: bxt */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void glk_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4055,9 +4045,9 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv)*/ static void ilk_init_lp_watermarks (struct drm_i915_private *dev_priv) { -intel_uncore_write (&dev_priv->uncore,WM3_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM3_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM2_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM2_LP_ILK ) & ~WM_LP_ENABLE ); -intel_uncore_write (&dev_priv->uncore,WM1_LP_ILK ,intel_uncore_read (&dev_priv->uncore,WM1_LP_ILK ) & ~WM_LP_ENABLE ); +intel_uncore_rmw (&dev_priv->uncore,WM3_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM2_LP_ILK ,WM_LP_ENABLE ,0 ); +intel_uncore_rmw (&dev_priv->uncore,WM1_LP_ILK ,WM_LP_ENABLE ,0 );/* * Don't touch WM_LP_SPRITE_ENABLE here. @@ -4111,9 +4101,7 @@ static void g4x_disable_trickle_feed(struct drm_i915_private *dev_priv)enum pipe pipe;for_each_pipe (dev_priv, pipe) { -intel_uncore_write (&dev_priv->uncore,DSPCNTR (pipe), -intel_uncore_read (&dev_priv->uncore,DSPCNTR (pipe)) | -DISP_TRICKLE_FEED_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,DSPCNTR (pipe),0 ,DISP_TRICKLE_FEED_DISABLE );intel_uncore_rmw (&dev_priv->uncore,DSPSURF (pipe),0 ,0 );intel_uncore_posting_read (&dev_priv->uncore,DSPSURF (pipe));@@ -4162,19 +4150,13 @@ static void ilk_init_clock_gating(struct drm_i915_private *dev_priv)*/ if (IS_IRONLAKE_M (dev_priv)) {/* WaFbcAsynchFlipDisableFbcQueue:ilk */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_DPARB_GATE ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_DPARB_GATE ); }intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT );g4x_disable_trickle_feed (dev_priv);@@ -4194,8 +4176,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,PCH_DPLSUNIT_CLOCK_GATE_DISABLE |PCH_DPLUNIT_CLOCK_GATE_DISABLE |PCH_CPUNIT_CLOCK_GATE_DISABLE ); -intel_uncore_write (&dev_priv->uncore,SOUTH_CHICKEN2 ,intel_uncore_read (&dev_priv->uncore,SOUTH_CHICKEN2 ) | -DPLS_EDP_PPS_FIX_DIS ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_CHICKEN2 ,0 ,DPLS_EDP_PPS_FIX_DIS );/* The below fixes the weird display corruption, a few pixels shifted * downward, on (only) LVDS of some HP laptops with IVY. */ @@ -4233,9 +4214,7 @@ static void gen6_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D , dspclk_gate); -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ) | -ILK_ELPIN_409_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN2 ,0 ,ILK_ELPIN_409_SELECT ); intel_uncore_write(&dev_priv->uncore, GEN6_UCGCTL1, intel_uncore_read(&dev_priv->uncore, GEN6_UCGCTL1) |@@ -4295,14 +4274,12 @@ static void lpt_init_clock_gating(struct drm_i915_private *dev_priv)* disabled when not needed anymore in order to save power. */ if (HAS_PCH_LPT_LP (dev_priv)) -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , -intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -PCH_LP_PARTITION_LEVEL_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D , +0 ,PCH_LP_PARTITION_LEVEL_DISABLE );/* WADPOClockGatingDisable:hsw */ -intel_uncore_write (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A )) | -TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,TRANS_CHICKEN1 (PIPE_A ), +0 ,TRANS_CHICKEN1_DP0UNIT_GC_DISABLE ); }static void lpt_suspend_hw (struct drm_i915_private *dev_priv)@@ -4361,8 +4338,7 @@ static void gen12lp_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409825376:tgl (pre-prod)*/ if (IS_TGL_DISPLAY_STEP (dev_priv,STEP_A0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -TGL_VRH_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,TGL_VRH_GATING_DIS );/* Wa_14013723622:tgl,rkl,dg1,adl-s */ if (DISPLAY_VER (dev_priv) ==12 )@@ -4387,8 +4363,7 @@ static void dg1_init_clock_gating(struct drm_i915_private *dev_priv)/* Wa_1409836686:dg1[a0] */ if (IS_DG1_GRAPHICS_STEP (dev_priv,STEP_A0 ,STEP_B0 )) -intel_uncore_write (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,intel_uncore_read (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ) | -DPT_GATING_DIS ); +intel_uncore_rmw (&dev_priv->uncore,GEN9_CLKGATE_DIS_3 ,0 ,DPT_GATING_DIS ); }static void xehpsdv_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4430,8 +4405,7 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv)return ;/* Display WA #1181 WaSouthDisplayDisablePWMCGEGating: cnp */ -intel_uncore_write (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,intel_uncore_read (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ) | -CNP_PWM_CGE_GATING_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_DSPCLK_GATE_D ,0 ,CNP_PWM_CGE_GATING_DISABLE ); }static void cfl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4440,23 +4414,20 @@ static void cfl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:cfl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:cfl * Display WA #0562: cfl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:cfl * Display WA #0873: cfl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void kbl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4464,33 +4435,30 @@ static void kbl_init_clock_gating(struct drm_i915_private *dev_priv)gen9_init_clock_gating (dev_priv);/* WAC6entrylatency:kbl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* WaDisableSDEUnitClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 , +0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaDisableGamClockGating:kbl */ if (IS_KBL_GRAPHICS_STEP (dev_priv,0 ,STEP_C0 )) -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 , +0 ,GEN6_GAMUNIT_CLOCK_GATE_DISABLE );/* * WaFbcTurnOffFbcWatermark:kbl * Display WA #0562: kbl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:kbl * Display WA #0873: kbl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION ); }static void skl_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4502,31 +4470,26 @@ static void skl_init_clock_gating(struct drm_i915_private *dev_priv) GEN8_DOP_CLOCK_GATE_ENABLE, 0);/* WAC6entrylatency:skl */ -intel_uncore_write (&dev_priv->uncore,FBC_LLC_READ_CTRL ,intel_uncore_read (&dev_priv->uncore,FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); +intel_uncore_rmw (&dev_priv->uncore,FBC_LLC_READ_CTRL ,0 ,FBC_LLC_FULLY_OPEN );/* * WaFbcTurnOffFbcWatermark:skl * Display WA #0562: skl */ -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL ,intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ) | -DISP_FBC_WM_DIS ); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,0 ,DISP_FBC_WM_DIS );/* * WaFbcNukeOnHostModify:skl * Display WA #0873: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_NUKE_ON_ANY_MODIFICATION ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), +0 ,DPFC_NUKE_ON_ANY_MODIFICATION );/* * WaFbcHighMemBwCorruptionAvoidance:skl * Display WA #0883: skl */ -intel_uncore_write (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ), -intel_uncore_read (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A )) | -DPFC_DISABLE_DUMMY0 ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DPFC_CHICKEN (INTEL_FBC_A ),0 ,DPFC_DISABLE_DUMMY0 ); }static void bdw_init_clock_gating (struct drm_i915_private *dev_priv)@@ -4534,43 +4497,37 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)enum pipe pipe;/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* WaSwitchSolVfFArbitrationPriority:bdw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );/* WaPsrDPAMaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR1_1 , -intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR1_1 ) |DPA_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR1_1 ,0 ,DPA_MASK_VBLANK_SRD );for_each_pipe (dev_priv, pipe) {/* WaPsrDPRSUnmaskVBlankInSRD:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe)) | -BDW_DPRS_MASK_VBLANK_SRD ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (pipe), +0 ,BDW_DPRS_MASK_VBLANK_SRD ); }/* WaVSRefCountFullforceMissDisable:bdw */ /* WaDSRefCountFullforceMissDisable:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableSDEUnitClockGating:bdw */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* WaProgramL3SqcReg1Default:bdw */ gen8_set_l3sqc_credits (dev_priv,30 ,2 );/* WaKVMNotificationOnConfigChange:bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PAR2_1 ,intel_uncore_read (&dev_priv->uncore,CHICKEN_PAR2_1 ) - |KVM_CONFIG_CHANGE_NOTIFICATION_SELECT ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PAR2_1 , +0 ,KVM_CONFIG_CHANGE_NOTIFICATION_SELECT );lpt_init_clock_gating (dev_priv);@@ -4579,24 +4536,20 @@ static void bdw_init_clock_gating(struct drm_i915_private *dev_priv)* Also see the CHICKEN2 write in bdw_init_workarounds() to disable DOP * clock gating. */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 , -intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) |GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); }static void hsw_init_clock_gating (struct drm_i915_private *dev_priv) {/* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */ -intel_uncore_write (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ), -intel_uncore_read (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A )) | -HSW_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,CHICKEN_PIPESL_1 (PIPE_A ),0 ,HSW_FBCQ_DIS );/* This is required by WaCatErrorRejectionIssue:hsw */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* WaSwitchSolVfFArbitrationPriority:hsw */ -intel_uncore_write (&dev_priv->uncore,GAM_ECOCHK ,intel_uncore_read (&dev_priv->uncore,GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); +intel_uncore_rmw (&dev_priv->uncore,GAM_ECOCHK ,0 ,HSW_ECOCHK_ARB_PRIO_SOL );lpt_init_clock_gating (dev_priv); }@@ -4606,9 +4559,7 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv)intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D ,ILK_VRHUNIT_CLOCK_GATE_DISABLE );/* WaFbcAsynchFlipDisableFbcQueue:ivb */ -intel_uncore_write (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 , -intel_uncore_read (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ) | -ILK_FBCQ_DIS ); +intel_uncore_rmw (&dev_priv->uncore,ILK_DISPLAY_CHICKEN1 ,0 ,ILK_FBCQ_DIS );/* WaDisableBackToBackFlipFix:ivb */ intel_uncore_write(&dev_priv->uncore, IVB_CHICKEN3,@@ -4634,9 +4585,8 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv) GEN6_RCZUNIT_CLOCK_GATE_DISABLE);/* This is required by WaCatErrorRejectionIssue:ivb */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );g4x_disable_trickle_feed (dev_priv);@@ -4661,9 +4611,8 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv) _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));/* This is required by WaCatErrorRejectionIssue:vlv */ -intel_uncore_write (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , -intel_uncore_read (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG ) | -GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_SQ_CHICKEN_MBCUNIT_CONFIG , +0 ,GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB );/* * According to the spec, bit 13 (RCZUNIT) must be set on IVB. @@ -4675,8 +4624,7 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv)/* WaDisableL3Bank2xClockGate:vlv * Disabling L3 clock gating- MMIO 940c[25] = 1 * Set bit 25, to disable L3_BANK_2x_CLK_GATING */ -intel_uncore_write (&dev_priv->uncore,GEN7_UCGCTL4 , -intel_uncore_read (&dev_priv->uncore,GEN7_UCGCTL4 ) |GEN7_L3BANK2X_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN7_UCGCTL4 ,0 ,GEN7_L3BANK2X_CLOCK_GATE_DISABLE );/* * WaDisableVLVClockGating_VBIIssue:vlv @@ -4690,21 +4638,18 @@ static void chv_init_clock_gating(struct drm_i915_private *dev_priv) {/* WaVSRefCountFullforceMissDisable:chv */ /* WaDSRefCountFullforceMissDisable:chv */ -intel_uncore_write (&dev_priv->uncore,GEN7_FF_THREAD_MODE , -intel_uncore_read (&dev_priv->uncore,GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); +intel_uncore_rmw (&dev_priv->uncore,GEN7_FF_THREAD_MODE , +GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME ,0 );/* WaDisableSemaphoreAndSyncFlipWait:chv */ intel_uncore_write (&dev_priv->uncore,RING_PSMI_CTL (RENDER_RING_BASE ),_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE ));/* WaDisableCSUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN6_UCGCTL1 ,intel_uncore_read (&dev_priv->uncore,GEN6_UCGCTL1 ) | -GEN6_CSUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN6_UCGCTL1 ,0 ,GEN6_CSUNIT_CLOCK_GATE_DISABLE );/* WaDisableSDEUnitClockGating:chv */ -intel_uncore_write (&dev_priv->uncore,GEN8_UCGCTL6 ,intel_uncore_read (&dev_priv->uncore,GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +intel_uncore_rmw (&dev_priv->uncore,GEN8_UCGCTL6 ,0 ,GEN8_SDEUNIT_CLOCK_GATE_DISABLE );/* * WaProgramL3SqcReg1Default:chv Signature · 1 line
2.34.1