mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/v3d: Store a pointer to struct v3d_file_priv inside each job
Instead of storing a pointer to the DRM file data, store a pointer directly to the private V3D file struct. Signed-off-by: Maíra Canal <mcanal@igalia.com>
This commit is contained in:
@@ -322,9 +322,9 @@ struct v3d_job {
|
||||
struct v3d_perfmon *perfmon;
|
||||
|
||||
/* File descriptor of the process that submitted the job that could be used
|
||||
* for collecting stats by process of GPU usage.
|
||||
* to collect per-process information about the GPU.
|
||||
*/
|
||||
struct drm_file *file;
|
||||
struct v3d_file_priv *file_priv;
|
||||
|
||||
/* Callback for the freeing of the job on refcount going to 0. */
|
||||
void (*free)(struct kref *ref);
|
||||
|
||||
@@ -139,7 +139,7 @@ static void
|
||||
v3d_job_start_stats(struct v3d_job *job, enum v3d_queue queue)
|
||||
{
|
||||
struct v3d_dev *v3d = job->v3d;
|
||||
struct v3d_file_priv *file = job->file->driver_priv;
|
||||
struct v3d_file_priv *file = job->file_priv;
|
||||
struct v3d_stats *global_stats = &v3d->queue[queue].stats;
|
||||
struct v3d_stats *local_stats = &file->stats[queue];
|
||||
u64 now = local_clock();
|
||||
@@ -197,7 +197,7 @@ void
|
||||
v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
|
||||
{
|
||||
struct v3d_dev *v3d = job->v3d;
|
||||
struct v3d_file_priv *file = job->file->driver_priv;
|
||||
struct v3d_file_priv *file = job->file_priv;
|
||||
struct v3d_stats *global_stats = &v3d->queue[queue].stats;
|
||||
u64 now = local_clock();
|
||||
unsigned long flags;
|
||||
@@ -574,7 +574,7 @@ static void
|
||||
v3d_reset_performance_queries(struct v3d_cpu_job *job)
|
||||
{
|
||||
struct v3d_performance_query_info *performance_query = &job->performance_query;
|
||||
struct v3d_file_priv *v3d_priv = job->base.file->driver_priv;
|
||||
struct v3d_file_priv *v3d_priv = job->base.file_priv;
|
||||
struct v3d_dev *v3d = job->base.v3d;
|
||||
struct v3d_perfmon *perfmon;
|
||||
|
||||
@@ -604,7 +604,7 @@ v3d_write_performance_query_result(struct v3d_cpu_job *job, void *data,
|
||||
{
|
||||
struct v3d_performance_query_info *performance_query =
|
||||
&job->performance_query;
|
||||
struct v3d_file_priv *v3d_priv = job->base.file->driver_priv;
|
||||
struct v3d_file_priv *v3d_priv = job->base.file_priv;
|
||||
struct v3d_performance_query *perf_query =
|
||||
&performance_query->queries[query];
|
||||
struct v3d_dev *v3d = job->base.v3d;
|
||||
|
||||
@@ -227,7 +227,7 @@ v3d_job_init(struct v3d_dev *v3d, struct drm_file *file_priv,
|
||||
|
||||
job->v3d = v3d;
|
||||
job->free = free;
|
||||
job->file = file_priv;
|
||||
job->file_priv = v3d_priv;
|
||||
|
||||
ret = drm_sched_job_init(&job->base, &v3d_priv->sched_entity[queue],
|
||||
1, v3d_priv, file_priv->client_id);
|
||||
|
||||
Reference in New Issue
Block a user