[PATCH] drm/ttm: soften TTM warnings
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Mar 4 18:02:57 UTC 2021
Am 04.03.21 um 15:05 schrieb Gerd Hoffmann:
> On Wed, Mar 03, 2021 at 04:57:57PM +0100, Christian König wrote:
>> QXL indeed unrefs pinned BOs and the warnings are spamming peoples log files.
>>
>> Make sure we warn only once until the QXL driver is fixed.
>> - dma_resv_assert_held(bo->base.resv);
>> + if (!bo->deleted)
>> + dma_resv_assert_held(bo->base.resv);
> Hmm? I'm not aware of qxl having problems with this one.
> Did I miss something?
See the mail from Peter, but asserts were triggered when the pin_count
was non zero and destruction.
>
>> - if (WARN_ON(bo->pin_count)) {
>> + if (WARN_ON_ONCE(bo->pin_count)) {
> Well, as temporary thing this is rather pointless, qxl fix for this one
> is already queued in drm-misc-fixes so this would only land after the
> qxl fixes ...
>
> But I think using WARN_ON_ONCE() is a good idea in general, especially
> in a code path like this where a single bug can easily cause a flood of
> stack traces.
Well that flood of stack traces can also be helpful, cause it makes
people report such kind of issues immediately.
Anyway I'm going to keep that WARN_ON_ONCE for a cycle or two and if I
don't hear any more complains I'm going to completely remove this
"feature" and just always warn when we see a non zero pin_count on
destruction.
Christian.
>
> Acked-by: Gerd Hoffmann <kraxel at redhat.com>
>
> take care,
> Gerd
>
More information about the dri-devel
mailing list