Lines Matching refs:mixer

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