@@ -152,15 +152,13 @@ enum dpu_enc_rc_states {
152
152
* @crtc_frame_event_cb_data: callback handler private data
153
153
* @frame_done_timeout_ms: frame done timeout in ms
154
154
* @frame_done_timer: watchdog timer for frame done event
155
- * @vsync_event_timer: vsync timer
156
155
* @disp_info: local copy of msm_display_info struct
157
156
* @idle_pc_supported: indicate if idle power collaps is supported
158
157
* @rc_lock: resource control mutex lock to protect
159
158
* virt encoder over various state changes
160
159
* @rc_state: resource controller state
161
160
* @delayed_off_work: delayed worker to schedule disabling of
162
161
* clks and resources after IDLE_TIMEOUT time.
163
- * @vsync_event_work: worker to handle vsync event for autorefresh
164
162
* @topology: topology of the display
165
163
* @idle_timeout: idle timeout duration in milliseconds
166
164
* @wide_bus_en: wide bus is enabled on this interface
@@ -194,15 +192,13 @@ struct dpu_encoder_virt {
194
192
195
193
atomic_t frame_done_timeout_ms ;
196
194
struct timer_list frame_done_timer ;
197
- struct timer_list vsync_event_timer ;
198
195
199
196
struct msm_display_info disp_info ;
200
197
201
198
bool idle_pc_supported ;
202
199
struct mutex rc_lock ;
203
200
enum dpu_enc_rc_states rc_state ;
204
201
struct delayed_work delayed_off_work ;
205
- struct kthread_work vsync_event_work ;
206
202
struct msm_display_topology topology ;
207
203
208
204
u32 idle_timeout ;
@@ -1770,49 +1766,6 @@ int dpu_encoder_vsync_time(struct drm_encoder *drm_enc, ktime_t *wakeup_time)
1770
1766
return 0 ;
1771
1767
}
1772
1768
1773
- static void dpu_encoder_vsync_event_handler (struct timer_list * t )
1774
- {
1775
- struct dpu_encoder_virt * dpu_enc = from_timer (dpu_enc , t ,
1776
- vsync_event_timer );
1777
- struct drm_encoder * drm_enc = & dpu_enc -> base ;
1778
- struct msm_drm_private * priv ;
1779
- struct msm_drm_thread * event_thread ;
1780
-
1781
- if (!drm_enc -> dev || !drm_enc -> crtc ) {
1782
- DPU_ERROR ("invalid parameters\n" );
1783
- return ;
1784
- }
1785
-
1786
- priv = drm_enc -> dev -> dev_private ;
1787
-
1788
- if (drm_enc -> crtc -> index >= ARRAY_SIZE (priv -> event_thread )) {
1789
- DPU_ERROR ("invalid crtc index\n" );
1790
- return ;
1791
- }
1792
- event_thread = & priv -> event_thread [drm_enc -> crtc -> index ];
1793
- if (!event_thread ) {
1794
- DPU_ERROR ("event_thread not found for crtc:%d\n" ,
1795
- drm_enc -> crtc -> index );
1796
- return ;
1797
- }
1798
-
1799
- del_timer (& dpu_enc -> vsync_event_timer );
1800
- }
1801
-
1802
- static void dpu_encoder_vsync_event_work_handler (struct kthread_work * work )
1803
- {
1804
- struct dpu_encoder_virt * dpu_enc = container_of (work ,
1805
- struct dpu_encoder_virt , vsync_event_work );
1806
- ktime_t wakeup_time ;
1807
-
1808
- if (dpu_encoder_vsync_time (& dpu_enc -> base , & wakeup_time ))
1809
- return ;
1810
-
1811
- trace_dpu_enc_vsync_event_work (DRMID (& dpu_enc -> base ), wakeup_time );
1812
- mod_timer (& dpu_enc -> vsync_event_timer ,
1813
- nsecs_to_jiffies (ktime_to_ns (wakeup_time )));
1814
- }
1815
-
1816
1769
static u32
1817
1770
dpu_encoder_dsc_initial_line_calc (struct drm_dsc_config * dsc ,
1818
1771
u32 enc_ip_width )
@@ -1972,7 +1925,6 @@ void dpu_encoder_kickoff(struct drm_encoder *drm_enc)
1972
1925
{
1973
1926
struct dpu_encoder_virt * dpu_enc ;
1974
1927
struct dpu_encoder_phys * phys ;
1975
- ktime_t wakeup_time ;
1976
1928
unsigned long timeout_ms ;
1977
1929
unsigned int i ;
1978
1930
@@ -1998,14 +1950,6 @@ void dpu_encoder_kickoff(struct drm_encoder *drm_enc)
1998
1950
phys -> ops .handle_post_kickoff (phys );
1999
1951
}
2000
1952
2001
- if (dpu_enc -> disp_info .intf_type == INTF_DSI &&
2002
- !dpu_encoder_vsync_time (drm_enc , & wakeup_time )) {
2003
- trace_dpu_enc_early_kickoff (DRMID (drm_enc ),
2004
- ktime_to_ms (wakeup_time ));
2005
- mod_timer (& dpu_enc -> vsync_event_timer ,
2006
- nsecs_to_jiffies (ktime_to_ns (wakeup_time )));
2007
- }
2008
-
2009
1953
DPU_ATRACE_END ("encoder_kickoff" );
2010
1954
}
2011
1955
@@ -2439,21 +2383,14 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
2439
2383
timer_setup (& dpu_enc -> frame_done_timer ,
2440
2384
dpu_encoder_frame_done_timeout , 0 );
2441
2385
2442
- if (disp_info -> intf_type == INTF_DSI )
2443
- timer_setup (& dpu_enc -> vsync_event_timer ,
2444
- dpu_encoder_vsync_event_handler ,
2445
- 0 );
2446
- else if (disp_info -> intf_type == INTF_DP )
2386
+ if (disp_info -> intf_type == INTF_DP )
2447
2387
dpu_enc -> wide_bus_en = msm_dp_wide_bus_available (
2448
2388
priv -> dp [disp_info -> h_tile_instance [0 ]]);
2449
2389
2450
2390
INIT_DELAYED_WORK (& dpu_enc -> delayed_off_work ,
2451
2391
dpu_encoder_off_work );
2452
2392
dpu_enc -> idle_timeout = IDLE_TIMEOUT ;
2453
2393
2454
- kthread_init_work (& dpu_enc -> vsync_event_work ,
2455
- dpu_encoder_vsync_event_work_handler );
2456
-
2457
2394
memcpy (& dpu_enc -> disp_info , disp_info , sizeof (* disp_info ));
2458
2395
2459
2396
DPU_DEBUG_ENC (dpu_enc , "created\n" );
0 commit comments