* i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.
@ 2016-04-21 12:33 Ivan Nikolaenko
2016-04-21 13:16 ` Philipp Zabel
0 siblings, 1 reply; 4+ messages in thread
From: Ivan Nikolaenko @ 2016-04-21 12:33 UTC (permalink / raw)
To: dri-devel
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?
Best regards,
Ivan Nikolaenko
i.nikolaenko@geoscan.aero
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.
2016-04-21 12:33 i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52 Ivan Nikolaenko
@ 2016-04-21 13:16 ` Philipp Zabel
2016-04-22 12:21 ` Ivan Nikolaenko
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Zabel @ 2016-04-21 13:16 UTC (permalink / raw)
To: Ivan Nikolaenko; +Cc: dri-devel
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.
2016-04-21 13:16 ` Philipp Zabel
@ 2016-04-22 12:21 ` Ivan Nikolaenko
2016-04-22 12:49 ` Philipp Zabel
0 siblings, 1 reply; 4+ messages in thread
From: Ivan Nikolaenko @ 2016-04-22 12:21 UTC (permalink / raw)
To: Philipp Zabel; +Cc: dri-devel
Hi, Phillip!
Thank you for the fast responce.
Ifollowed your adviceandrealized thatIincorrectlyformulatedthought. I
need a 180 degree rotation, not the flip.
I got the vertical flip (screen reflected by Y axis), butmy attempt to
reflect it by X axis (xrandr --output DISP3\ BG --reflect x) failed
(nothing happened).
Is there a way to do 180deg rotation somehow?
On 21.04.2016 16:16, Philipp Zabel wrote:
> to do a 180 degree vertical flip of the framebuffer using imx-drm
> >upon kernel initialization. But I can see th
Best regards, Ivan Nikolaenko.
i.nikolaenko@geoscan.aero
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.
2016-04-22 12:21 ` Ivan Nikolaenko
@ 2016-04-22 12:49 ` Philipp Zabel
0 siblings, 0 replies; 4+ messages in thread
From: Philipp Zabel @ 2016-04-22 12:49 UTC (permalink / raw)
To: Ivan Nikolaenko; +Cc: dri-devel
Am Freitag, den 22.04.2016, 15:21 +0300 schrieb Ivan Nikolaenko:
> Hi, Phillip!
>
> Thank you for the fast responce.
> Ifollowed your adviceandrealized thatIincorrectlyformulatedthought. I
> need a 180 degree rotation, not the flip.
> I got the vertical flip (screen reflected by Y axis), butmy attempt to
> reflect it by X axis (xrandr --output DISP3\ BG --reflect x) failed
> (nothing happened).
That is because the IDMAC controller considers the VF bit when
calculating the line start addresses (so reflect Y works) but completely
ignores the HF bit. The IC has a line buffer that is sampled backwards
if the HF bit is set.
> Is there a way to do 180deg rotation somehow?
If your display is < 1024 pixels in both width and height, it should be
possible to get reflect x functionality by hooking up the IC -> DMFC
direct flow.
regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-22 12:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 12:33 i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52 Ivan Nikolaenko
2016-04-21 13:16 ` Philipp Zabel
2016-04-22 12:21 ` Ivan Nikolaenko
2016-04-22 12:49 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).