Lines Matching refs:channel

258 static u32 mgr_fld_read(enum omap_channel channel, enum mgr_reg_fields regfld)  in mgr_fld_read()  argument
260 const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld]; in mgr_fld_read()
264 static void mgr_fld_write(enum omap_channel channel, in mgr_fld_write() argument
266 const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld]; in mgr_fld_write()
536 u32 dispc_mgr_get_vsync_irq(enum omap_channel channel) in dispc_mgr_get_vsync_irq() argument
538 return mgr_desc[channel].vsync_irq; in dispc_mgr_get_vsync_irq()
542 u32 dispc_mgr_get_framedone_irq(enum omap_channel channel) in dispc_mgr_get_framedone_irq() argument
544 if (channel == OMAP_DSS_CHANNEL_DIGIT && dispc.feat->no_framedone_tv) in dispc_mgr_get_framedone_irq()
547 return mgr_desc[channel].framedone_irq; in dispc_mgr_get_framedone_irq()
551 u32 dispc_mgr_get_sync_lost_irq(enum omap_channel channel) in dispc_mgr_get_sync_lost_irq() argument
553 return mgr_desc[channel].sync_lost_irq; in dispc_mgr_get_sync_lost_irq()
562 bool dispc_mgr_go_busy(enum omap_channel channel) in dispc_mgr_go_busy() argument
564 return mgr_fld_read(channel, DISPC_MGR_FLD_GO) == 1; in dispc_mgr_go_busy()
568 void dispc_mgr_go(enum omap_channel channel) in dispc_mgr_go() argument
570 WARN_ON(dispc_mgr_is_enabled(channel) == false); in dispc_mgr_go()
571 WARN_ON(dispc_mgr_go_busy(channel)); in dispc_mgr_go()
573 DSSDBG("GO %s\n", mgr_desc[channel].name); in dispc_mgr_go()
575 mgr_fld_write(channel, DISPC_MGR_FLD_GO, 1); in dispc_mgr_go()
925 void dispc_ovl_set_channel_out(enum omap_plane plane, enum omap_channel channel) in dispc_ovl_set_channel_out() argument
947 switch (channel) { in dispc_ovl_set_channel_out()
977 val = FLD_MOD(val, channel, shift, shift); in dispc_ovl_set_channel_out()
987 enum omap_channel channel; in dispc_ovl_get_channel_out() local
1007 channel = FLD_GET(val, shift, shift); in dispc_ovl_get_channel_out()
1009 channel = OMAP_DSS_CHANNEL_LCD2; in dispc_ovl_get_channel_out()
1011 channel = OMAP_DSS_CHANNEL_LCD3; in dispc_ovl_get_channel_out()
1014 channel = FLD_GET(val, shift, shift); in dispc_ovl_get_channel_out()
1016 channel = OMAP_DSS_CHANNEL_LCD2; in dispc_ovl_get_channel_out()
1018 channel = FLD_GET(val, shift, shift); in dispc_ovl_get_channel_out()
1021 return channel; in dispc_ovl_get_channel_out()
1024 void dispc_wb_set_channel_in(enum dss_writeback_channel channel) in dispc_wb_set_channel_in() argument
1028 REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), channel, 18, 16); in dispc_wb_set_channel_in()
1072 static void dispc_mgr_enable_cpr(enum omap_channel channel, bool enable) in dispc_mgr_enable_cpr() argument
1074 if (channel == OMAP_DSS_CHANNEL_DIGIT) in dispc_mgr_enable_cpr()
1077 mgr_fld_write(channel, DISPC_MGR_FLD_CPR, enable); in dispc_mgr_enable_cpr()
1080 static void dispc_mgr_set_cpr_coef(enum omap_channel channel, in dispc_mgr_set_cpr_coef() argument
1085 if (!dss_mgr_is_lcd(channel)) in dispc_mgr_set_cpr_coef()
1095 dispc_write_reg(DISPC_CPR_COEF_R(channel), coef_r); in dispc_mgr_set_cpr_coef()
1096 dispc_write_reg(DISPC_CPR_COEF_G(channel), coef_g); in dispc_mgr_set_cpr_coef()
1097 dispc_write_reg(DISPC_CPR_COEF_B(channel), coef_b); in dispc_mgr_set_cpr_coef()
1124 static void dispc_mgr_set_size(enum omap_channel channel, u16 width, in dispc_mgr_set_size() argument
1132 dispc_write_reg(DISPC_SIZE_MGR(channel), val); in dispc_mgr_set_size()
2468 int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, in dispc_ovl_check() argument
2481 unsigned long pclk = dispc_mgr_pclk_rate(channel); in dispc_ovl_check()
2482 unsigned long lclk = dispc_mgr_lclk_rate(channel); in dispc_ovl_check()
2671 enum omap_channel channel; in dispc_ovl_setup() local
2673 channel = dispc_ovl_get_channel_out(plane); in dispc_ovl_setup()
2679 oi->color_mode, oi->rotation, oi->mirror, channel, replication); in dispc_ovl_setup()
2758 void dispc_mgr_enable(enum omap_channel channel, bool enable) in dispc_mgr_enable() argument
2760 mgr_fld_write(channel, DISPC_MGR_FLD_ENABLE, enable); in dispc_mgr_enable()
2762 mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE); in dispc_mgr_enable()
2766 bool dispc_mgr_is_enabled(enum omap_channel channel) in dispc_mgr_is_enabled() argument
2768 return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE); in dispc_mgr_is_enabled()
2806 static void dispc_mgr_enable_fifohandcheck(enum omap_channel channel, bool enable) in dispc_mgr_enable_fifohandcheck() argument
2808 mgr_fld_write(channel, DISPC_MGR_FLD_FIFOHANDCHECK, enable); in dispc_mgr_enable_fifohandcheck()
2812 static void dispc_mgr_set_lcd_type_tft(enum omap_channel channel) in dispc_mgr_set_lcd_type_tft() argument
2814 mgr_fld_write(channel, DISPC_MGR_FLD_STNTFT, 1); in dispc_mgr_set_lcd_type_tft()
2823 static void dispc_mgr_set_default_color(enum omap_channel channel, u32 color) in dispc_mgr_set_default_color() argument
2825 dispc_write_reg(DISPC_DEFAULT_COLOR(channel), color); in dispc_mgr_set_default_color()
2854 void dispc_mgr_setup(enum omap_channel channel, in dispc_mgr_setup() argument
2857 dispc_mgr_set_default_color(channel, info->default_color); in dispc_mgr_setup()
2858 dispc_mgr_set_trans_key(channel, info->trans_key_type, info->trans_key); in dispc_mgr_setup()
2859 dispc_mgr_enable_trans_key(channel, info->trans_enabled); in dispc_mgr_setup()
2860 dispc_mgr_enable_alpha_fixed_zorder(channel, in dispc_mgr_setup()
2863 dispc_mgr_enable_cpr(channel, info->cpr_enable); in dispc_mgr_setup()
2864 dispc_mgr_set_cpr_coef(channel, &info->cpr_coefs); in dispc_mgr_setup()
2869 static void dispc_mgr_set_tft_data_lines(enum omap_channel channel, u8 data_lines) in dispc_mgr_set_tft_data_lines() argument
2891 mgr_fld_write(channel, DISPC_MGR_FLD_TFTDATALINES, code); in dispc_mgr_set_tft_data_lines()
2923 static void dispc_mgr_enable_stallmode(enum omap_channel channel, bool enable) in dispc_mgr_enable_stallmode() argument
2925 mgr_fld_write(channel, DISPC_MGR_FLD_STALLMODE, enable); in dispc_mgr_enable_stallmode()
2928 void dispc_mgr_set_lcd_config(enum omap_channel channel, in dispc_mgr_set_lcd_config() argument
2933 dispc_mgr_enable_stallmode(channel, config->stallmode); in dispc_mgr_set_lcd_config()
2934 dispc_mgr_enable_fifohandcheck(channel, config->fifohandcheck); in dispc_mgr_set_lcd_config()
2936 dispc_mgr_set_clock_div(channel, &config->clock_info); in dispc_mgr_set_lcd_config()
2938 dispc_mgr_set_tft_data_lines(channel, config->video_port_width); in dispc_mgr_set_lcd_config()
2942 dispc_mgr_set_lcd_type_tft(channel); in dispc_mgr_set_lcd_config()
2965 static bool _dispc_mgr_pclk_ok(enum omap_channel channel, in _dispc_mgr_pclk_ok() argument
2968 if (dss_mgr_is_lcd(channel)) in _dispc_mgr_pclk_ok()
2974 bool dispc_mgr_timings_ok(enum omap_channel channel, in dispc_mgr_timings_ok() argument
2980 if (!_dispc_mgr_pclk_ok(channel, timings->pixelclock)) in dispc_mgr_timings_ok()
2983 if (dss_mgr_is_lcd(channel)) { in dispc_mgr_timings_ok()
2997 static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw, in _dispc_mgr_set_lcd_timings() argument
3016 dispc_write_reg(DISPC_TIMING_H(channel), timing_h); in _dispc_mgr_set_lcd_timings()
3017 dispc_write_reg(DISPC_TIMING_V(channel), timing_v); in _dispc_mgr_set_lcd_timings()
3084 dispc_write_reg(DISPC_POL_FREQ(channel), l); in _dispc_mgr_set_lcd_timings()
3098 mask <<= 16 + shifts[channel]; in _dispc_mgr_set_lcd_timings()
3099 val <<= 16 + shifts[channel]; in _dispc_mgr_set_lcd_timings()
3107 void dispc_mgr_set_timings(enum omap_channel channel, in dispc_mgr_set_timings() argument
3114 DSSDBG("channel %d xres %u yres %u\n", channel, t.x_res, t.y_res); in dispc_mgr_set_timings()
3116 if (!dispc_mgr_timings_ok(channel, &t)) { in dispc_mgr_set_timings()
3121 if (dss_mgr_is_lcd(channel)) { in dispc_mgr_set_timings()
3122 _dispc_mgr_set_lcd_timings(channel, t.hsw, t.hfp, t.hbp, t.vsw, in dispc_mgr_set_timings()
3145 dispc_mgr_set_size(channel, t.x_res, t.y_res); in dispc_mgr_set_timings()
3149 static void dispc_mgr_set_lcd_divisor(enum omap_channel channel, u16 lck_div, in dispc_mgr_set_lcd_divisor() argument
3155 dispc_write_reg(DISPC_DIVISORo(channel), in dispc_mgr_set_lcd_divisor()
3159 channel == OMAP_DSS_CHANNEL_LCD) in dispc_mgr_set_lcd_divisor()
3163 static void dispc_mgr_get_lcd_divisor(enum omap_channel channel, int *lck_div, in dispc_mgr_get_lcd_divisor() argument
3167 l = dispc_read_reg(DISPC_DIVISORo(channel)); in dispc_mgr_get_lcd_divisor()
3203 unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) in dispc_mgr_lclk_rate() argument
3210 if (dss_mgr_is_lcd(channel)) { in dispc_mgr_lclk_rate()
3211 l = dispc_read_reg(DISPC_DIVISORo(channel)); in dispc_mgr_lclk_rate()
3215 switch (dss_get_lcd_clk_source(channel)) { in dispc_mgr_lclk_rate()
3244 unsigned long dispc_mgr_pclk_rate(enum omap_channel channel) in dispc_mgr_pclk_rate() argument
3248 if (dss_mgr_is_lcd(channel)) { in dispc_mgr_pclk_rate()
3252 l = dispc_read_reg(DISPC_DIVISORo(channel)); in dispc_mgr_pclk_rate()
3256 r = dispc_mgr_lclk_rate(channel); in dispc_mgr_pclk_rate()
3276 enum omap_channel channel; in dispc_plane_pclk_rate() local
3281 channel = dispc_ovl_get_channel_out(plane); in dispc_plane_pclk_rate()
3283 return dispc_mgr_pclk_rate(channel); in dispc_plane_pclk_rate()
3288 enum omap_channel channel; in dispc_plane_lclk_rate() local
3293 channel = dispc_ovl_get_channel_out(plane); in dispc_plane_lclk_rate()
3295 return dispc_mgr_lclk_rate(channel); in dispc_plane_lclk_rate()
3298 static void dispc_dump_clocks_channel(struct seq_file *s, enum omap_channel channel) in dispc_dump_clocks_channel() argument
3303 seq_printf(s, "- %s -\n", mgr_desc[channel].name); in dispc_dump_clocks_channel()
3305 lcd_clk_src = dss_get_lcd_clk_source(channel); in dispc_dump_clocks_channel()
3307 seq_printf(s, "%s clk source = %s (%s)\n", mgr_desc[channel].name, in dispc_dump_clocks_channel()
3311 dispc_mgr_get_lcd_divisor(channel, &lcd, &pcd); in dispc_dump_clocks_channel()
3314 dispc_mgr_lclk_rate(channel), lcd); in dispc_dump_clocks_channel()
3316 dispc_mgr_pclk_rate(channel), pcd); in dispc_dump_clocks_channel()
3595 void dispc_mgr_set_clock_div(enum omap_channel channel, in dispc_mgr_set_clock_div() argument
3601 dispc_mgr_set_lcd_divisor(channel, cinfo->lck_div, cinfo->pck_div); in dispc_mgr_set_clock_div()
3604 int dispc_mgr_get_clock_div(enum omap_channel channel, in dispc_mgr_get_clock_div() argument
3611 cinfo->lck_div = REG_GET(DISPC_DIVISORo(channel), 23, 16); in dispc_mgr_get_clock_div()
3612 cinfo->pck_div = REG_GET(DISPC_DIVISORo(channel), 7, 0); in dispc_mgr_get_clock_div()