Skip to content
Permalink
Jacopo-Mondi/m…
Switch branches/tags

Commits on Feb 11, 2022

  1. media: imx: Remove reference to i.MX7 from driver

    Remove the references to the i.MX7 in the driver description and expand
    it with more information about the IP core the driver controls.
    
    Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
    jmondi authored and intel-lab-lkp committed Feb 11, 2022
  2. media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c

    Rename the imx7-mipi-csis.c driver to remove the reference to i.MX7.
    
    The driver is for an IP core found on i.MX7 and i.MX8 SoC so do not
    specify a SoC version number in the driver name.
    
    Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
    jmondi authored and intel-lab-lkp committed Feb 11, 2022
  3. media: imx: De-stage imx7-mipi-csis

    The imx7-mipi-csis driver is in a good state and can be staged.
    
    Move the imx7-mipi-csis.c driver to the newly created
    drivers/media/platform/imx directory and plumb the related
    options in Kconfig and in Makefile.
    
    Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
    jmondi authored and intel-lab-lkp committed Feb 11, 2022

Commits on Jan 24, 2022

  1. media: mtk-cir: simplify code

    Re-write without unnecessary shifts.
    
    Cc: Sean Wang <sean.wang@mediatek.com>
    Cc: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    seanyoung authored and mchehab committed Jan 24, 2022
  2. media: mtk-cir: remove superfluous ir_raw_event_reset()

    This IR receiver has two limitations:
    
    1) Any IR pulse or space longer than 12ms will be truncated to 12ms
    
    2) Any pulses/spaces after the first 68 are lost
    
    ir_raw_event_reset() won't help here. If the IR cannot be decoded, any
    decoder should reset itself, and if it does not, this is a bug in the
    decoder.
    
    Cc: Sean Wang <sean.wang@mediatek.com>
    Cc: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    seanyoung authored and mchehab committed Jan 24, 2022
  3. media: mtk-cir: reduce message end to fix nec repeats

    The ir receiver generates an interrupt with the IR data, once a space of
    at least ok_count is has been seen. Currently this is about 110ms; when
    holding down a button on a nec remote, no such space is seen until the
    button is released. This means nothing happens until you release the
    button.
    
    The sample rate is fixed at 46us, so the maximum space that can be
    encoded is about 12ms. So, the set ok_count above that at 23ms.
    
    Cc: Sean Wang <sean.wang@mediatek.com>
    Cc: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    seanyoung authored and mchehab committed Jan 24, 2022
  4. media: lirc: simplify gap calculation

    When a driver reports a timeout, no more IR activity will be reported
    until the next pulse. A space is inserted between the timeout and the
    next pulse, based on ktime.
    
    The timeout reports already a duration, so this duration should not be
    added to the gap. Otherwise there is no change to the functionality.
    
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    seanyoung authored and mchehab committed Jan 24, 2022
  5. media: ir_toy: free before error exiting

    Fix leak in error path.
    
    Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    PeiweiHu authored and mchehab committed Jan 24, 2022

Commits on Jan 23, 2022

  1. media: mtk-vcodec: Remove mtk_vcodec_release_enc_pm

    There are only two lines in mtk_vcodec_release_enc_pm, using
    pm_runtime_disable and put_device instead directly.
    
    Move pm_runtime_enable outside mtk_vcodec_release_enc_pm to symmetry with
    pm_runtime_disable, after that, rename mtk_vcodec_init_enc_pm to *_clk
    since it only has clock operations now.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Signed-off-by: Yong Wu <yong.wu@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  2. media: mtk-vcodec: Remove mtk_vcodec_release_dec_pm

    There are only two lines in mtk_vcodec_release_dec_pm, using
    pm_runtime_disable and put_device instead directly.
    
    Move pm_runtime_enable outside mtk_vcodec_init_dec_pm to symmetry with
    pm_runtime_disable, after that, rename mtk_vcodec_init_dec_pm to *_clk
    since it only has clock operations now.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Signed-off-by: Yong Wu <yong.wu@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  3. media: mtk-vcodec: Use codec type to separate different hardware

    There is just one core thread, in order to separate different
    hardware, using codec type to separeate it in scp driver.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  4. media: mtk-vcodec: Add core dec and dec end ipi msg

    Add core dec and dec end ipi msg:
    AP_IPIMSG_DEC_CORE/AP_IPIMSG_DEC_CORE_END.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  5. media: mtk-vcodec: Support 34bits dma address for vdec

    Use the dma_set_mask_and_coherent helper to set vdec
    DMA bit mask to support 34bits iova space(16GB) that
    the mt8192 iommu HW support.
    
    Whole the iova range separate to 0~4G/4G~8G/8G~12G/12G~16G,
    regarding which iova range VDEC actually locate, it
    depends on the dma-ranges property of vdec dtsi node.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  6. media: mtk-vcodec: Add work queue for core hardware decode

    Add work queue to process core hardware information.
    First, get lat_buf from message queue, then call core
    hardware of each codec(H264/VP9/AV1) to decode, finally
    puts lat_buf back to the message.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Steve Cho <stevecho@chromium.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  7. media: mtk-vcodec: Add new interface to lock different hardware

    For add new hardware, not only need to lock lat hardware, also
    need to lock core hardware in case of different instance start
    to decoder at the same time.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  8. media: mtk-vcodec: Generalize power and clock on/off interfaces

    Generalizes power and clock on/off interfaces to support different
    hardware.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  9. media: mtk-vcodec: Add msg queue feature for lat and core architecture

    For lat and core architecture, lat thread will send message to core
    thread when lat decode done. Core hardware will use the message
    from lat to decode, then free message to lat thread when decode done.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  10. media: mtk-vcodec: Add irq interface for multi hardware

    Adds irq interface for multi hardware.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  11. media: mtk-vcodec: Use pure single core for MT8183

    Separates different architecture for hardware: pure_sin_core
    and lat_sin_core. MT8183 is pure single core. Uses .hw_arch to
    distinguish.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  12. media: mtk-vcodec: Add to support multi hardware decode

    There are more than two hardwares for decoder: LAT0, LAT1 and CORE. In
    order to manage these hardwares, register each hardware as independent
    platform device for the larbs are different.
    
    Each hardware module controls its own information which includes
    interrupt/power/clocks/registers.
    
    Calling of_platform_populate in parent device, and use subdev_bitmap to
    record whether the hardwares are registered.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Steve Cho <stevecho@chromium.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  13. media: mtk-vcodec: Support MT8192

    Adds MT8192's compatible "mediatek,mt8192-vcodec-dec".
    Adds MT8192's device private data mtk_lat_sig_core_pdata.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  14. media: dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for m…

    …t8192
    
    Adds decoder dt-bindings for mt8192.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  15. media: dt-bindings: media: mtk-vcodec: Separate video encoder and dec…

    …oder dt-bindings
    
    Separate decoder and encoder document for the dts are big difference.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  16. media: mtk-vcodec: export decoder pm functions

    When mtk vcodec decoder is build as a module, we need to export
    mtk-vcodec-dec pm functions to make them visible by the other components.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  17. media: mtk-vcodec: Refactor vcodec pm interface

    Using the needed params for pm init/release function and remove unused
    param mtkdev in 'struct mtk_vcodec_pm'.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Steve Cho <stevecho@chromium.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  18. media: mtk-vcodec: Align vcodec wake up interrupt interface

    Vdec and venc can use the same function to wake up interrupt event.
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Steve Cho <stevecho@chromium.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  19. media: mtk-vcodec: Get numbers of register bases from DT

    Different platforms may have different numbers of register bases. Gets the
    numbers of register bases from dts (sizeof(u32) * 4 bytes for each).
    
    Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
    Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    yunfeidongmediatek authored and mchehab committed Jan 23, 2022
  20. media: hevc: Embedded indexes in RPS

    Reference Picture Set lists provide indices of short and long term
    reference in DBP array.
    Fix Hantro to not do a look up in DBP entries.
    Make documentation more clear about it.
    
    [hverkuil: fix typo in commit log]
    
    Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    Benjamin Gaignard authored and mchehab committed Jan 23, 2022
  21. media: hevc: Remove RPS named flags

    Marking a picture as long-term reference is valid for DPB but not for RPS.
    Change flag name to match with the description in HEVC spec chapter
    "8.3.2 Decoding process for reference picture set".
    
    PocStCurrBefore, PocStCurrAfter, PocLtCurr lists could be built by the
    kernel from the DPB entries struct v4l2_hevc_dpb_entry, using the
    information in the rps field. This way RPS flags becomes useless and are
    removed.
    
    This patch breaks the staging HEVC API because it introduces a new flag,
    changes a field name in v4l2_hevc_dpb_entry structure and removes
    V4L2_HEVC_DPB_ENTRY_RPS_* flags.
    
    [hverkuil: fixed some typos]
    
    Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
    Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    Benjamin Gaignard authored and mchehab committed Jan 23, 2022
  22. media: atmel: atmel-isc: add raw Bayer 8bit 10bit output formats

    The ISC can dump the 8 bit and 10 bit raw bayer formats directly to
    the memory.
    Thus, add them to the supported output format list.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
  23. media: atmel: atmel-sama7g5-isc: fix UYVY input format mbus_code typo

    Fix the mbus code for UYVY input format type to the right color rotation.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
  24. media: atmel: atmel-isc-base: clamp wb gain coefficients

    White balance computed gains can overflow above the 13 bits hardware
    coefficient that can be used, in some specific scenarios like a subexposure
    from the sensor when the image is mostly black.
    In this case the computed gain has to be clamped to the maximum value
    allowed by the hardware.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
  25. media: atmel: atmel-isc-base: add wb debug messages

    Add debug messages that make it easier to debug white balance algorithm.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
  26. media: atmel: atmel-isc-base: fix bytesperline value for planar formats

    The bytesperline field of the pixfmt should be only for the first plane
    in case of planar formats like YUV420 or YUV422.
    The bytesperline is used by the driver to compute the framesize.
    We have to report a different bpp (bytes per pixel) to v4l2 in bytesperline
    than the actual bpp.
    For example for YUV420, the real bpp is 12, but the first plane has only
    8 bpp. Thus we report a bytesperline 8*width instead of 12*width.
    However, for real framezise we have to compute 12*width*height.
    Hence added a new variable to hold this information and to correctly
    compute the frame size.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
  27. media: atmel: atmel-isc-base: report frame sizes as full supported range

    The ISC supports a full broad range of frame sizes.
    Until now, the subdevice was queried for possible frame sizes and these
    were reported to the user space.
    However, the ISC should not care about which frame sizes the subdev
    supports, as long as this frame size is supported.
    Thus, report a continuous range from smallest frame size up to the max
    resolution.
    
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    ehristev authored and mchehab committed Jan 23, 2022
Older