All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ivan Nikolaenko <i.nikolaenko@geoscan.aero>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52.
Date: Thu, 21 Apr 2016 15:16:44 +0200	[thread overview]
Message-ID: <1461244604.4695.38.camel@pengutronix.de> (raw)
In-Reply-To: <5718C881.5050500@geoscan.aero>

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

  reply	other threads:[~2016-04-21 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 12:33 i.MX6 imx-drm framebuffer rotation. Kernel 3.14.52 Ivan Nikolaenko
2016-04-21 13:16 ` Philipp Zabel [this message]
2016-04-22 12:21   ` Ivan Nikolaenko
2016-04-22 12:49     ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461244604.4695.38.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=i.nikolaenko@geoscan.aero \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.