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)
199199 struct v3d_dev * v3d = job -> v3d ;
200200 struct v3d_file_priv * file = job -> file -> driver_priv ;
201201 struct v3d_stats * global_stats = & v3d -> queue [queue ].stats ;
202- struct v3d_stats * local_stats = & file -> stats [queue ];
203202 u64 now = local_clock ();
204203 unsigned long flags ;
205204
@@ -209,7 +208,12 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue)
209208 else
210209 preempt_disable ();
211210
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+
213217 v3d_stats_update (global_stats , now );
214218
215219 if (IS_ENABLED (CONFIG_LOCKDEP ))
You can’t perform that action at this time.
0 commit comments