Lines Matching full:mixer

18 /* Module parameter to set the background color of the mixer */
54 const char *sti_mixer_to_str(struct sti_mixer *mixer) in sti_mixer_to_str() argument
56 switch (mixer->id) { in sti_mixer_to_str()
62 return "<UNKNOWN MIXER>"; in sti_mixer_to_str()
66 static inline u32 sti_mixer_reg_read(struct sti_mixer *mixer, u32 reg_id) in sti_mixer_reg_read() argument
68 return readl(mixer->regs + reg_id); in sti_mixer_reg_read()
71 static inline void sti_mixer_reg_write(struct sti_mixer *mixer, in sti_mixer_reg_write() argument
74 writel(val, mixer->regs + reg_id); in sti_mixer_reg_write()
78 sti_mixer_reg_read(mixer, reg))
151 struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data; in mixer_dbg_show() local
154 sti_mixer_to_str(mixer), mixer->regs); in mixer_dbg_show()
157 mixer_dbg_ctl(s, sti_mixer_reg_read(mixer, GAM_MIXER_CTL)); in mixer_dbg_show()
164 mixer_dbg_crb(s, sti_mixer_reg_read(mixer, GAM_MIXER_CRB)); in mixer_dbg_show()
168 mixer_dbg_mxn(s, mixer->regs + GAM_MIXER_MX0); in mixer_dbg_show()
181 void sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor) in sti_mixer_debugfs_init() argument
187 switch (mixer->id) { in sti_mixer_debugfs_init()
201 mixer_debugfs_files[i].data = mixer; in sti_mixer_debugfs_init()
208 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable) in sti_mixer_set_background_status() argument
210 u32 val = sti_mixer_reg_read(mixer, GAM_MIXER_CTL); in sti_mixer_set_background_status()
214 sti_mixer_reg_write(mixer, GAM_MIXER_CTL, val); in sti_mixer_set_background_status()
217 static void sti_mixer_set_background_color(struct sti_mixer *mixer, in sti_mixer_set_background_color() argument
220 sti_mixer_reg_write(mixer, GAM_MIXER_BKC, rgb); in sti_mixer_set_background_color()
223 static void sti_mixer_set_background_area(struct sti_mixer *mixer, in sti_mixer_set_background_area() argument
233 sti_mixer_reg_write(mixer, GAM_MIXER_BCO, ydo << 16 | xdo); in sti_mixer_set_background_area()
234 sti_mixer_reg_write(mixer, GAM_MIXER_BCS, yds << 16 | xds); in sti_mixer_set_background_area()
237 int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane) in sti_mixer_set_plane_depth() argument
268 val = sti_mixer_reg_read(mixer, GAM_MIXER_CRB); in sti_mixer_set_plane_depth()
278 DRM_DEBUG_DRIVER("%s %s depth=%d\n", sti_mixer_to_str(mixer), in sti_mixer_set_plane_depth()
280 dev_dbg(mixer->dev, "GAM_MIXER_CRB val 0x%x mask 0x%x\n", in sti_mixer_set_plane_depth()
285 sti_mixer_reg_write(mixer, GAM_MIXER_CRB, val); in sti_mixer_set_plane_depth()
287 dev_dbg(mixer->dev, "Read GAM_MIXER_CRB 0x%x\n", in sti_mixer_set_plane_depth()
288 sti_mixer_reg_read(mixer, GAM_MIXER_CRB)); in sti_mixer_set_plane_depth()
292 int sti_mixer_active_video_area(struct sti_mixer *mixer, in sti_mixer_active_video_area() argument
303 sti_mixer_to_str(mixer), xdo, ydo, xds, yds); in sti_mixer_active_video_area()
304 sti_mixer_reg_write(mixer, GAM_MIXER_AVO, ydo << 16 | xdo); in sti_mixer_active_video_area()
305 sti_mixer_reg_write(mixer, GAM_MIXER_AVS, yds << 16 | xds); in sti_mixer_active_video_area()
307 sti_mixer_set_background_color(mixer, bkg_color); in sti_mixer_active_video_area()
309 sti_mixer_set_background_area(mixer, mode); in sti_mixer_active_video_area()
310 sti_mixer_set_background_status(mixer, true); in sti_mixer_active_video_area()
336 int sti_mixer_set_plane_status(struct sti_mixer *mixer, in sti_mixer_set_plane_status() argument
342 sti_mixer_to_str(mixer), sti_plane_to_str(plane)); in sti_mixer_set_plane_status()
350 val = sti_mixer_reg_read(mixer, GAM_MIXER_CTL); in sti_mixer_set_plane_status()
353 sti_mixer_reg_write(mixer, GAM_MIXER_CTL, val); in sti_mixer_set_plane_status()
363 struct sti_mixer *mixer = devm_kzalloc(dev, sizeof(*mixer), GFP_KERNEL); in sti_mixer_create() local
366 if (!mixer) { in sti_mixer_create()
367 DRM_ERROR("Failed to allocated memory for mixer\n"); in sti_mixer_create()
370 mixer->regs = baseaddr; in sti_mixer_create()
371 mixer->dev = dev; in sti_mixer_create()
372 mixer->id = id; in sti_mixer_create()
375 sti_mixer_to_str(mixer), mixer->regs); in sti_mixer_create()
377 return mixer; in sti_mixer_create()