14 Jun, 2019

1 commit

  • Only providing the input and output RGB/YUV space to the IC task init
    functions is not sufficient. To fully characterize a colorspace
    conversion, the Y'CbCr encoding standard, and quantization also
    need to be specified.

    Define a 'struct ipu_ic_colorspace' that includes all the above.

    This allows to actually enforce the fact that the IC:

    - can only encode to/from YUV and RGB full range. A follow-up patch will
    remove this restriction.
    - can only encode using BT.601 standard. A follow-up patch will add
    Rec.709 encoding support.

    The determination of the CSC coefficients based on the input/output
    'struct ipu_ic_colorspace' are moved to a new exported function
    ipu_ic_calc_csc(), and 'struct ic_csc_params' is exported as
    'struct ipu_ic_csc_params'. ipu_ic_calc_csc() fills a 'struct ipu_ic_csc'
    with the input/output 'struct ipu_ic_colorspace' and the calculated
    'struct ic_csc_params' from those input/output colorspaces.

    The functions ipu_ic_task_init(_rsc)() now take a filled 'struct
    ipu_ic_csc'.

    The existing CSC coefficient tables and ipu_ic_calc_csc() are moved
    to a new module ipu-ic-csc.c. This is in preparation for adding more
    coefficient tables for limited range quantization and more encoding
    standards.

    The existing ycbcr2rgb and inverse rgb2ycbcr tables defined the BT.601
    Y'CbCr encoding coefficients. The rgb2ycbcr table specifically described
    the BT.601 encoding from full range RGB to full range YUV. Table
    comments have been added in ipu-ic-csc.c to make this more clear.

    The ycbcr2rgb inverse table described encoding YUV limited range to RGB
    full range. To be consistent with the rgb2ycbcr table, this table is
    converted to YUV full range to RGB full range, and the comments are
    expanded in ipu-ic-csc.c.

    The ic_csc_rgb2rgb table was just an identity matrix, so it is renamed
    'identity' in ipu-ic-csc.c.

    Signed-off-by: Steve Longerbeam
    [p.zabel@pengutronix.de: removed a superfluous blank line]
    Signed-off-by: Philipp Zabel

    Steve Longerbeam
     

10 Mar, 2019

1 commit

  • Pull media updates from Mauro Carvalho Chehab:

    - remove sensor drivers that got converted from soc_camera

    - remaining soc_camera drivers got moved to staging

    - some documentation cleanups and improvements

    - the imx staging driver now supports imx7

    - the ov9640, mt9m001 and mt9m111 got converted from soc_camera

    - the vim2m driver now does what a m2m convert driver expects to do

    - epoll() fixes on media subsystems

    - several drivers fixes, typos, cleanups and improvements

    * tag 'media/v5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (346 commits)
    media: dvb/earth-pt1: fix wrong initialization for demod blocks
    media: vim2m: Address some coding style issues
    media: vim2m: don't use BUG()
    media: vim2m: speedup passthrough copy
    media: vim2m: add an horizontal scaler
    media: vim2m: don't accept YUYV anymore as output format
    media: vim2m: add vertical linear scaler
    media: vim2m: better handle cap/out buffers with different sizes
    media: vim2m: use different framesizes for bayer formats
    media: vim2m: add support for VIDIOC_ENUM_FRAMESIZES
    media: vim2m: ensure that width is multiple of two
    media: vim2m: improve debug messages
    media: vim2m: add bayer capture formats
    media: a few more typos at staging, pci, platform, radio and usb
    media: Documentation: fix several typos
    media: staging: fix several typos
    media: include: fix several typos
    media: common: fix several typos
    media: v4l2-core: fix several typos
    media: usb: fix several typos
    ...

    Linus Torvalds
     

22 Feb, 2019

1 commit


17 Jan, 2019

2 commits

  • To support interlaced scan with planar formats, cpmem SLUV must
    be programmed with the correct chroma line stride. For full and
    partial planar 4:2:2 (YUV422P, NV16), chroma line stride must
    be doubled. For full and partial planar 4:2:0 (YUV420, YVU420, NV12),
    chroma line stride must _not_ be doubled, since a single chroma line
    is shared by two luma lines.

    Signed-off-by: Steve Longerbeam
    Reviewed-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Steve Longerbeam
     
  • The function ipu_csi_init_interface() was inverting the F-bit for
    NTSC case, in the CCIR_CODE_1/2 registers. The result being that
    for NTSC bottom-top field order, the CSI would swap fields and
    capture in top-bottom order.

    Instead, base field swap on the field order of the input to the CSI,
    and the field order of the requested output. If the input/output
    fields are sequential but different, swap fields, otherwise do
    not swap. This requires passing both the input and output mbus
    frame formats to ipu_csi_init_interface().

    Move this code to a new private function ipu_csi_set_bt_interlaced_codes()
    that programs the CCIR_CODE_1/2 registers for interlaced BT.656 (and
    possibly interlaced BT.1120 in the future).

    When detecting input video standard from the input frame width/height,
    make sure to double height if input field type is alternate, since
    in that case input height only includes lines for one field.

    Signed-off-by: Steve Longerbeam
    Reviewed-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Steve Longerbeam
     

05 Nov, 2018

2 commits


19 Dec, 2017

1 commit


08 Jun, 2017

1 commit


16 Mar, 2017

1 commit


15 Mar, 2017

2 commits

  • The IPUv3 can read 8-bit alpha values from a separate IDMAC channel driven
    by the Alpha Transparency Controller (ATC) for the graphics IDMAC channels.
    This allows to reduce memory bandwidth via a conditional read mechanism or
    to support planar YUV formats with alpha transparency.

    Signed-off-by: Philipp Zabel

    Philipp Zabel
     
  • When disabling the foreground DP channel during a modeset, the DC is
    already disabled without waiting for end of frame. There is no reason
    to wait for a frame boundary before updating the DP registers in that
    case.
    Add support to apply updates immediately. No functional changes, yet.

    Signed-off-by: Philipp Zabel
    Reviewed-by: Lucas Stach

    Philipp Zabel
     

07 Nov, 2016

1 commit


20 Oct, 2016

1 commit


19 Sep, 2016

1 commit


29 Aug, 2016

2 commits

  • Adds functions to link and unlink source channels to sink
    channels in the FSU:

    int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch);
    int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch);

    The channels numbers are usually IDMAC channels, but they can also be
    channels that do not transfer data to or from memory. The following
    convenience functions can be used in place of ipu_fsu_link/unlink()
    when both source and sink channels are IDMAC channels:

    int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink);
    int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink);

    So far the following links are supported:

    IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC
    PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF
    IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP
    IPUV3_CHANNEL_CSI_DIRECT -> IPUV3_CHANNEL_CSI_VDI_PREV

    More links can be added to the fsu_link_info[] array.

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Philipp Zabel

    Steve Longerbeam
     
  • Adds the Video Deinterlacer (VDIC) unit.

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Philipp Zabel

    Steve Longerbeam
     

08 Aug, 2016

5 commits


13 Jul, 2016

1 commit

  • For all video modes we support currently, we always get 2 slots for
    a plane by using the current existing dynamic DMFC FIFO allocation
    mechanism. So, let's change to use the static one to simplify the
    code. This also makes it easier to implement the atomic mode setting
    as we don't need to handle allocation failure cases then.

    Signed-off-by: Liu Ying
    Acked-by: Daniel Vetter
    Signed-off-by: Philipp Zabel

    Liu Ying
     

23 May, 2016

1 commit

  • The component master driver imx-drm-core matches component devices using
    their of_node. Since commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc
    module autoloading"), the imx-ipuv3-crtc dev->of_node is not set during
    probing. Before that, of_node was set and caused an of: modalias to be
    used instead of the platform: modalias, which broke module autoloading.

    On the other hand, if dev->of_node is not set yet when the imx-ipuv3-crtc
    probe function calls component_add, component matching in imx-drm-core
    fails. While dev->of_node will be set once the next component tries to
    bring up the component master, imx-drm-core component binding will never
    succeed if one of the crtc devices is probed last.

    Add of_node to the component platform data and match against the
    pdata->of_node instead of dev->of_node in imx-drm-core to work around
    this problem.

    Cc: # 4.4.x
    Fixes: 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading")
    Signed-off-by: Philipp Zabel
    Tested-by: Fabio Estevam
    Tested-by: Lothar Waßmann
    Tested-by: Heiko Schocher
    Tested-by: Chris Ruehl

    Philipp Zabel
     

31 Mar, 2016

3 commits


24 Nov, 2015

1 commit


31 Mar, 2015

1 commit

  • This patch consolidates the different interface_pix_fmt, pixel_fmt, pix_fmt,
    and pixfmt variables to a common name "bus_format" wherever they describe the
    pixel format on the bus between display controller and encoder hardware.
    At the same time, it renames imx_drm_panel_format to imx_drm_set_bus_format.

    Signed-off-by: Philipp Zabel
    Tested-by: Emil Renner Berthing

    Philipp Zabel
     

08 Jan, 2015

2 commits

  • This patch changes struct ipu_di_signal_cfg to use struct videomode
    to define video timings and flags.

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Philipp Zabel

    Steve Longerbeam
     
  • On some monitors, high resolution modes are not working, exhibiting
    pixel column truncation problems (for example, 1280x1024 displays as
    1280x1022).

    The function ipu_di_adjust_videomode() aims to fix these issues by
    adjusting a passed videomode to IPU restrictions. The function can
    be called from the drm_crtc_helper_funcs->mode_fixup() methods.

    Signed-off-by: Jiada Wang
    Signed-off-by: Deepak Das
    Signed-off-by: Steve Longerbeam
    Signed-off-by: Philipp Zabel

    Jiada Wang
     

02 Sep, 2014

9 commits