summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2019-11-29 06:19:08 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2019-11-29 06:19:08 +0000
commit6760a6095c934a222278e6d1c4e2209b9b96f736 (patch)
tree57a82c6551c54111137185a8d88d1d0351864918 /sys/dev/pci/drm
parentf4b07b6d959c21e04e199e4131c7ed0caf912d88 (diff)
drm_sched_entity_flush() doesn't care about specific threads, so just
track the process (and not the original thread of the process). ok jsg@ kettenis@
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/include/drm/gpu_scheduler.h2
-rw-r--r--sys/dev/pci/drm/scheduler/gpu_scheduler.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/include/drm/gpu_scheduler.h b/sys/dev/pci/drm/include/drm/gpu_scheduler.h
index 4f33eb0152e..abbc5481430 100644
--- a/sys/dev/pci/drm/include/drm/gpu_scheduler.h
+++ b/sys/dev/pci/drm/include/drm/gpu_scheduler.h
@@ -89,7 +89,7 @@ struct drm_sched_entity {
#ifdef __linux__
struct task_struct *last_user;
#else
- struct proc *last_user;
+ struct process *last_user;
#endif
};
diff --git a/sys/dev/pci/drm/scheduler/gpu_scheduler.c b/sys/dev/pci/drm/scheduler/gpu_scheduler.c
index a545c392f01..20883b90053 100644
--- a/sys/dev/pci/drm/scheduler/gpu_scheduler.c
+++ b/sys/dev/pci/drm/scheduler/gpu_scheduler.c
@@ -267,7 +267,7 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
#ifdef __linux__
struct task_struct *last_user;
#else
- struct proc *last_user;
+ struct process *last_user;
#endif
long ret = timeout;
@@ -296,8 +296,8 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
if ((!last_user || last_user == current->group_leader) &&
(current->flags & PF_EXITING) && (current->exit_code == SIGKILL))
#else
- last_user = cmpxchg(&entity->last_user, curproc->p_p->ps_mainproc, NULL);
- if ((!last_user || last_user == curproc->p_p->ps_mainproc) &&
+ last_user = cmpxchg(&entity->last_user, curproc->p_p, NULL);
+ if ((!last_user || last_user == curproc->p_p) &&
(curproc->p_p->ps_flags & PS_EXITING) &&
(curproc->p_xstat == SIGKILL))
#endif
@@ -544,7 +544,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job,
#ifdef __linux__
WRITE_ONCE(entity->last_user, current->group_leader);
#else
- WRITE_ONCE(entity->last_user, curproc->p_p->ps_mainproc);
+ WRITE_ONCE(entity->last_user, curproc->p_p);
#endif
first = spsc_queue_push(&entity->job_queue, &sched_job->queue_node);