File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -675,10 +675,9 @@ void vc4_bo_dec_usecnt(struct vc4_bo *bo)
675
675
mutex_unlock (& bo -> madv_lock );
676
676
}
677
677
678
- static void vc4_bo_cache_time_timer (unsigned long data )
678
+ static void vc4_bo_cache_time_timer (struct timer_list * t )
679
679
{
680
- struct drm_device * dev = (struct drm_device * )data ;
681
- struct vc4_dev * vc4 = to_vc4_dev (dev );
680
+ struct vc4_dev * vc4 = from_timer (vc4 , t , bo_cache .time_timer );
682
681
683
682
schedule_work (& vc4 -> bo_cache .time_work );
684
683
}
@@ -1040,9 +1039,7 @@ int vc4_bo_cache_init(struct drm_device *dev)
1040
1039
INIT_LIST_HEAD (& vc4 -> bo_cache .time_list );
1041
1040
1042
1041
INIT_WORK (& vc4 -> bo_cache .time_work , vc4_bo_cache_time_work );
1043
- setup_timer (& vc4 -> bo_cache .time_timer ,
1044
- vc4_bo_cache_time_timer ,
1045
- (unsigned long )dev );
1042
+ timer_setup (& vc4 -> bo_cache .time_timer , vc4_bo_cache_time_timer , 0 );
1046
1043
1047
1044
return 0 ;
1048
1045
}
Original file line number Diff line number Diff line change @@ -312,10 +312,10 @@ vc4_reset_work(struct work_struct *work)
312
312
}
313
313
314
314
static void
315
- vc4_hangcheck_elapsed (unsigned long data )
315
+ vc4_hangcheck_elapsed (struct timer_list * t )
316
316
{
317
- struct drm_device * dev = ( struct drm_device * ) data ;
318
- struct vc4_dev * vc4 = to_vc4_dev ( dev ) ;
317
+ struct vc4_dev * vc4 = from_timer ( vc4 , t , hangcheck . timer ) ;
318
+ struct drm_device * dev = vc4 -> dev ;
319
319
uint32_t ct0ca , ct1ca ;
320
320
unsigned long irqflags ;
321
321
struct vc4_exec_info * bin_exec , * render_exec ;
@@ -1156,9 +1156,7 @@ vc4_gem_init(struct drm_device *dev)
1156
1156
spin_lock_init (& vc4 -> job_lock );
1157
1157
1158
1158
INIT_WORK (& vc4 -> hangcheck .reset_work , vc4_reset_work );
1159
- setup_timer (& vc4 -> hangcheck .timer ,
1160
- vc4_hangcheck_elapsed ,
1161
- (unsigned long )dev );
1159
+ timer_setup (& vc4 -> hangcheck .timer , vc4_hangcheck_elapsed , 0 );
1162
1160
1163
1161
INIT_WORK (& vc4 -> job_done_work , vc4_job_done_work );
1164
1162
You can’t perform that action at this time.
0 commit comments