File tree 3 files changed +5
-26
lines changed
3 files changed +5
-26
lines changed Original file line number Diff line number Diff line change @@ -411,20 +411,6 @@ static void dpu_kms_disable_commit(struct msm_kms *kms)
411
411
pm_runtime_put_sync (& dpu_kms -> pdev -> dev );
412
412
}
413
413
414
- static ktime_t dpu_kms_vsync_time (struct msm_kms * kms , struct drm_crtc * crtc )
415
- {
416
- struct drm_encoder * encoder ;
417
-
418
- drm_for_each_encoder_mask (encoder , crtc -> dev , crtc -> state -> encoder_mask ) {
419
- ktime_t vsync_time ;
420
-
421
- if (dpu_encoder_vsync_time (encoder , & vsync_time ) == 0 )
422
- return vsync_time ;
423
- }
424
-
425
- return ktime_get ();
426
- }
427
-
428
414
static void dpu_kms_prepare_commit (struct msm_kms * kms ,
429
415
struct drm_atomic_state * state )
430
416
{
@@ -953,7 +939,6 @@ static const struct msm_kms_funcs kms_funcs = {
953
939
.irq = dpu_core_irq ,
954
940
.enable_commit = dpu_kms_enable_commit ,
955
941
.disable_commit = dpu_kms_disable_commit ,
956
- .vsync_time = dpu_kms_vsync_time ,
957
942
.prepare_commit = dpu_kms_prepare_commit ,
958
943
.flush_commit = dpu_kms_flush_commit ,
959
944
.wait_flush = dpu_kms_wait_flush ,
Original file line number Diff line number Diff line change @@ -186,8 +186,7 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
186
186
struct msm_kms * kms = priv -> kms ;
187
187
struct drm_crtc * async_crtc = NULL ;
188
188
unsigned crtc_mask = get_crtc_mask (state );
189
- bool async = kms -> funcs -> vsync_time &&
190
- can_do_async (state , & async_crtc );
189
+ bool async = can_do_async (state , & async_crtc );
191
190
192
191
trace_msm_atomic_commit_tail_start (async , crtc_mask );
193
192
@@ -231,7 +230,9 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
231
230
232
231
kms -> pending_crtc_mask |= crtc_mask ;
233
232
234
- vsync_time = kms -> funcs -> vsync_time (kms , async_crtc );
233
+ if (drm_crtc_next_vblank_start (async_crtc , & vsync_time ))
234
+ goto fallback ;
235
+
235
236
wakeup_time = ktime_sub (vsync_time , ms_to_ktime (1 ));
236
237
237
238
msm_hrtimer_queue_work (& timer -> work , wakeup_time ,
@@ -253,6 +254,7 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
253
254
return ;
254
255
}
255
256
257
+ fallback :
256
258
/*
257
259
* If there is any async flush pending on updated crtcs, fold
258
260
* them into the current flush.
Original file line number Diff line number Diff line change @@ -59,14 +59,6 @@ struct msm_kms_funcs {
59
59
void (* enable_commit )(struct msm_kms * kms );
60
60
void (* disable_commit )(struct msm_kms * kms );
61
61
62
- /**
63
- * If the kms backend supports async commit, it should implement
64
- * this method to return the time of the next vsync. This is
65
- * used to determine a time slightly before vsync, for the async
66
- * commit timer to run and complete an async commit.
67
- */
68
- ktime_t (* vsync_time )(struct msm_kms * kms , struct drm_crtc * crtc );
69
-
70
62
/**
71
63
* Prepare for atomic commit. This is called after any previous
72
64
* (async or otherwise) commit has completed.
You can’t perform that action at this time.
0 commit comments