* [bug report] drm/radeon: never unpin UVD bo v3
@ 2019-11-26 4:50 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-11-26 4:50 UTC (permalink / raw)
To: christian.koenig-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1793 bytes --]
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
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
* [bug report] drm/radeon: never unpin UVD bo v3
@ 2019-11-26 4:50 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-11-26 4:50 UTC (permalink / raw)
To: christian.koenig; +Cc: amd-gfx
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1793 bytes --]
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
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-26 4:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 4:50 [bug report] drm/radeon: never unpin UVD bo v3 Dan Carpenter
2019-11-26 4:50 ` Dan Carpenter
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.