[Intel-gfx] [bug report] drm/i915: Use the i915_device name for identifying our request fences

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 13 12:23:50 UTC 2019


Quoting Dan Carpenter (2019-12-13 12:20:58)
> Hello Chris Wilson,
> 
> The patch 65c29dbb19b2: "drm/i915: Use the i915_device name for
> identifying our request fences" from Dec 11, 2019, leads to the
> following static checker warning:
> 
>         drivers/gpu/drm/i915/i915_request.c:77 i915_fence_get_timeline_name()
>         warn: this array is non-NULL. 'to_request(fence)->gem_context->name'
> 
> drivers/gpu/drm/i915/i915_request.c
>     63  static const char *i915_fence_get_timeline_name(struct dma_fence *fence)
>     64  {
>     65          /*
>     66           * The timeline struct (as part of the ppgtt underneath a context)
>     67           * may be freed when the request is no longer in use by the GPU.
>     68           * We could extend the life of a context to beyond that of all
>     69           * fences, possibly keeping the hw resource around indefinitely,
>     70           * or we just give them a false name. Since
>     71           * dma_fence_ops.get_timeline_name is a debug feature, the occasional
>     72           * lie seems justifiable.
>                    ^^^^^^^^^^^^^^^^^^^^^
> Obsolete comment?

Hmm, indeed.

>     73           */
>     74          if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
>     75                  return "signaled";
>     76  
>     77          return to_request(fence)->gem_context->name ?: "[" DRIVER_NAME "]";
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Not possibly NULL.

Coming to a patch near you.
-Chris


More information about the Intel-gfx mailing list