File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,6 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
199
199
struct v3d_dev * v3d = job -> v3d ;
200
200
struct v3d_file_priv * file = job -> file -> driver_priv ;
201
201
struct v3d_stats * global_stats = & v3d -> queue [queue ].stats ;
202
- struct v3d_stats * local_stats = & file -> stats [queue ];
203
202
u64 now = local_clock ();
204
203
unsigned long flags ;
205
204
@@ -209,7 +208,12 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
209
208
else
210
209
preempt_disable ();
211
210
212
- v3d_stats_update (local_stats , now );
211
+ /* Don't update the local stats if the file context has already closed */
212
+ if (file )
213
+ v3d_stats_update (& file -> stats [queue ], now );
214
+ else
215
+ drm_dbg (& v3d -> drm , "The file descriptor was closed before job completion\n" );
216
+
213
217
v3d_stats_update (global_stats , now );
214
218
215
219
if (IS_ENABLED (CONFIG_LOCKDEP ))
You can’t perform that action at this time.
0 commit comments