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

drm/omap: add writeback funcs to dispc_ops

Add writeback specific dispc functions to dispc_ops so that omapdrm can
use them. Also move 'enum dss_writeback_channel' to the public
omapdss.h for omapdrm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

+35 -25
+15 -4
drivers/gpu/drm/omapdrm/dss/dispc.c
··· 715 715 return mgr_desc[channel].sync_lost_irq; 716 716 } 717 717 718 - u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc) 718 + static u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc) 719 719 { 720 720 return DISPC_IRQ_FRAMEDONEWB; 721 721 } ··· 750 750 mgr_fld_write(dispc, channel, DISPC_MGR_FLD_GO, 1); 751 751 } 752 752 753 - bool dispc_wb_go_busy(struct dispc_device *dispc) 753 + static bool dispc_wb_go_busy(struct dispc_device *dispc) 754 754 { 755 755 return REG_GET(dispc, DISPC_CONTROL2, 6, 6) == 1; 756 756 } 757 757 758 - void dispc_wb_go(struct dispc_device *dispc) 758 + static void dispc_wb_go(struct dispc_device *dispc) 759 759 { 760 760 enum omap_plane_id plane = OMAP_DSS_WB; 761 761 bool enable, go; ··· 2771 2771 return r; 2772 2772 } 2773 2773 2774 - int dispc_wb_setup(struct dispc_device *dispc, 2774 + static int dispc_wb_setup(struct dispc_device *dispc, 2775 2775 const struct omap_dss_writeback_info *wi, 2776 2776 bool mem_to_mem, const struct videomode *vm, 2777 2777 enum dss_writeback_channel channel_in) ··· 2852 2852 } 2853 2853 2854 2854 return 0; 2855 + } 2856 + 2857 + static bool dispc_has_writeback(struct dispc_device *dispc) 2858 + { 2859 + return dispc->feat->has_writeback; 2855 2860 } 2856 2861 2857 2862 static int dispc_ovl_enable(struct dispc_device *dispc, ··· 4714 4709 .ovl_enable = dispc_ovl_enable, 4715 4710 .ovl_setup = dispc_ovl_setup, 4716 4711 .ovl_get_color_modes = dispc_ovl_get_color_modes, 4712 + 4713 + .wb_get_framedone_irq = dispc_wb_get_framedone_irq, 4714 + .wb_setup = dispc_wb_setup, 4715 + .has_writeback = dispc_has_writeback, 4716 + .wb_go_busy = dispc_wb_go_busy, 4717 + .wb_go = dispc_wb_go, 4717 4718 }; 4718 4719 4719 4720 /* DISPC HW IP initialisation */
-21
drivers/gpu/drm/omapdrm/dss/dss.h
··· 102 102 DSS_DSI_CONTENT_GENERIC, 103 103 }; 104 104 105 - enum dss_writeback_channel { 106 - DSS_WB_LCD1_MGR = 0, 107 - DSS_WB_LCD2_MGR = 1, 108 - DSS_WB_TV_MGR = 2, 109 - DSS_WB_OVL0 = 3, 110 - DSS_WB_OVL1 = 4, 111 - DSS_WB_OVL2 = 5, 112 - DSS_WB_OVL3 = 6, 113 - DSS_WB_LCD3_MGR = 7, 114 - }; 115 - 116 105 enum dss_clk_source { 117 106 DSS_CLK_SRC_FCK = 0, 118 107 ··· 436 447 enum omap_channel channel, 437 448 struct dispc_clock_info *cinfo); 438 449 void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk); 439 - 440 - u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc); 441 - bool dispc_wb_go_busy(struct dispc_device *dispc); 442 - void dispc_wb_go(struct dispc_device *dispc); 443 - void dispc_wb_set_channel_in(struct dispc_device *dispc, 444 - enum dss_writeback_channel channel); 445 - int dispc_wb_setup(struct dispc_device *dispc, 446 - const struct omap_dss_writeback_info *wi, 447 - bool mem_to_mem, const struct videomode *vm, 448 - enum dss_writeback_channel channel_in); 449 450 450 451 #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS 451 452 static inline void dss_collect_irq_stats(u32 irqstatus, unsigned int *irq_arr)
+20
drivers/gpu/drm/omapdrm/dss/omapdss.h
··· 626 626 struct device_node *dss_of_port_get_parent_device(struct device_node *port); 627 627 u32 dss_of_port_get_port_number(struct device_node *port); 628 628 629 + enum dss_writeback_channel { 630 + DSS_WB_LCD1_MGR = 0, 631 + DSS_WB_LCD2_MGR = 1, 632 + DSS_WB_TV_MGR = 2, 633 + DSS_WB_OVL0 = 3, 634 + DSS_WB_OVL1 = 4, 635 + DSS_WB_OVL2 = 5, 636 + DSS_WB_OVL3 = 6, 637 + DSS_WB_LCD3_MGR = 7, 638 + }; 639 + 629 640 struct dss_mgr_ops { 630 641 int (*connect)(struct omap_drm_private *priv, 631 642 enum omap_channel channel, ··· 743 732 744 733 const u32 *(*ovl_get_color_modes)(struct dispc_device *dispc, 745 734 enum omap_plane_id plane); 735 + 736 + u32 (*wb_get_framedone_irq)(struct dispc_device *dispc); 737 + int (*wb_setup)(struct dispc_device *dispc, 738 + const struct omap_dss_writeback_info *wi, 739 + bool mem_to_mem, const struct videomode *vm, 740 + enum dss_writeback_channel channel_in); 741 + bool (*has_writeback)(struct dispc_device *dispc); 742 + bool (*wb_go_busy)(struct dispc_device *dispc); 743 + void (*wb_go)(struct dispc_device *dispc); 746 744 }; 747 745 748 746 struct dispc_device *dispc_get_dispc(struct dss_device *dss);