diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-08-24 12:40:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-08-25 08:28:40 +0200 |
commit | da03ce9c18fca87ae2f443202d70bb42cab6a222 (patch) | |
tree | 39d1522464dcbe1480e26cae435e86b3c155be20 /drivers | |
parent | 1be6d321efbd4113488dae300cbb3e1f30582a9f (diff) | |
download | barebox-da03ce9c18fca87ae2f443202d70bb42cab6a222.tar.gz barebox-da03ce9c18fca87ae2f443202d70bb42cab6a222.tar.xz |
video: add VPL ioctl to get bus format
The i.MX specific DI_MODE VPL ioctl already allows to query the encoder
input bus format. This patch also allows non-i.MX specific encoder drivers
to report their input bus format.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/imx-ipu-v3/ipufb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/imx-ipu-v3/ipufb.c b/drivers/video/imx-ipu-v3/ipufb.c index cfafa22c7c..63024b546d 100644 --- a/drivers/video/imx-ipu-v3/ipufb.c +++ b/drivers/video/imx-ipu-v3/ipufb.c @@ -109,7 +109,7 @@ int ipu_crtc_mode_set(struct ipufb_info *fbi, int ret; struct ipu_di_signal_cfg sig_cfg = {}; struct ipu_di_mode di_mode = {}; - u32 bus_format; + u32 bus_format = 0; dev_info(fbi->dev, "%s: mode->xres: %d\n", __func__, mode->xres); @@ -117,7 +117,11 @@ int ipu_crtc_mode_set(struct ipufb_info *fbi, mode->yres); vpl_ioctl(&fbi->vpl, 2 + fbi->dino, IMX_IPU_VPL_DI_MODE, &di_mode); - bus_format = di_mode.bus_format ?: fbi->bus_format; + vpl_ioctl(&fbi->vpl, 2 + fbi->dino, VPL_GET_BUS_FORMAT, &bus_format); + if (bus_format) + di_mode.di_clkflags = IPU_DI_CLKMODE_NON_FRACTIONAL; + else + bus_format = di_mode.bus_format ?: fbi->bus_format; if (mode->sync & FB_SYNC_HOR_HIGH_ACT) sig_cfg.Hsync_pol = 1; |