i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.

Philipp Zabel p.zabel at pengutronix.de
Thu Apr 21 13:16:44 UTC 2016


Am Donnerstag, den 21.04.2016, 15:33 +0300 schrieb Ivan Nikolaenko:
> Hello all!
> 
> Mr. Fabio Estevam from freescale community forum advisedto address this 
> question to this mail list.
> 
> I am using a i.MX6Q SabreSD -based board with 3.14.52 kernel from Jethro 
> (2.0) release of FSL-Community-BSP.
> 
> I need to do a 180 degree vertical flip of the framebuffer using imx-drm 
> upon kernel initialization. But I can see that in the 
> ./drivers/video/mxc/mxc_ipuv3_fb.c file there are no support of rotation.
> Howisit meantto do?

No idea about the FSL kernel, but 180° rotation can't be done without
going through the IC, as far as I know. For a straight vertical flip
you'd just have to set the VF bit on the scanout IDMAC channel's CPMEM.
For example as a quick hack on v4.6-rc4:

-----8<-----
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 681ec6e..37d9ebd 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -291,6 +291,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
 	ipu_dmfc_config_wait4eot(ipu_plane->dmfc, crtc_w);
 
 	ipu_cpmem_zero(ipu_plane->ipu_ch);
+	ipu_cpmem_set_rotation(ipu_plane->ipu_ch, IPU_ROTATE_VERT_FLIP);
 	ipu_cpmem_set_resolution(ipu_plane->ipu_ch, src_w, src_h);
 	ret = ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->pixel_format);
 	if (ret < 0) {
----->8-----

I suppose that could be hooked up to the KMS rotation property (reflect-y).

regards
Philipp



More information about the dri-devel mailing list