Lines Matching refs:splane
39 static void shmob_drm_plane_compute_base(struct shmob_drm_plane *splane, in shmob_drm_plane_compute_base() argument
46 bpp = splane->format->yuv ? 8 : splane->format->bpp; in shmob_drm_plane_compute_base()
48 splane->dma[0] = gem->paddr + fb->offsets[0] in shmob_drm_plane_compute_base()
51 if (splane->format->yuv) { in shmob_drm_plane_compute_base()
52 bpp = splane->format->bpp - 8; in shmob_drm_plane_compute_base()
54 splane->dma[1] = gem->paddr + fb->offsets[1] in shmob_drm_plane_compute_base()
60 static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane, in __shmob_drm_plane_setup() argument
63 struct shmob_drm_device *sdev = splane->plane.dev->dev_private; in __shmob_drm_plane_setup()
67 format = LDBBSIFR_EN | (splane->alpha << LDBBSIFR_LAY_SHIFT); in __shmob_drm_plane_setup()
69 switch (splane->format->fourcc) { in __shmob_drm_plane_setup()
88 switch (splane->format->fourcc) { in __shmob_drm_plane_setup()
112 #define plane_reg_dump(sdev, splane, reg) \ in __shmob_drm_plane_setup() argument
114 splane->index, #reg, \ in __shmob_drm_plane_setup()
115 lcdc_read(sdev, reg(splane->index)), \ in __shmob_drm_plane_setup()
116 lcdc_read(sdev, reg(splane->index) + LCDC_SIDE_B_OFFSET)) in __shmob_drm_plane_setup()
118 plane_reg_dump(sdev, splane, LDBnBSIFR); in __shmob_drm_plane_setup()
119 plane_reg_dump(sdev, splane, LDBnBSSZR); in __shmob_drm_plane_setup()
120 plane_reg_dump(sdev, splane, LDBnBLOCR); in __shmob_drm_plane_setup()
121 plane_reg_dump(sdev, splane, LDBnBSMWR); in __shmob_drm_plane_setup()
122 plane_reg_dump(sdev, splane, LDBnBSAYR); in __shmob_drm_plane_setup()
123 plane_reg_dump(sdev, splane, LDBnBSACR); in __shmob_drm_plane_setup()
125 lcdc_write(sdev, LDBCR, LDBCR_UPC(splane->index)); in __shmob_drm_plane_setup()
126 dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index, in __shmob_drm_plane_setup()
129 lcdc_write(sdev, LDBnBSIFR(splane->index), format); in __shmob_drm_plane_setup()
131 lcdc_write(sdev, LDBnBSSZR(splane->index), in __shmob_drm_plane_setup()
132 (splane->crtc_h << LDBBSSZR_BVSS_SHIFT) | in __shmob_drm_plane_setup()
133 (splane->crtc_w << LDBBSSZR_BHSS_SHIFT)); in __shmob_drm_plane_setup()
134 lcdc_write(sdev, LDBnBLOCR(splane->index), in __shmob_drm_plane_setup()
135 (splane->crtc_y << LDBBLOCR_CVLC_SHIFT) | in __shmob_drm_plane_setup()
136 (splane->crtc_x << LDBBLOCR_CHLC_SHIFT)); in __shmob_drm_plane_setup()
137 lcdc_write(sdev, LDBnBSMWR(splane->index), in __shmob_drm_plane_setup()
140 shmob_drm_plane_compute_base(splane, fb, splane->src_x, splane->src_y); in __shmob_drm_plane_setup()
142 lcdc_write(sdev, LDBnBSAYR(splane->index), splane->dma[0]); in __shmob_drm_plane_setup()
143 if (splane->format->yuv) in __shmob_drm_plane_setup()
144 lcdc_write(sdev, LDBnBSACR(splane->index), splane->dma[1]); in __shmob_drm_plane_setup()
147 LDBCR_UPF(splane->index) | LDBCR_UPD(splane->index)); in __shmob_drm_plane_setup()
148 dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index, in __shmob_drm_plane_setup()
151 plane_reg_dump(sdev, splane, LDBnBSIFR); in __shmob_drm_plane_setup()
152 plane_reg_dump(sdev, splane, LDBnBSSZR); in __shmob_drm_plane_setup()
153 plane_reg_dump(sdev, splane, LDBnBLOCR); in __shmob_drm_plane_setup()
154 plane_reg_dump(sdev, splane, LDBnBSMWR); in __shmob_drm_plane_setup()
155 plane_reg_dump(sdev, splane, LDBnBSAYR); in __shmob_drm_plane_setup()
156 plane_reg_dump(sdev, splane, LDBnBSACR); in __shmob_drm_plane_setup()
161 struct shmob_drm_plane *splane = to_shmob_plane(plane); in shmob_drm_plane_setup() local
166 __shmob_drm_plane_setup(splane, plane->fb); in shmob_drm_plane_setup()
177 struct shmob_drm_plane *splane = to_shmob_plane(plane); in shmob_drm_plane_update() local
193 splane->format = format; in shmob_drm_plane_update()
195 splane->src_x = src_x >> 16; in shmob_drm_plane_update()
196 splane->src_y = src_y >> 16; in shmob_drm_plane_update()
197 splane->crtc_x = crtc_x; in shmob_drm_plane_update()
198 splane->crtc_y = crtc_y; in shmob_drm_plane_update()
199 splane->crtc_w = crtc_w; in shmob_drm_plane_update()
200 splane->crtc_h = crtc_h; in shmob_drm_plane_update()
202 __shmob_drm_plane_setup(splane, fb); in shmob_drm_plane_update()
209 struct shmob_drm_plane *splane = to_shmob_plane(plane); in shmob_drm_plane_disable() local
212 splane->format = NULL; in shmob_drm_plane_disable()
214 lcdc_write(sdev, LDBnBSIFR(splane->index), 0); in shmob_drm_plane_disable()
244 struct shmob_drm_plane *splane; in shmob_drm_plane_create() local
247 splane = devm_kzalloc(sdev->dev, sizeof(*splane), GFP_KERNEL); in shmob_drm_plane_create()
248 if (splane == NULL) in shmob_drm_plane_create()
251 splane->index = index; in shmob_drm_plane_create()
252 splane->alpha = 255; in shmob_drm_plane_create()
254 ret = drm_plane_init(sdev->ddev, &splane->plane, 1, in shmob_drm_plane_create()