Lines Matching refs:vid
46 static int sti_vid_prepare_layer(struct sti_layer *vid, bool first_prepare) in sti_vid_prepare_layer() argument
51 val = readl(vid->regs + VID_CTL); in sti_vid_prepare_layer()
53 writel(val, vid->regs + VID_CTL); in sti_vid_prepare_layer()
58 static int sti_vid_commit_layer(struct sti_layer *vid) in sti_vid_commit_layer() argument
60 struct drm_display_mode *mode = vid->mode; in sti_vid_commit_layer()
63 ydo = sti_vtg_get_line_number(*mode, vid->dst_y); in sti_vid_commit_layer()
64 yds = sti_vtg_get_line_number(*mode, vid->dst_y + vid->dst_h - 1); in sti_vid_commit_layer()
65 xdo = sti_vtg_get_pixel_number(*mode, vid->dst_x); in sti_vid_commit_layer()
66 xds = sti_vtg_get_pixel_number(*mode, vid->dst_x + vid->dst_w - 1); in sti_vid_commit_layer()
68 writel((ydo << 16) | xdo, vid->regs + VID_VPO); in sti_vid_commit_layer()
69 writel((yds << 16) | xds, vid->regs + VID_VPS); in sti_vid_commit_layer()
74 static int sti_vid_disable_layer(struct sti_layer *vid) in sti_vid_disable_layer() argument
79 val = readl(vid->regs + VID_CTL); in sti_vid_disable_layer()
81 writel(val, vid->regs + VID_CTL); in sti_vid_disable_layer()
96 static void sti_vid_init(struct sti_layer *vid) in sti_vid_init() argument
99 writel(VID_CTL_PSI_ENABLE | VID_CTL_IGNORE, vid->regs + VID_CTL); in sti_vid_init()
102 writel(VID_ALP_OPAQUE, vid->regs + VID_ALP); in sti_vid_init()
105 writel(VID_MPR0_BT709, vid->regs + VID_MPR0); in sti_vid_init()
106 writel(VID_MPR1_BT709, vid->regs + VID_MPR1); in sti_vid_init()
107 writel(VID_MPR2_BT709, vid->regs + VID_MPR2); in sti_vid_init()
108 writel(VID_MPR3_BT709, vid->regs + VID_MPR3); in sti_vid_init()
111 writel(VID_BC_DFLT, vid->regs + VID_BC); in sti_vid_init()
112 writel(VID_TINT_DFLT, vid->regs + VID_TINT); in sti_vid_init()
113 writel(VID_CSAT_DFLT, vid->regs + VID_CSAT); in sti_vid_init()
127 struct sti_layer *vid; in sti_vid_create() local
129 vid = devm_kzalloc(dev, sizeof(*vid), GFP_KERNEL); in sti_vid_create()
130 if (!vid) { in sti_vid_create()
135 vid->ops = &vid_ops; in sti_vid_create()
137 return vid; in sti_vid_create()