[bug report] drm/radeon: never unpin UVD bo v3

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

 



Hello Christian König,

The patch 9cc2e0e9f133: "drm/radeon: never unpin UVD bo v3" from Jul
12, 2013, leads to the following static checker warning:

	drivers/gpu/drm/radeon/radeon_uvd.c:225 radeon_uvd_init()
	warn: inconsistent returns '*rdev->uvd.vcpu_bo->tbo.base.resv'.

drivers/gpu/drm/radeon/radeon_uvd.c
   195          r = radeon_bo_reserve(rdev->uvd.vcpu_bo, false);
                ^^^^^^^^^^^^^^^^^^^^^^
   196          if (r) {
   197                  radeon_bo_unref(&rdev->uvd.vcpu_bo);
   198                  dev_err(rdev->dev, "(%d) failed to reserve UVD bo\n", r);
   199                  return r;
   200          }
   201  
   202          r = radeon_bo_pin(rdev->uvd.vcpu_bo, RADEON_GEM_DOMAIN_VRAM,
   203                            &rdev->uvd.gpu_addr);
   204          if (r) {
   205                  radeon_bo_unreserve(rdev->uvd.vcpu_bo);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   206                  radeon_bo_unref(&rdev->uvd.vcpu_bo);
   207                  dev_err(rdev->dev, "(%d) UVD bo pin failed\n", r);
   208                  return r;
   209          }
   210  
   211          r = radeon_bo_kmap(rdev->uvd.vcpu_bo, &rdev->uvd.cpu_addr);
   212          if (r) {
   213                  dev_err(rdev->dev, "(%d) UVD map failed\n", r);
   214                  return r;
                        ^^^^^^^^
Do we have to unreserve this?

   215          }
   216  
   217          radeon_bo_unreserve(rdev->uvd.vcpu_bo);
   218  
   219          for (i = 0; i < rdev->uvd.max_handles; ++i) {
   220                  atomic_set(&rdev->uvd.handles[i], 0);
   221                  rdev->uvd.filp[i] = NULL;
   222                  rdev->uvd.img_size[i] = 0;
   223          }
   224  
   225          return 0;


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

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux