diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_perf.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_engine_cs.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hangcheck.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_uncore.c | 12 |
8 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e70707e79386..031738d48aad 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -2211,7 +2211,7 @@ intel_info(const struct drm_i915_private *dev_priv) | |||
2211 | GENMASK((e) - 1, (s) - 1)) | 2211 | GENMASK((e) - 1, (s) - 1)) |
2212 | 2212 | ||
2213 | /* Returns true if Gen is in inclusive range [Start, End] */ | 2213 | /* Returns true if Gen is in inclusive range [Start, End] */ |
2214 | #define IS_GEN(dev_priv, s, e) \ | 2214 | #define IS_GEN_RANGE(dev_priv, s, e) \ |
2215 | (!!((dev_priv)->info.gen_mask & INTEL_GEN_MASK((s), (e)))) | 2215 | (!!((dev_priv)->info.gen_mask & INTEL_GEN_MASK((s), (e)))) |
2216 | 2216 | ||
2217 | /* | 2217 | /* |
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 4529edfdcfc8..ad0095be435d 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c | |||
@@ -1796,7 +1796,7 @@ static int gen8_enable_metric_set(struct i915_perf_stream *stream) | |||
1796 | * be read back from automatically triggered reports, as part of the | 1796 | * be read back from automatically triggered reports, as part of the |
1797 | * RPT_ID field. | 1797 | * RPT_ID field. |
1798 | */ | 1798 | */ |
1799 | if (IS_GEN(dev_priv, 9, 11)) { | 1799 | if (IS_GEN_RANGE(dev_priv, 9, 11)) { |
1800 | I915_WRITE(GEN8_OA_DEBUG, | 1800 | I915_WRITE(GEN8_OA_DEBUG, |
1801 | _MASKED_BIT_ENABLE(GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS | | 1801 | _MASKED_BIT_ENABLE(GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS | |
1802 | GEN9_OA_DEBUG_INCLUDE_CLK_RATIO)); | 1802 | GEN9_OA_DEBUG_INCLUDE_CLK_RATIO)); |
@@ -3442,7 +3442,7 @@ void i915_perf_init(struct drm_i915_private *dev_priv) | |||
3442 | 3442 | ||
3443 | dev_priv->perf.oa.gen8_valid_ctx_bit = (1<<16); | 3443 | dev_priv->perf.oa.gen8_valid_ctx_bit = (1<<16); |
3444 | } | 3444 | } |
3445 | } else if (IS_GEN(dev_priv, 10, 11)) { | 3445 | } else if (IS_GEN_RANGE(dev_priv, 10, 11)) { |
3446 | dev_priv->perf.oa.ops.is_valid_b_counter_reg = | 3446 | dev_priv->perf.oa.ops.is_valid_b_counter_reg = |
3447 | gen7_is_valid_b_counter_addr; | 3447 | gen7_is_valid_b_counter_addr; |
3448 | dev_priv->perf.oa.ops.is_valid_mux_reg = | 3448 | dev_priv->perf.oa.ops.is_valid_mux_reg = |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 6d3e0260d49c..7b7e7abfa259 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -453,7 +453,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) | |||
453 | * Only parse SDVO mappings on gens that could have SDVO. This isn't | 453 | * Only parse SDVO mappings on gens that could have SDVO. This isn't |
454 | * accurate and doesn't have to be, as long as it's not too strict. | 454 | * accurate and doesn't have to be, as long as it's not too strict. |
455 | */ | 455 | */ |
456 | if (!IS_GEN(dev_priv, 3, 7)) { | 456 | if (!IS_GEN_RANGE(dev_priv, 3, 7)) { |
457 | DRM_DEBUG_KMS("Skipping SDVO device mapping\n"); | 457 | DRM_DEBUG_KMS("Skipping SDVO device mapping\n"); |
458 | return; | 458 | return; |
459 | } | 459 | } |
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index af2873403009..fe5e87b6e1af 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c | |||
@@ -1248,7 +1248,7 @@ static void intel_engine_print_registers(const struct intel_engine_cs *engine, | |||
1248 | &engine->execlists; | 1248 | &engine->execlists; |
1249 | u64 addr; | 1249 | u64 addr; |
1250 | 1250 | ||
1251 | if (engine->id == RCS && IS_GEN(dev_priv, 4, 7)) | 1251 | if (engine->id == RCS && IS_GEN_RANGE(dev_priv, 4, 7)) |
1252 | drm_printf(m, "\tCCID: 0x%08x\n", I915_READ(CCID)); | 1252 | drm_printf(m, "\tCCID: 0x%08x\n", I915_READ(CCID)); |
1253 | drm_printf(m, "\tRING_START: 0x%08x\n", | 1253 | drm_printf(m, "\tRING_START: 0x%08x\n", |
1254 | I915_READ(RING_START(engine->mmio_base))); | 1254 | I915_READ(RING_START(engine->mmio_base))); |
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 78dbacdeaece..b57e31fc0f1e 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c | |||
@@ -787,7 +787,7 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc) | |||
787 | * having a Y offset that isn't divisible by 4 causes FIFO underrun | 787 | * having a Y offset that isn't divisible by 4 causes FIFO underrun |
788 | * and screen flicker. | 788 | * and screen flicker. |
789 | */ | 789 | */ |
790 | if (IS_GEN(dev_priv, 9, 10) && | 790 | if (IS_GEN_RANGE(dev_priv, 9, 10) && |
791 | (fbc->state_cache.plane.adjusted_y & 3)) { | 791 | (fbc->state_cache.plane.adjusted_y & 3)) { |
792 | fbc->no_fbc_reason = "plane Y offset is misaligned"; | 792 | fbc->no_fbc_reason = "plane Y offset is misaligned"; |
793 | return false; | 793 | return false; |
diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c index e26d05a46451..41921a843d42 100644 --- a/drivers/gpu/drm/i915/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/intel_hangcheck.c | |||
@@ -252,7 +252,7 @@ engine_stuck(struct intel_engine_cs *engine, u64 acthd) | |||
252 | return ENGINE_WAIT_KICK; | 252 | return ENGINE_WAIT_KICK; |
253 | } | 253 | } |
254 | 254 | ||
255 | if (IS_GEN(dev_priv, 6, 7) && tmp & RING_WAIT_SEMAPHORE) { | 255 | if (IS_GEN_RANGE(dev_priv, 6, 7) && tmp & RING_WAIT_SEMAPHORE) { |
256 | switch (semaphore_passed(engine)) { | 256 | switch (semaphore_passed(engine)) { |
257 | default: | 257 | default: |
258 | return ENGINE_DEAD; | 258 | return ENGINE_DEAD; |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 02f6a9b81083..720c11e0acd1 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -445,7 +445,7 @@ static void intel_ring_setup_status_page(struct intel_engine_cs *engine) | |||
445 | POSTING_READ(mmio); | 445 | POSTING_READ(mmio); |
446 | 446 | ||
447 | /* Flush the TLB for this page */ | 447 | /* Flush the TLB for this page */ |
448 | if (IS_GEN(dev_priv, 6, 7)) { | 448 | if (IS_GEN_RANGE(dev_priv, 6, 7)) { |
449 | i915_reg_t reg = RING_INSTPM(engine->mmio_base); | 449 | i915_reg_t reg = RING_INSTPM(engine->mmio_base); |
450 | 450 | ||
451 | /* ring should be idle before issuing a sync flush*/ | 451 | /* ring should be idle before issuing a sync flush*/ |
@@ -679,7 +679,7 @@ static int init_render_ring(struct intel_engine_cs *engine) | |||
679 | return ret; | 679 | return ret; |
680 | 680 | ||
681 | /* WaTimedSingleVertexDispatch:cl,bw,ctg,elk,ilk,snb */ | 681 | /* WaTimedSingleVertexDispatch:cl,bw,ctg,elk,ilk,snb */ |
682 | if (IS_GEN(dev_priv, 4, 6)) | 682 | if (IS_GEN_RANGE(dev_priv, 4, 6)) |
683 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(VS_TIMER_DISPATCH)); | 683 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(VS_TIMER_DISPATCH)); |
684 | 684 | ||
685 | /* We need to disable the AsyncFlip performance optimisations in order | 685 | /* We need to disable the AsyncFlip performance optimisations in order |
@@ -688,7 +688,7 @@ static int init_render_ring(struct intel_engine_cs *engine) | |||
688 | * | 688 | * |
689 | * WaDisableAsyncFlipPerfMode:snb,ivb,hsw,vlv | 689 | * WaDisableAsyncFlipPerfMode:snb,ivb,hsw,vlv |
690 | */ | 690 | */ |
691 | if (IS_GEN(dev_priv, 6, 7)) | 691 | if (IS_GEN_RANGE(dev_priv, 6, 7)) |
692 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(ASYNC_FLIP_PERF_DISABLE)); | 692 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(ASYNC_FLIP_PERF_DISABLE)); |
693 | 693 | ||
694 | /* Required for the hardware to program scanline values for waiting */ | 694 | /* Required for the hardware to program scanline values for waiting */ |
@@ -713,7 +713,7 @@ static int init_render_ring(struct intel_engine_cs *engine) | |||
713 | _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB)); | 713 | _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB)); |
714 | } | 714 | } |
715 | 715 | ||
716 | if (IS_GEN(dev_priv, 6, 7)) | 716 | if (IS_GEN_RANGE(dev_priv, 6, 7)) |
717 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_FORCE_ORDERING)); | 717 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_FORCE_ORDERING)); |
718 | 718 | ||
719 | if (INTEL_GEN(dev_priv) >= 6) | 719 | if (INTEL_GEN(dev_priv) >= 6) |
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 9289515108c3..631b4165fe00 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c | |||
@@ -1567,13 +1567,13 @@ void intel_uncore_init(struct drm_i915_private *dev_priv) | |||
1567 | dev_priv->uncore.pmic_bus_access_nb.notifier_call = | 1567 | dev_priv->uncore.pmic_bus_access_nb.notifier_call = |
1568 | i915_pmic_bus_access_notifier; | 1568 | i915_pmic_bus_access_notifier; |
1569 | 1569 | ||
1570 | if (IS_GEN(dev_priv, 2, 4) || intel_vgpu_active(dev_priv)) { | 1570 | if (IS_GEN_RANGE(dev_priv, 2, 4) || intel_vgpu_active(dev_priv)) { |
1571 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen2); | 1571 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen2); |
1572 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen2); | 1572 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen2); |
1573 | } else if (IS_GEN5(dev_priv)) { | 1573 | } else if (IS_GEN5(dev_priv)) { |
1574 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen5); | 1574 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen5); |
1575 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen5); | 1575 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen5); |
1576 | } else if (IS_GEN(dev_priv, 6, 7)) { | 1576 | } else if (IS_GEN_RANGE(dev_priv, 6, 7)) { |
1577 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen6); | 1577 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen6); |
1578 | 1578 | ||
1579 | if (IS_VALLEYVIEW(dev_priv)) { | 1579 | if (IS_VALLEYVIEW(dev_priv)) { |
@@ -1592,7 +1592,7 @@ void intel_uncore_init(struct drm_i915_private *dev_priv) | |||
1592 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen8); | 1592 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, gen8); |
1593 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen6); | 1593 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, gen6); |
1594 | } | 1594 | } |
1595 | } else if (IS_GEN(dev_priv, 9, 10)) { | 1595 | } else if (IS_GEN_RANGE(dev_priv, 9, 10)) { |
1596 | ASSIGN_FW_DOMAINS_TABLE(__gen9_fw_ranges); | 1596 | ASSIGN_FW_DOMAINS_TABLE(__gen9_fw_ranges); |
1597 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, fwtable); | 1597 | ASSIGN_WRITE_MMIO_VFUNCS(dev_priv, fwtable); |
1598 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, fwtable); | 1598 | ASSIGN_READ_MMIO_VFUNCS(dev_priv, fwtable); |
@@ -2321,7 +2321,7 @@ intel_uncore_forcewake_for_read(struct drm_i915_private *dev_priv, | |||
2321 | } else if (INTEL_GEN(dev_priv) >= 6) { | 2321 | } else if (INTEL_GEN(dev_priv) >= 6) { |
2322 | fw_domains = __gen6_reg_read_fw_domains(offset); | 2322 | fw_domains = __gen6_reg_read_fw_domains(offset); |
2323 | } else { | 2323 | } else { |
2324 | WARN_ON(!IS_GEN(dev_priv, 2, 5)); | 2324 | WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); |
2325 | fw_domains = 0; | 2325 | fw_domains = 0; |
2326 | } | 2326 | } |
2327 | 2327 | ||
@@ -2343,10 +2343,10 @@ intel_uncore_forcewake_for_write(struct drm_i915_private *dev_priv, | |||
2343 | fw_domains = __fwtable_reg_write_fw_domains(offset); | 2343 | fw_domains = __fwtable_reg_write_fw_domains(offset); |
2344 | } else if (IS_GEN8(dev_priv)) { | 2344 | } else if (IS_GEN8(dev_priv)) { |
2345 | fw_domains = __gen8_reg_write_fw_domains(offset); | 2345 | fw_domains = __gen8_reg_write_fw_domains(offset); |
2346 | } else if (IS_GEN(dev_priv, 6, 7)) { | 2346 | } else if (IS_GEN_RANGE(dev_priv, 6, 7)) { |
2347 | fw_domains = FORCEWAKE_RENDER; | 2347 | fw_domains = FORCEWAKE_RENDER; |
2348 | } else { | 2348 | } else { |
2349 | WARN_ON(!IS_GEN(dev_priv, 2, 5)); | 2349 | WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); |
2350 | fw_domains = 0; | 2350 | fw_domains = 0; |
2351 | } | 2351 | } |
2352 | 2352 | ||