Skip to content

Commit

Permalink
drm/panthor: Don't add write fences to the shared BOs
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
bbrezillon authored and ginkage committed Oct 14, 2024
1 parent 62884fe commit 4a47ff1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/gpu/drm/panthor/panthor_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3443,13 +3443,8 @@ void panthor_job_update_resvs(struct drm_exec *exec, struct drm_sched_job *sched
{
struct panthor_job *job = container_of(sched_job, struct panthor_job, base);

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

void panthor_sched_unplug(struct panthor_device *ptdev)
Expand Down

0 comments on commit 4a47ff1

Please sign in to comment.