History log of /drivers/gpu/ipu-v3/ipu-common.c
Revision Date Author Comments
3feb049f378da6aa1209e05ef5c656a1f26a9183 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_dump()

Adds ipu_dump() which dumps IPU register state to debug.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
9a34cef01392358421b764645073601c352d0a85 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add more planar formats support

Adds support for the following planar and partial-planar formats:

YUV422
NV12
NV16

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Mohsin Kazmi <mohsin_kazmi@mentor.com>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>

Unified base offset and Y plane offset into a single variable,
moved all ipu_cpmem_set_buffer calls to a single location.
Removed NV21 and NV61 for now. The IDMAC doesn't understand U/V
order for chroma interleaved formats, so we'd need to work around
this by implenting U/V switching via the CSC unit.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
4fd1a07af59bf5e1cfb73f7035bf525522cebc76 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_idmac_lock_enable()

Adds ipu_idmac_lock_enable(), which enables or disables channel
burst locking.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2bcf577eb6361827f8347529803528031033cb83 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_idmac_enable_watermark()

Adds the function ipu_idmac_enable_watermark(), which enables or disables
watermarking in the IDMAC channel. Enabling watermarking can increase a
channel's AXI bus arbitration priority.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
6930afdccfd2b3e6669c305d97958d81cf0d072e 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_stride_to_bytes()

Adds ipu_stride_to_bytes(), which converts a pixel stride to bytes,
suitable for passing to cpmem.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
e7268c699bbe578e6dcf02e9f7f5a267837bc18f 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add __ipu_idmac_reset_current_buffer()

Adds __ipu_idmac_reset_current_buffer() that resets a channel's
internal current buffer pointer so that transfers start from buffer
0 on the next channel enable.

This operation is required for channel linking to work correctly,
for instance video capture pipelines that carry out image rotations
will fail after the first streaming unless this function is called
for each channel before re-enabling the channels.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
bce6f087a958a21500c51a9e63a5f578f5b0510c 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_idmac_clear_buffer()

Add the reverse of ipu_idmac_select_buffer(), that is, clear a buffer
ready status in a channel.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
aa52f57894b93dcfdd615b35a7579e161f1e7a38 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_idmac_buffer_is_ready()

Add ipu_idmac_buffer_is_ready(), returns true if the given buffer in
the given channel is set ready (owned by IPU), or false if not ready
(owned by CPU core).

Support has been added for third buffer, there is no support yet for
triple-buffering in idmac channels, but this function checks
buffer-ready for third buffer in case this support is added later.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
4cea940d34319fb5d5e2f4d554e23f766c228e90 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add helper function checking if pixfmt is planar

Add simple helper function returning true if passed pixel format is one
of supported planar ones.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
f835f386a119c3f78f5acb93e86a4f025211739a 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add rotation mode conversion utilities

Add two functions:

- ipu_degrees_to_rot_mode(): converts a degrees, hflip, and vflip setting
to an IPU rotation mode.
- ipu_rot_mode_to_degrees(): converts an IPU rotation mode with given hflip
and vflip settings to degrees.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
ae0e9708b30b3eebe5a58e4d055eb49a73d641dd 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu_mbus_code_to_colorspace()

Add ipu_mbus_code_to_colorspace() to find ipu_color_space from a
media bus pixel format code.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
fc4353559e587f5962f22c24ca7e015bdbea1e49 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: smfc: Move enable/disable to ipu-smfc.c

Move the SMFC module enable/disable helpers into the ipu-smfc submodule.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1aa8ea0d2bd5d4ba7b5d2b132a02157bc1fb9793 11-Aug-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add Image Converter unit

Adds the Image Converter (IC) unit.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>

Condensed the three CSC setup functions into a single one that
uses static tables to set up the CSC task parameters.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2ffd48f2e7ae06c3d7b2bcde9a0cb211d1a32468 19-Aug-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add Camera Sensor Interface unit

Adds the Camera Sensor Interface (CSI) unit required for video capture.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>

Removed the unused clk_get_rate in ipu_csi_init_interface and the
ipu_csi_ccir_err_detection_enable/disable functions.
Checkpatch cleanup.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
e4946cdcabcffd4814e153e71d28884b94c65e9e 03-Aug-2014 Axel Lin <axel.lin@ingics.com> gpu: ipu-v3: Return proper error on ipu_add_client_devices error path

Avoid returning an uninitialized variable in the error path.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
ba07975f0fe5bf95107d71d0df0405c16f5c3266 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add functions to set CSI/IC source muxes

Adds two new functions, ipu_set_csi_src_mux() and ipu_set_ic_src_mux(),
that select the inputs to the CSI and IC respectively. Both muxes are
programmed in the IPU_CONF register.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
7d2691da901d71ff62ad974510ea7149b391bdfe 26-Jun-2014 Steve Longerbeam <slongerbeam@gmail.com> gpu: ipu-v3: Add ipu-cpmem unit

Move channel parameter memory setup functions and macros into a new
submodule ipu-cpmem. In the process, cleanup arguments to the functions
to take a channel pointer instead of a pointer into cpmem for that
channel. That allows the structure of the parameter memory to be
private to ipu-cpmem.c.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
d6ca8ca7ec555bdd3372687d0d775c837a09ff6e 23-May-2012 Philipp Zabel <p.zabel@pengutronix.de> gpu: ipu-v3: Register the CSI modules

This patch registers the two CSI platform devices per IPU.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
3f5a8a946d860b9022a23bf1ed5ab76f6fdd7e6e 22-May-2012 Philipp Zabel <p.zabel@pengutronix.de> gpu: ipu-v3: Add CSI and SMFC module enable wrappers

IPU_CONF_..._EN bits are implementation details, not to be made public.
Add wrappers around ipu_module_enable/disable, so the CSI V4L2 driver
can enable/disable the CSI and SMFC modules.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
e90460970fde8bdccf2147e899cb9953943e16d2 16-May-2012 Philipp Zabel <p.zabel@pengutronix.de> gpu: ipu-v3: Add ipu_idmac_get_current_buffer function

This function returns the currently active buffer (0 or 1)
of a double buffered IDMAC channel. It is to be used by the
CSI driver.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
35de925ffaa67971e073d3ebf1e0600be0d0d3f1 09-May-2012 Philipp Zabel <p.zabel@pengutronix.de> gpu: ipu-v3: Add SMFC code

The Sensor Multi Fifo Controller (SMFC) is used as a buffer between
the two CSIs (writing simultaneously) and up to four IDMAC channels.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
39b9004d1f626b88b775c7655d3f286e135dfec6 30-Sep-2013 Philipp Zabel <p.zabel@pengutronix.de> gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging

The i.MX Image Processing Unit (IPU) contains a number of image processing
blocks that sit right in the middle between DRM and V4L2. Some of the modules,
such as Display Controller, Processor, and Interface (DC, DP, DI) or CMOS
Sensor Interface (CSI) and their FIFOs could be assigned to either framework,
but others, such as the dma controller (IDMAC) and image converter (IC) can
be used by both.
The IPUv3 core driver provides an internal API to access the modules, to be
used by both DRM and V4L2 IPUv3 drivers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>