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 @@ -191,7 +191,6 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
191
191
struct v3d_dev * v3d = job -> v3d ;
192
192
struct v3d_file_priv * file = job -> file -> driver_priv ;
193
193
struct v3d_stats * global_stats = & v3d -> queue [queue ].stats ;
194
- struct v3d_stats * local_stats = & file -> stats [queue ];
195
194
u64 now = local_clock ();
196
195
unsigned long flags ;
197
196
@@ -201,7 +200,12 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
201
200
else
202
201
preempt_disable ();
203
202
204
- v3d_stats_update (local_stats , now );
203
+ /* Don't update the local stats if the file context has already closed */
204
+ if (file )
205
+ v3d_stats_update (& file -> stats [queue ], now );
206
+ else
207
+ drm_dbg (& v3d -> drm , "The file descriptor was closed before job completion\n" );
208
+
205
209
v3d_stats_update (global_stats , now );
206
210
207
211
if (IS_ENABLED (CONFIG_LOCKDEP ))
You can’t perform that action at this time.
0 commit comments