Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

omapfb: Remove unused writeback code

Remove unused writeback code. This code will never be used, as omapfb is
being deprecated.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200313122410.7528-1-tomi.valkeinen@ti.com

authored by

Tomi Valkeinen and committed by
Bartlomiej Zolnierkiewicz
4f55bb03 6ce2fc42

-134
-114
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
··· 557 557 } 558 558 EXPORT_SYMBOL(dispc_mgr_get_sync_lost_irq); 559 559 560 - u32 dispc_wb_get_framedone_irq(void) 561 - { 562 - return DISPC_IRQ_FRAMEDONEWB; 563 - } 564 - 565 560 bool dispc_mgr_go_busy(enum omap_channel channel) 566 561 { 567 562 return mgr_fld_read(channel, DISPC_MGR_FLD_GO) == 1; ··· 573 578 mgr_fld_write(channel, DISPC_MGR_FLD_GO, 1); 574 579 } 575 580 EXPORT_SYMBOL(dispc_mgr_go); 576 - 577 - bool dispc_wb_go_busy(void) 578 - { 579 - return REG_GET(DISPC_CONTROL2, 6, 6) == 1; 580 - } 581 - 582 - void dispc_wb_go(void) 583 - { 584 - enum omap_plane plane = OMAP_DSS_WB; 585 - bool enable, go; 586 - 587 - enable = REG_GET(DISPC_OVL_ATTRIBUTES(plane), 0, 0) == 1; 588 - 589 - if (!enable) 590 - return; 591 - 592 - go = REG_GET(DISPC_CONTROL2, 6, 6) == 1; 593 - if (go) { 594 - DSSERR("GO bit not down for WB\n"); 595 - return; 596 - } 597 - 598 - REG_FLD_MOD(DISPC_CONTROL2, 1, 6, 6); 599 - } 600 581 601 582 static void dispc_ovl_write_firh_reg(enum omap_plane plane, int reg, u32 value) 602 583 { ··· 997 1026 case 3: 998 1027 return OMAP_DSS_CHANNEL_WB; 999 1028 } 1000 - } 1001 - 1002 - void dispc_wb_set_channel_in(enum dss_writeback_channel channel) 1003 - { 1004 - enum omap_plane plane = OMAP_DSS_WB; 1005 - 1006 - REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), channel, 18, 16); 1007 1029 } 1008 1030 1009 1031 static void dispc_ovl_set_burst_size(enum omap_plane plane, ··· 2769 2805 } 2770 2806 EXPORT_SYMBOL(dispc_ovl_setup); 2771 2807 2772 - int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 2773 - bool mem_to_mem, const struct omap_video_timings *mgr_timings) 2774 - { 2775 - int r; 2776 - u32 l; 2777 - enum omap_plane plane = OMAP_DSS_WB; 2778 - const int pos_x = 0, pos_y = 0; 2779 - const u8 zorder = 0, global_alpha = 0; 2780 - const bool replication = false; 2781 - bool truncation; 2782 - int in_width = mgr_timings->x_res; 2783 - int in_height = mgr_timings->y_res; 2784 - enum omap_overlay_caps caps = 2785 - OMAP_DSS_OVL_CAP_SCALE | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA; 2786 - 2787 - DSSDBG("dispc_wb_setup, pa %x, pa_uv %x, %d,%d -> %dx%d, cmode %x, " 2788 - "rot %d, mir %d\n", wi->paddr, wi->p_uv_addr, in_width, 2789 - in_height, wi->width, wi->height, wi->color_mode, wi->rotation, 2790 - wi->mirror); 2791 - 2792 - r = dispc_ovl_setup_common(plane, caps, wi->paddr, wi->p_uv_addr, 2793 - wi->buf_width, pos_x, pos_y, in_width, in_height, wi->width, 2794 - wi->height, wi->color_mode, wi->rotation, wi->mirror, zorder, 2795 - wi->pre_mult_alpha, global_alpha, wi->rotation_type, 2796 - replication, mgr_timings, mem_to_mem); 2797 - 2798 - switch (wi->color_mode) { 2799 - case OMAP_DSS_COLOR_RGB16: 2800 - case OMAP_DSS_COLOR_RGB24P: 2801 - case OMAP_DSS_COLOR_ARGB16: 2802 - case OMAP_DSS_COLOR_RGBA16: 2803 - case OMAP_DSS_COLOR_RGB12U: 2804 - case OMAP_DSS_COLOR_ARGB16_1555: 2805 - case OMAP_DSS_COLOR_XRGB16_1555: 2806 - case OMAP_DSS_COLOR_RGBX16: 2807 - truncation = true; 2808 - break; 2809 - default: 2810 - truncation = false; 2811 - break; 2812 - } 2813 - 2814 - /* setup extra DISPC_WB_ATTRIBUTES */ 2815 - l = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane)); 2816 - l = FLD_MOD(l, truncation, 10, 10); /* TRUNCATIONENABLE */ 2817 - l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */ 2818 - if (mem_to_mem) 2819 - l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */ 2820 - else 2821 - l = FLD_MOD(l, 0, 26, 24); /* CAPTUREMODE */ 2822 - dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), l); 2823 - 2824 - if (mem_to_mem) { 2825 - /* WBDELAYCOUNT */ 2826 - REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), 0, 7, 0); 2827 - } else { 2828 - int wbdelay; 2829 - 2830 - wbdelay = min(mgr_timings->vfp + mgr_timings->vsw + 2831 - mgr_timings->vbp, 255); 2832 - 2833 - /* WBDELAYCOUNT */ 2834 - REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0); 2835 - } 2836 - 2837 - return r; 2838 - } 2839 - 2840 2808 int dispc_ovl_enable(enum omap_plane plane, bool enable) 2841 2809 { 2842 2810 DSSDBG("dispc_enable_plane %d, %d\n", plane, enable); ··· 2798 2902 return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE); 2799 2903 } 2800 2904 EXPORT_SYMBOL(dispc_mgr_is_enabled); 2801 - 2802 - void dispc_wb_enable(bool enable) 2803 - { 2804 - dispc_ovl_enable(OMAP_DSS_WB, enable); 2805 - } 2806 - 2807 - bool dispc_wb_is_enabled(void) 2808 - { 2809 - return dispc_ovl_enabled(OMAP_DSS_WB); 2810 - } 2811 2905 2812 2906 static void dispc_lcd_enable_signal_polarity(bool act_high) 2813 2907 {
-20
drivers/video/fbdev/omap2/omapfb/dss/dss.h
··· 89 89 DSS_DSI_CONTENT_GENERIC, 90 90 }; 91 91 92 - enum dss_writeback_channel { 93 - DSS_WB_LCD1_MGR = 0, 94 - DSS_WB_LCD2_MGR = 1, 95 - DSS_WB_TV_MGR = 2, 96 - DSS_WB_OVL0 = 3, 97 - DSS_WB_OVL1 = 4, 98 - DSS_WB_OVL2 = 5, 99 - DSS_WB_OVL3 = 6, 100 - DSS_WB_LCD3_MGR = 7, 101 - }; 102 - 103 92 enum dss_pll_id { 104 93 DSS_PLL_DSI1, 105 94 DSS_PLL_DSI2, ··· 391 402 int dispc_mgr_get_clock_div(enum omap_channel channel, 392 403 struct dispc_clock_info *cinfo); 393 404 void dispc_set_tv_pclk(unsigned long pclk); 394 - 395 - u32 dispc_wb_get_framedone_irq(void); 396 - bool dispc_wb_go_busy(void); 397 - void dispc_wb_go(void); 398 - void dispc_wb_enable(bool enable); 399 - bool dispc_wb_is_enabled(void); 400 - void dispc_wb_set_channel_in(enum dss_writeback_channel channel); 401 - int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 402 - bool mem_to_mem, const struct omap_video_timings *timings); 403 405 404 406 u32 dispc_read_irqstatus(void); 405 407 void dispc_clear_irqstatus(u32 mask);