Skip to content

Commit f9e7ac6

Browse files
committed
drm/panthor: Don't add write fences to the shared BOs
The only user (the mesa gallium driver) is already assuming explicit synchronization and doing the export/import dance on shared BOs. The only reason we were registering ourselves as writers on external BOs is because Xe, which was the reference back when we developed Panthor, was doing so. Turns out Xe was wrong, and we really want bookkeep on all registered fences, so userspace can explicitly upgrade those to read/write when needed. Fixes: 4bdca11 ("drm/panthor: Add the driver frontend block") Cc: Matthew Brost <[email protected]> Cc: Simona Vetter <[email protected]> Cc: <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7a1f30a commit f9e7ac6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/gpu/drm/panthor/panthor_sched.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,13 +3443,8 @@ void panthor_job_update_resvs(struct drm_exec *exec, struct drm_sched_job *sched
34433443
{
34443444
struct panthor_job *job = container_of(sched_job, struct panthor_job, base);
34453445

3446-
/* Still not sure why we want USAGE_WRITE for external objects, since I
3447-
* was assuming this would be handled through explicit syncs being imported
3448-
* to external BOs with DMA_BUF_IOCTL_IMPORT_SYNC_FILE, but other drivers
3449-
* seem to pass DMA_RESV_USAGE_WRITE, so there must be a good reason.
3450-
*/
34513446
panthor_vm_update_resvs(job->group->vm, exec, &sched_job->s_fence->finished,
3452-
DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_WRITE);
3447+
DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_BOOKKEEP);
34533448
}
34543449

34553450
void panthor_sched_unplug(struct panthor_device *ptdev)

0 commit comments

Comments
 (0)