All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [bug report] drm/i915: Use the i915_device name for identifying our request fences
@ 2019-12-13 12:20 Dan Carpenter
  2019-12-13 12:23 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-12-13 12:20 UTC (permalink / raw)
  To: chris; +Cc: intel-gfx

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?

    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.

    78  }

regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Intel-gfx] [bug report] drm/i915: Use the i915_device name for identifying our request fences
  2019-12-13 12:20 [Intel-gfx] [bug report] drm/i915: Use the i915_device name for identifying our request fences Dan Carpenter
@ 2019-12-13 12:23 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2019-12-13 12:23 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: intel-gfx

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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-13 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 12:20 [Intel-gfx] [bug report] drm/i915: Use the i915_device name for identifying our request fences Dan Carpenter
2019-12-13 12:23 ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.