Lines Matching refs:ss
73 static void dcss_ss_write(struct dcss_ss *ss, u32 val, u32 ofs) in dcss_ss_write() argument
75 if (!ss->in_use) in dcss_ss_write()
76 dcss_writel(val, ss->base_reg + ofs); in dcss_ss_write()
78 dcss_ctxld_write(ss->ctxld, ss->ctx_id, val, in dcss_ss_write()
79 ss->base_ofs + ofs); in dcss_ss_write()
84 struct dcss_ss *ss; in dcss_ss_init() local
86 ss = kzalloc(sizeof(*ss), GFP_KERNEL); in dcss_ss_init()
87 if (!ss) in dcss_ss_init()
90 dcss->ss = ss; in dcss_ss_init()
91 ss->dev = dcss->dev; in dcss_ss_init()
92 ss->ctxld = dcss->ctxld; in dcss_ss_init()
94 ss->base_reg = ioremap(ss_base, SZ_4K); in dcss_ss_init()
95 if (!ss->base_reg) { in dcss_ss_init()
97 kfree(ss); in dcss_ss_init()
101 ss->base_ofs = ss_base; in dcss_ss_init()
102 ss->ctx_id = CTX_SB_HP; in dcss_ss_init()
107 void dcss_ss_exit(struct dcss_ss *ss) in dcss_ss_exit() argument
110 dcss_writel(0, ss->base_reg + DCSS_SS_SYS_CTRL); in dcss_ss_exit()
112 if (ss->base_reg) in dcss_ss_exit()
113 iounmap(ss->base_reg); in dcss_ss_exit()
115 kfree(ss); in dcss_ss_exit()
118 void dcss_ss_subsam_set(struct dcss_ss *ss) in dcss_ss_subsam_set() argument
120 dcss_ss_write(ss, 0x41614161, DCSS_SS_COEFF); in dcss_ss_subsam_set()
121 dcss_ss_write(ss, 0, DCSS_SS_MODE); in dcss_ss_subsam_set()
122 dcss_ss_write(ss, 0x03ff0000, DCSS_SS_CLIP_CB); in dcss_ss_subsam_set()
123 dcss_ss_write(ss, 0x03ff0000, DCSS_SS_CLIP_CR); in dcss_ss_subsam_set()
126 void dcss_ss_sync_set(struct dcss_ss *ss, struct videomode *vm, in dcss_ss_sync_set() argument
140 dcss_ss_write(ss, (lrc_y << LRC_Y_POS) | lrc_x, DCSS_SS_DISPLAY); in dcss_ss_sync_set()
146 dcss_ss_write(ss, (phsync ? SYNC_POL : 0) | in dcss_ss_sync_set()
153 dcss_ss_write(ss, (pvsync ? SYNC_POL : 0) | in dcss_ss_sync_set()
160 dcss_ss_write(ss, SYNC_POL | ((u32)de_ulc_y << ULC_Y_POS) | de_ulc_x, in dcss_ss_sync_set()
167 dcss_ss_write(ss, (de_lrc_y << LRC_Y_POS) | de_lrc_x, DCSS_SS_DE_LRC); in dcss_ss_sync_set()
170 void dcss_ss_enable(struct dcss_ss *ss) in dcss_ss_enable() argument
172 dcss_ss_write(ss, RUN_EN, DCSS_SS_SYS_CTRL); in dcss_ss_enable()
173 ss->in_use = true; in dcss_ss_enable()
176 void dcss_ss_shutoff(struct dcss_ss *ss) in dcss_ss_shutoff() argument
178 dcss_writel(0, ss->base_reg + DCSS_SS_SYS_CTRL); in dcss_ss_shutoff()
179 ss->in_use = false; in dcss_ss_shutoff()