@@ -351,8 +351,6 @@ static unsigned long dispc_plane_pclk_rate(struct dispc_device *dispc,
351
351
static unsigned long dispc_plane_lclk_rate (struct dispc_device * dispc ,
352
352
enum omap_plane_id plane );
353
353
354
- static void dispc_clear_irqstatus (struct dispc_device * dispc , u32 mask );
355
-
356
354
static inline void dispc_write_reg (struct dispc_device * dispc , u16 idx , u32 val )
357
355
{
358
356
__raw_writel (val , dispc -> base + idx );
@@ -379,12 +377,12 @@ static void mgr_fld_write(struct dispc_device *dispc, enum omap_channel channel,
379
377
REG_FLD_MOD (dispc , rfld -> reg , val , rfld -> high , rfld -> low );
380
378
}
381
379
382
- static int dispc_get_num_ovls (struct dispc_device * dispc )
380
+ int dispc_get_num_ovls (struct dispc_device * dispc )
383
381
{
384
382
return dispc -> feat -> num_ovls ;
385
383
}
386
384
387
- static int dispc_get_num_mgrs (struct dispc_device * dispc )
385
+ int dispc_get_num_mgrs (struct dispc_device * dispc )
388
386
{
389
387
return dispc -> feat -> num_mgrs ;
390
388
}
@@ -670,13 +668,13 @@ void dispc_runtime_put(struct dispc_device *dispc)
670
668
WARN_ON (r < 0 && r != - ENOSYS );
671
669
}
672
670
673
- static u32 dispc_mgr_get_vsync_irq (struct dispc_device * dispc ,
671
+ u32 dispc_mgr_get_vsync_irq (struct dispc_device * dispc ,
674
672
enum omap_channel channel )
675
673
{
676
674
return mgr_desc [channel ].vsync_irq ;
677
675
}
678
676
679
- static u32 dispc_mgr_get_framedone_irq (struct dispc_device * dispc ,
677
+ u32 dispc_mgr_get_framedone_irq (struct dispc_device * dispc ,
680
678
enum omap_channel channel )
681
679
{
682
680
if (channel == OMAP_DSS_CHANNEL_DIGIT && dispc -> feat -> no_framedone_tv )
@@ -685,18 +683,18 @@ static u32 dispc_mgr_get_framedone_irq(struct dispc_device *dispc,
685
683
return mgr_desc [channel ].framedone_irq ;
686
684
}
687
685
688
- static u32 dispc_mgr_get_sync_lost_irq (struct dispc_device * dispc ,
686
+ u32 dispc_mgr_get_sync_lost_irq (struct dispc_device * dispc ,
689
687
enum omap_channel channel )
690
688
{
691
689
return mgr_desc [channel ].sync_lost_irq ;
692
690
}
693
691
694
- static u32 dispc_wb_get_framedone_irq (struct dispc_device * dispc )
692
+ u32 dispc_wb_get_framedone_irq (struct dispc_device * dispc )
695
693
{
696
694
return DISPC_IRQ_FRAMEDONEWB ;
697
695
}
698
696
699
- static void dispc_mgr_enable (struct dispc_device * dispc ,
697
+ void dispc_mgr_enable (struct dispc_device * dispc ,
700
698
enum omap_channel channel , bool enable )
701
699
{
702
700
mgr_fld_write (dispc , channel , DISPC_MGR_FLD_ENABLE , enable );
@@ -710,13 +708,13 @@ static bool dispc_mgr_is_enabled(struct dispc_device *dispc,
710
708
return !!mgr_fld_read (dispc , channel , DISPC_MGR_FLD_ENABLE );
711
709
}
712
710
713
- static bool dispc_mgr_go_busy (struct dispc_device * dispc ,
711
+ bool dispc_mgr_go_busy (struct dispc_device * dispc ,
714
712
enum omap_channel channel )
715
713
{
716
714
return mgr_fld_read (dispc , channel , DISPC_MGR_FLD_GO ) == 1 ;
717
715
}
718
716
719
- static void dispc_mgr_go (struct dispc_device * dispc , enum omap_channel channel )
717
+ void dispc_mgr_go (struct dispc_device * dispc , enum omap_channel channel )
720
718
{
721
719
WARN_ON (!dispc_mgr_is_enabled (dispc , channel ));
722
720
WARN_ON (dispc_mgr_go_busy (dispc , channel ));
@@ -726,12 +724,12 @@ static void dispc_mgr_go(struct dispc_device *dispc, enum omap_channel channel)
726
724
mgr_fld_write (dispc , channel , DISPC_MGR_FLD_GO , 1 );
727
725
}
728
726
729
- static bool dispc_wb_go_busy (struct dispc_device * dispc )
727
+ bool dispc_wb_go_busy (struct dispc_device * dispc )
730
728
{
731
729
return REG_GET (dispc , DISPC_CONTROL2 , 6 , 6 ) == 1 ;
732
730
}
733
731
734
- static void dispc_wb_go (struct dispc_device * dispc )
732
+ void dispc_wb_go (struct dispc_device * dispc )
735
733
{
736
734
enum omap_plane_id plane = OMAP_DSS_WB ;
737
735
bool enable , go ;
@@ -1297,7 +1295,7 @@ static bool dispc_ovl_color_mode_supported(struct dispc_device *dispc,
1297
1295
return false;
1298
1296
}
1299
1297
1300
- static const u32 * dispc_ovl_get_color_modes (struct dispc_device * dispc ,
1298
+ const u32 * dispc_ovl_get_color_modes (struct dispc_device * dispc ,
1301
1299
enum omap_plane_id plane )
1302
1300
{
1303
1301
return dispc -> feat -> supported_color_modes [plane ];
@@ -2781,7 +2779,7 @@ static int dispc_ovl_setup_common(struct dispc_device *dispc,
2781
2779
return 0 ;
2782
2780
}
2783
2781
2784
- static int dispc_ovl_setup (struct dispc_device * dispc ,
2782
+ int dispc_ovl_setup (struct dispc_device * dispc ,
2785
2783
enum omap_plane_id plane ,
2786
2784
const struct omap_overlay_info * oi ,
2787
2785
const struct videomode * vm , bool mem_to_mem ,
@@ -2809,7 +2807,7 @@ static int dispc_ovl_setup(struct dispc_device *dispc,
2809
2807
return r ;
2810
2808
}
2811
2809
2812
- static int dispc_wb_setup (struct dispc_device * dispc ,
2810
+ int dispc_wb_setup (struct dispc_device * dispc ,
2813
2811
const struct omap_dss_writeback_info * wi ,
2814
2812
bool mem_to_mem , const struct videomode * vm ,
2815
2813
enum dss_writeback_channel channel_in )
@@ -2893,12 +2891,12 @@ static int dispc_wb_setup(struct dispc_device *dispc,
2893
2891
return 0 ;
2894
2892
}
2895
2893
2896
- static bool dispc_has_writeback (struct dispc_device * dispc )
2894
+ bool dispc_has_writeback (struct dispc_device * dispc )
2897
2895
{
2898
2896
return dispc -> feat -> has_writeback ;
2899
2897
}
2900
2898
2901
- static int dispc_ovl_enable (struct dispc_device * dispc ,
2899
+ int dispc_ovl_enable (struct dispc_device * dispc ,
2902
2900
enum omap_plane_id plane , bool enable )
2903
2901
{
2904
2902
DSSDBG ("dispc_enable_plane %d, %d\n" , plane , enable );
@@ -2989,7 +2987,7 @@ static void dispc_mgr_enable_alpha_fixed_zorder(struct dispc_device *dispc,
2989
2987
REG_FLD_MOD (dispc , DISPC_CONFIG , enable , 19 , 19 );
2990
2988
}
2991
2989
2992
- static void dispc_mgr_setup (struct dispc_device * dispc ,
2990
+ void dispc_mgr_setup (struct dispc_device * dispc ,
2993
2991
enum omap_channel channel ,
2994
2992
const struct omap_overlay_manager_info * info )
2995
2993
{
@@ -3068,7 +3066,7 @@ static void dispc_mgr_enable_stallmode(struct dispc_device *dispc,
3068
3066
mgr_fld_write (dispc , channel , DISPC_MGR_FLD_STALLMODE , enable );
3069
3067
}
3070
3068
3071
- static void dispc_mgr_set_lcd_config (struct dispc_device * dispc ,
3069
+ void dispc_mgr_set_lcd_config (struct dispc_device * dispc ,
3072
3070
enum omap_channel channel ,
3073
3071
const struct dss_lcd_mgr_config * config )
3074
3072
{
@@ -3117,7 +3115,7 @@ static bool _dispc_mgr_pclk_ok(struct dispc_device *dispc,
3117
3115
return pclk <= dispc -> feat -> max_tv_pclk ;
3118
3116
}
3119
3117
3120
- static int dispc_mgr_check_timings (struct dispc_device * dispc ,
3118
+ int dispc_mgr_check_timings (struct dispc_device * dispc ,
3121
3119
enum omap_channel channel ,
3122
3120
const struct videomode * vm )
3123
3121
{
@@ -3210,7 +3208,7 @@ static int vm_flag_to_int(enum display_flags flags, enum display_flags high,
3210
3208
}
3211
3209
3212
3210
/* change name to mode? */
3213
- static void dispc_mgr_set_timings (struct dispc_device * dispc ,
3211
+ void dispc_mgr_set_timings (struct dispc_device * dispc ,
3214
3212
enum omap_channel channel ,
3215
3213
const struct videomode * vm )
3216
3214
{
@@ -3754,17 +3752,17 @@ int dispc_mgr_get_clock_div(struct dispc_device *dispc,
3754
3752
return 0 ;
3755
3753
}
3756
3754
3757
- static u32 dispc_read_irqstatus (struct dispc_device * dispc )
3755
+ u32 dispc_read_irqstatus (struct dispc_device * dispc )
3758
3756
{
3759
3757
return dispc_read_reg (dispc , DISPC_IRQSTATUS );
3760
3758
}
3761
3759
3762
- static void dispc_clear_irqstatus (struct dispc_device * dispc , u32 mask )
3760
+ void dispc_clear_irqstatus (struct dispc_device * dispc , u32 mask )
3763
3761
{
3764
3762
dispc_write_reg (dispc , DISPC_IRQSTATUS , mask );
3765
3763
}
3766
3764
3767
- static void dispc_write_irqenable (struct dispc_device * dispc , u32 mask )
3765
+ void dispc_write_irqenable (struct dispc_device * dispc , u32 mask )
3768
3766
{
3769
3767
u32 old_mask = dispc_read_reg (dispc , DISPC_IRQENABLE );
3770
3768
@@ -3788,7 +3786,7 @@ void dispc_disable_sidle(struct dispc_device *dispc)
3788
3786
REG_FLD_MOD (dispc , DISPC_SYSCONFIG , 1 , 4 , 3 ); /* SIDLEMODE: no idle */
3789
3787
}
3790
3788
3791
- static u32 dispc_mgr_gamma_size (struct dispc_device * dispc ,
3789
+ u32 dispc_mgr_gamma_size (struct dispc_device * dispc ,
3792
3790
enum omap_channel channel )
3793
3791
{
3794
3792
const struct dispc_gamma_desc * gdesc = & mgr_desc [channel ].gamma ;
@@ -3843,7 +3841,7 @@ static const struct drm_color_lut dispc_mgr_gamma_default_lut[] = {
3843
3841
{ .red = U16_MAX , .green = U16_MAX , .blue = U16_MAX , },
3844
3842
};
3845
3843
3846
- static void dispc_mgr_set_gamma (struct dispc_device * dispc ,
3844
+ void dispc_mgr_set_gamma (struct dispc_device * dispc ,
3847
3845
enum omap_channel channel ,
3848
3846
const struct drm_color_lut * lut ,
3849
3847
unsigned int length )
@@ -4499,7 +4497,7 @@ static irqreturn_t dispc_irq_handler(int irq, void *arg)
4499
4497
return dispc -> user_handler (irq , dispc -> user_data );
4500
4498
}
4501
4499
4502
- static int dispc_request_irq (struct dispc_device * dispc , irq_handler_t handler ,
4500
+ int dispc_request_irq (struct dispc_device * dispc , irq_handler_t handler ,
4503
4501
void * dev_id )
4504
4502
{
4505
4503
int r ;
@@ -4523,15 +4521,15 @@ static int dispc_request_irq(struct dispc_device *dispc, irq_handler_t handler,
4523
4521
return r ;
4524
4522
}
4525
4523
4526
- static void dispc_free_irq (struct dispc_device * dispc , void * dev_id )
4524
+ void dispc_free_irq (struct dispc_device * dispc , void * dev_id )
4527
4525
{
4528
4526
devm_free_irq (& dispc -> pdev -> dev , dispc -> irq , dispc );
4529
4527
4530
4528
dispc -> user_handler = NULL ;
4531
4529
dispc -> user_data = NULL ;
4532
4530
}
4533
4531
4534
- static u32 dispc_get_memory_bandwidth_limit (struct dispc_device * dispc )
4532
+ u32 dispc_get_memory_bandwidth_limit (struct dispc_device * dispc )
4535
4533
{
4536
4534
u32 limit = 0 ;
4537
4535
@@ -4701,47 +4699,6 @@ static void dispc_errata_i734_wa(struct dispc_device *dispc)
4701
4699
REG_FLD_MOD (dispc , DISPC_CONFIG , gatestate , 8 , 4 );
4702
4700
}
4703
4701
4704
- static const struct dispc_ops dispc_ops = {
4705
- .read_irqstatus = dispc_read_irqstatus ,
4706
- .clear_irqstatus = dispc_clear_irqstatus ,
4707
- .write_irqenable = dispc_write_irqenable ,
4708
-
4709
- .request_irq = dispc_request_irq ,
4710
- .free_irq = dispc_free_irq ,
4711
-
4712
- .runtime_get = dispc_runtime_get ,
4713
- .runtime_put = dispc_runtime_put ,
4714
-
4715
- .get_num_ovls = dispc_get_num_ovls ,
4716
- .get_num_mgrs = dispc_get_num_mgrs ,
4717
-
4718
- .get_memory_bandwidth_limit = dispc_get_memory_bandwidth_limit ,
4719
-
4720
- .mgr_enable = dispc_mgr_enable ,
4721
- .mgr_is_enabled = dispc_mgr_is_enabled ,
4722
- .mgr_get_vsync_irq = dispc_mgr_get_vsync_irq ,
4723
- .mgr_get_framedone_irq = dispc_mgr_get_framedone_irq ,
4724
- .mgr_get_sync_lost_irq = dispc_mgr_get_sync_lost_irq ,
4725
- .mgr_go_busy = dispc_mgr_go_busy ,
4726
- .mgr_go = dispc_mgr_go ,
4727
- .mgr_set_lcd_config = dispc_mgr_set_lcd_config ,
4728
- .mgr_check_timings = dispc_mgr_check_timings ,
4729
- .mgr_set_timings = dispc_mgr_set_timings ,
4730
- .mgr_setup = dispc_mgr_setup ,
4731
- .mgr_gamma_size = dispc_mgr_gamma_size ,
4732
- .mgr_set_gamma = dispc_mgr_set_gamma ,
4733
-
4734
- .ovl_enable = dispc_ovl_enable ,
4735
- .ovl_setup = dispc_ovl_setup ,
4736
- .ovl_get_color_modes = dispc_ovl_get_color_modes ,
4737
-
4738
- .wb_get_framedone_irq = dispc_wb_get_framedone_irq ,
4739
- .wb_setup = dispc_wb_setup ,
4740
- .has_writeback = dispc_has_writeback ,
4741
- .wb_go_busy = dispc_wb_go_busy ,
4742
- .wb_go = dispc_wb_go ,
4743
- };
4744
-
4745
4702
/* DISPC HW IP initialisation */
4746
4703
static const struct of_device_id dispc_of_match [] = {
4747
4704
{ .compatible = "ti,omap2-dispc" , .data = & omap24xx_dispc_feats },
@@ -4843,7 +4800,6 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
4843
4800
dispc_runtime_put (dispc );
4844
4801
4845
4802
dss -> dispc = dispc ;
4846
- dss -> dispc_ops = & dispc_ops ;
4847
4803
4848
4804
dispc -> debugfs = dss_debugfs_create_file (dss , "dispc" , dispc_dump_regs ,
4849
4805
dispc );
@@ -4865,7 +4821,6 @@ static void dispc_unbind(struct device *dev, struct device *master, void *data)
4865
4821
dss_debugfs_remove_file (dispc -> debugfs );
4866
4822
4867
4823
dss -> dispc = NULL ;
4868
- dss -> dispc_ops = NULL ;
4869
4824
4870
4825
pm_runtime_disable (dev );
4871
4826
0 commit comments