Re: [PATCH] drm/ttm: soften TTM warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 03.03.21 um 18:19 schrieb Daniel Vetter:
On Wed, Mar 3, 2021 at 4:57 PM Christian König
<ckoenig.leichtzumerken@xxxxxxxxx> 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.

Signed-off-by: Christian König <christian.koenig@xxxxxxx>
Can you pls add FIXME comments to each that qxl is broken and needs to
be fixed first? Also please add a References: link to the bug report
on lore.kernel.org or wherever it was.

Was there a bug report? I only got notifications by mail so far.

Christian.


With that: r-b: me
-Daniel

---
  drivers/gpu/drm/ttm/ttm_bo.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 20a25660b35b..245fa2c05927 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -136,7 +136,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,
         struct ttm_bo_device *bdev = bo->bdev;
         struct ttm_resource_manager *man;

-       dma_resv_assert_held(bo->base.resv);
+       if (!bo->deleted)
+               dma_resv_assert_held(bo->base.resv);

         if (bo->pin_count) {
                 ttm_bo_del_from_lru(bo);
@@ -509,7 +510,7 @@ static void ttm_bo_release(struct kref *kref)
                  * shrinkers, now that they are queued for
                  * destruction.
                  */
-               if (WARN_ON(bo->pin_count)) {
+               if (WARN_ON_ONCE(bo->pin_count)) {
                         bo->pin_count = 0;
                         ttm_bo_move_to_lru_tail(bo, &bo->mem, NULL);
                 }
--
2.25.1



_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux