[Intel-gfx] [PATCH 02/22] drm/i915: Move intel_engine_mask_t around for use by i915_request_types.h

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 18 13:57:47 UTC 2019


Quoting Tvrtko Ursulin (2019-03-18 10:48:42)
> 
> On 18/03/2019 10:40, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2019-03-18 10:21:41)
> >>
> >> On 18/03/2019 09:51, Chris Wilson wrote:
> >>> We want to use intel_engine_mask_t inside i915_request.h, which means
> >>> extracting it from the general header file mess and placing it inside a
> >>> types.h. A knock on effect is that the compiler wants to warn about
> >>> type-contraction of ALL_ENGINES into intel_engine_maskt_t, so prepare
> >>> for the worst.
> >>
> >> We can't do:
> >>
> >> #define ALL_ENGINES ((intel_engine_mask_t)-1)
> >>
> >> to avoid this warning and a lot of the churn?
> > 
> > The churn is a lot of type fixing which needs to be done at some point.
> > I'm not keen on passing the contracted intel_engine_mask_t, and
> > ALL_ENGINES is not all bits set.
> 
> It is all bit set in intel_engine_mask_t. ;) I forgot what was your 
> argument against using it in function arguments. Perhaps because it is 
> pointless.. I regret adding this typedef even more now.

I made it all intel_engine_mask_t,


add/remove: 0/0 grow/shrink: 16/24 up/down: 111/-95 (16)
Function                                     old     new   delta
workload_thread                             4244    4274     +30
gen6_reset_engines                           200     217     +17
intel_gpu_reset                              632     646     +14
__igt_switch_to_kernel_context               399     412     +13
workload_thread.cold                        1426    1436     +10
intel_gvt_reset_vgpu_locked                  316     321      +5
__igt_switch_to_kernel_context.cold          126     131      +5
ring_mode_mmio_write                         202     206      +4
init_execlist                                 13      17      +4
intel_vgpu_select_submission_ops             210     212      +2
intel_vgpu_reset_submission                   49      51      +2
reset_execlist                               210     211      +1
live_gpu_reset_gt_engine_workarounds.part     175     176      +1
i915_wedged_set                              131     132      +1
i915_gem_init                               1527    1528      +1
clean_execlist                               130     131      +1
i915_capture_error_state                     337     336      -1
context_barrier_task.constprop               369     368      -1
intel_vgpu_clean_submission                  144     142      -2
intel_gvt_release_vgpu                        60      58      -2
intel_engines_sanitize                       115     113      -2
igt_wedged_reset                             101      99      -2
igt_switch_to_kernel_context                 240     238      -2
igt_reset_wait                               340     338      -2
igt_reset_nop                                442     440      -2
igt_global_reset                              85      83      -2
i915_gem_resume                              207     205      -2
i915_drop_caches_set                         572     570      -2
__i915_gem_set_wedged.part                   354     352      -2
ring_request_alloc                          1887    1884      -3
igt_atomic_reset                             407     404      -3
i915_gem_switch_to_kernel_context            629     626      -3
gen8_reset_engines                           927     924      -3
gen6_alloc_va_range                          641     638      -3
pd_vma_bind                                  245     241      -4
i915_reset                                   903     896      -7
i915_handle_error                            711     704      -7
context_barrier_inject_fault                   8       1      -7
mock_context_barrier                         429     415     -14
gdrst_mmio_write                             164     147     -17

so bizarre gcc is bizarre.

Would you rather see this with universal intel_engine_mask_t?
-Chris


More information about the Intel-gfx mailing list