Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

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

 





Am 07.06.21 um 19:58 schrieb Thomas Hellström (Intel):

On 6/7/21 7:54 PM, Christian König wrote:


Am 07.06.21 um 19:06 schrieb Thomas Hellström (Intel):

On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote:

On 6/2/21 12:09 PM, Christian König wrote:
...
@@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
   */
  static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
                    const struct ttm_place *place,
-                  struct ttm_resource *mem,
+                  struct ttm_resource **mem,
                    struct ttm_operation_ctx *ctx)
  {
      struct ttm_device *bdev = bo->bdev;
-    struct ttm_resource_manager *man = ttm_manager_type(bdev, mem->mem_type);
+    struct ttm_resource_manager *man;
      struct ww_acquire_ctx *ticket;
      int ret;
  +    man = ttm_manager_type(bdev, (*mem)->mem_type);

Isn't (*mem) uninitialized here? Should be place->mem_type? Eviction is immediately sent to the bushes.

Got at least one additional NULL pointer deref to track down in the eviction code, but could be a merge error of mine as well.

Actually this last one was probably due to a bad temporary fix of the above one.

I've found one more warning during my testing now. But that is just a false positive.

Apart from that I haven't seen any other fallout, but fingers crossed.

vmwgfx doesn't seem to happy. It works AFAICT., but warns in vmw_move() about ttm_bo_assign_mem() replacing an existing resource.

Yeah, that's the one I've just fixed. Patch is underway.

Christian.


/Thomas




Christian.


/Thomas







[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