Skip to content

Commit b6cfae8

Browse files
committed
drm/i915: Un-invert {i9xx,i965}_error_mask()
Make life a bit more straightforward by removing the bitwise not from {i9xx,i965}_error_mask() and instead do it when feeding the value to gen2_error_init(). Make life a bit easier I think. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250217070047.953-8-ville.syrjala@linux.intel.com
1 parent 474e1cd commit b6cfae8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/gpu/drm/i915/i915_irq.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -838,10 +838,10 @@ static u32 i9xx_error_mask(struct drm_i915_private *i915)
838838
* so we just have to mask off all page table errors via EMR.
839839
*/
840840
if (HAS_FBC(i915))
841-
return ~I915_ERROR_MEMORY_REFRESH;
841+
return I915_ERROR_MEMORY_REFRESH;
842842
else
843-
return ~(I915_ERROR_PAGE_TABLE |
844-
I915_ERROR_MEMORY_REFRESH);
843+
return I915_ERROR_PAGE_TABLE |
844+
I915_ERROR_MEMORY_REFRESH;
845845
}
846846

847847
static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv,
@@ -900,7 +900,7 @@ static void i915_irq_postinstall(struct drm_i915_private *dev_priv)
900900
struct intel_uncore *uncore = &dev_priv->uncore;
901901
u32 enable_mask;
902902

903-
gen2_error_init(uncore, GEN2_ERROR_REGS, i9xx_error_mask(dev_priv));
903+
gen2_error_init(uncore, GEN2_ERROR_REGS, ~i9xx_error_mask(dev_priv));
904904

905905
dev_priv->irq_mask =
906906
~(I915_DISPLAY_PIPE_A_EVENT_INTERRUPT |
@@ -1011,21 +1011,21 @@ static u32 i965_error_mask(struct drm_i915_private *i915)
10111011
* so we can always enable the page table errors.
10121012
*/
10131013
if (IS_G4X(i915))
1014-
return ~(GM45_ERROR_PAGE_TABLE |
1015-
GM45_ERROR_MEM_PRIV |
1016-
GM45_ERROR_CP_PRIV |
1017-
I915_ERROR_MEMORY_REFRESH);
1014+
return GM45_ERROR_PAGE_TABLE |
1015+
GM45_ERROR_MEM_PRIV |
1016+
GM45_ERROR_CP_PRIV |
1017+
I915_ERROR_MEMORY_REFRESH;
10181018
else
1019-
return ~(I915_ERROR_PAGE_TABLE |
1020-
I915_ERROR_MEMORY_REFRESH);
1019+
return I915_ERROR_PAGE_TABLE |
1020+
I915_ERROR_MEMORY_REFRESH;
10211021
}
10221022

10231023
static void i965_irq_postinstall(struct drm_i915_private *dev_priv)
10241024
{
10251025
struct intel_uncore *uncore = &dev_priv->uncore;
10261026
u32 enable_mask;
10271027

1028-
gen2_error_init(uncore, GEN2_ERROR_REGS, i965_error_mask(dev_priv));
1028+
gen2_error_init(uncore, GEN2_ERROR_REGS, ~i965_error_mask(dev_priv));
10291029

10301030
dev_priv->irq_mask =
10311031
~(I915_ASLE_INTERRUPT |

0 commit comments

Comments
 (0)