Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GIT PULL] media updates for v5.15-rc1 #3

Closed
wants to merge 197 commits into from

Commits on Jul 12, 2021

  1. media: dvbsky: add support for MyGica T230C2_LITE and T230A

    Add Geniatech MyGica T230C2_LITE and T230A as many people
    are asking support for these devices on forums.
    
    Link: https://lore.kernel.org/linux-media/YMuptIYFLdwSmw//@kali
    
    Signed-off-by: Ján Čáni <pego149@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pego149 authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    387caeb View commit details
    Browse the repository at this point in the history
  2. media: include/uapi/linux/cec.h: typo: SATERDAY -> SATURDAY

    Fix typo in a define: CEC_OP_REC_SEQ_SATERDAY -> CEC_OP_REC_SEQ_SATURDAY
    
    This isn't used yet in actual applications to the best of my knowledge,
    and it certainly doesn't break the ABI since the value doesn't change.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    caa7302 View commit details
    Browse the repository at this point in the history
  3. media: gspca: Drop default m

    Drop the "default m", as options should default to disabled.
    No other media driver is enabled by default.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    2a621b0 View commit details
    Browse the repository at this point in the history
  4. media: dib8000: rewrite the init prbs logic

    The logic at dib8000_get_init_prbs() has a few issues:
    
    1. the tables used there has an extra unused value at the beginning;
    2. the dprintk() message doesn't write the right value when
       transmission mode is not 8K;
    3. the array overflow validation is done by the callers.
    
    Rewrite the code to fix such issues.
    
    This should also shut up those smatch warnings:
    
    	drivers/media/dvb-frontends/dib8000.c:2125 dib8000_get_init_prbs() error: buffer overflow 'lut_prbs_8k' 14 <= 14
    	drivers/media/dvb-frontends/dib8000.c:2129 dib8000_get_init_prbs() error: buffer overflow 'lut_prbs_2k' 14 <= 14
    	drivers/media/dvb-frontends/dib8000.c:2131 dib8000_get_init_prbs() error: buffer overflow 'lut_prbs_4k' 14 <= 14
    	drivers/media/dvb-frontends/dib8000.c:2134 dib8000_get_init_prbs() error: buffer overflow 'lut_prbs_8k' 14 <= 14
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    8db11ae View commit details
    Browse the repository at this point in the history
  5. media: sti: don't copy past the size

    The logic at delta_ipc_open() tries to copy past the size of
    the name passed to it:
    
    	drivers/media/platform/sti/delta/delta-ipc.c:178 delta_ipc_open() error: __memcpy() 'name' too small (17 vs 32)
    
    Basically,this function is called just one with:
    
    	ret = delta_ipc_open(pctx, "JPEG_DECODER_HW0", ...);
    
    The string used there has just 17 bytes. Yet, the logic tries
    to copy the entire name size (32 bytes), which is plain wrong.
    
    Replace it by strscpy, which is good enough to copy the string,
    warranting that this will be NUL-terminated.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    54e80d9 View commit details
    Browse the repository at this point in the history
  6. media: uvc: don't do DMA on stack

    As warned by smatch:
    	drivers/media/usb/uvc/uvc_v4l2.c:911 uvc_ioctl_g_input() error: doing dma on the stack (&i)
    	drivers/media/usb/uvc/uvc_v4l2.c:943 uvc_ioctl_s_input() error: doing dma on the stack (&i)
    
    those two functions call uvc_query_ctrl passing a pointer to
    a data at the DMA stack. those are used to send URBs via
    usb_control_msg(). Using DMA stack is not supported and should
    not work anymore on modern Linux versions.
    
    So, use a kmalloc'ed buffer.
    
    Cc: stable@vger.kernel.org	# Kernel 4.9 and upper
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    1a10d7f View commit details
    Browse the repository at this point in the history
  7. media: ivtv: prevent going past the hw arrays

    As warned by smatch:
    
    	drivers/media/pci/ivtv/ivtv-i2c.c:245 ivtv_i2c_register() error: buffer overflow 'hw_devicenames' 21 <= 31
    	drivers/media/pci/ivtv/ivtv-i2c.c:266 ivtv_i2c_register() error: buffer overflow 'hw_addrs' 21 <= 31
    	drivers/media/pci/ivtv/ivtv-i2c.c:269 ivtv_i2c_register() error: buffer overflow 'hw_addrs' 21 <= 31
    	drivers/media/pci/ivtv/ivtv-i2c.c:275 ivtv_i2c_register() error: buffer overflow 'hw_addrs' 21 <= 31
    	drivers/media/pci/ivtv/ivtv-i2c.c:280 ivtv_i2c_register() error: buffer overflow 'hw_addrs' 21 <= 31
    	drivers/media/pci/ivtv/ivtv-i2c.c:290 ivtv_i2c_register() error: buffer overflow 'hw_addrs' 21 <= 31
    
    The logic at ivtv_i2c_register() could let buffer overflows at
    hw_devicenames and hw_addrs arrays.
    
    This won't happen in practice due to a carefully-contructed
    logic, but it is not error-prune.
    
    Change the logic in a way that will make clearer that the
    I2C hardware flags will affect the size of those two
    arrays, and add an explicit check to avoid buffer overflows.
    
    While here, use the bit macro.
    
    Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    ed638b1 View commit details
    Browse the repository at this point in the history
  8. media: hevc: Add segment address field

    If HEVC frame consists of multiple slices, segment address has to be
    known in order to properly decode it.
    
    Add segment address field to slice parameters.
    
    Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    jernejsk authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    229e5bd View commit details
    Browse the repository at this point in the history
  9. media: cedrus: hevc: Add support for multiple slices

    Now that segment address is available, support for multi-slice frames
    can be easily added.
    
    Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    jernejsk authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    d92a4a2 View commit details
    Browse the repository at this point in the history
  10. media: drivers/media/pci/tw5864/Tw5864-reg.h: fix typo issues

    change 'syncrous' into 'synchronous'
    
    Signed-off-by: Herman <yanshuaijun@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Herman authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    e481ff3 View commit details
    Browse the repository at this point in the history
  11. media: drivers/media/usb/gspca: fix typo Fliker -> Flicker

    Change 'Fliker' into 'Flicker'.
    
    Signed-off-by: Herman <yanshuaijun@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Herman authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    9a58288 View commit details
    Browse the repository at this point in the history
  12. media: atomisp: remove redundant initialization of variable ret

    The variable ret is being initialized with a value that is never read,
    it is being updated later on. The assignment is redundant and can be
    removed.
    
    Addresses-Coverity: ("Unused value")
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Colin Ian King authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    b6ef5c1 View commit details
    Browse the repository at this point in the history
  13. media: atmel: atmel-sama5d2-isc: fix YUYV format

    SAMA5D2 does not have the YCYC field for the RLP (rounding, limiting,
    packaging) module.
    The YCYC field is supposed to work with interleaved YUV formats like YUYV.
    In SAMA5D2, we have to use YYCC field, which is used for both planar
    formats like YUV420 and interleaved formats like YUYV.
    Fix the according rlp callback to replace the generic YCYC field (which
    makes more sense from a logical point of view) with the required YYCC
    field.
    
    Fixes: debfa49 ("media: atmel: atmel-isc-base: add support for more formats and additional pipeline modules")
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ehristev authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    123aaf8 View commit details
    Browse the repository at this point in the history
  14. media: drivers/media/platform/davinci/vpfe_capture.c : fix typo Proab…

    …ably > Probably
    
    Change 'Proabably' into 'Probably'.
    
    Signed-off-by: Herman <yanshuaijun@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Herman authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    983eb35 View commit details
    Browse the repository at this point in the history
  15. media: i2c: tvp5150: deleted the repeated word

    deleted the repeated word 'the' in the comments.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    331ca86 View commit details
    Browse the repository at this point in the history
  16. media: saa7134: switch from 'pci_' to 'dma_' API

    The wrappers in include/linux/pci-dma-compat.h should go away.
    
    The patch has been generated with the coccinelle script below and has been
    hand modified to replace GFP_ with a correct flag.
    It has been compile tested.
    
    When memory is allocated in 'saa7134_pgtable_alloc()', GFP_KERNEL can be
    used because its 4 callers (one function calls it 2 times, so there is
    only 3 functions that call it):
    
    .hw_params in a struct snd_pcm_ops (saa7134-alsa.c)
      --> snd_card_saa7134_hw_params   (saa7134-alsa.c)
        --> saa7134_pgtable_alloc
    ==> .hw_params function can use GFP_KERNEL
    
    saa7134_initdev                    (saa7134-core.c)
      --> saa7134_hwinit1              (saa7134-core.c)
        --> saa7134_ts_init1           (saa7134-ts.c)
          --> saa7134_pgtable_alloc
    ==> saa7134_initdev already uses GFP_KERNEL
    
    saa7134_initdev                    (saa7134-core.c)
      --> saa7134_hwinit1              (saa7134-core.c)
        --> saa7134_video_init1        (saa7134-video.c)
          --> saa7134_pgtable_alloc    (called 2 times)
    ==> saa7134_initdev already uses GFP_KERNEL
    
    and no spin_lock is taken in the between.
    
    @@ @@
    -    PCI_DMA_BIDIRECTIONAL
    +    DMA_BIDIRECTIONAL
    
    @@ @@
    -    PCI_DMA_TODEVICE
    +    DMA_TO_DEVICE
    
    @@ @@
    -    PCI_DMA_FROMDEVICE
    +    DMA_FROM_DEVICE
    
    @@ @@
    -    PCI_DMA_NONE
    +    DMA_NONE
    
    @@
    expression e1, e2, e3;
    @@
    -    pci_alloc_consistent(e1, e2, e3)
    +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
    
    @@
    expression e1, e2, e3;
    @@
    -    pci_zalloc_consistent(e1, e2, e3)
    +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_free_consistent(e1, e2, e3, e4)
    +    dma_free_coherent(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_map_single(e1, e2, e3, e4)
    +    dma_map_single(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_single(e1, e2, e3, e4)
    +    dma_unmap_single(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4, e5;
    @@
    -    pci_map_page(e1, e2, e3, e4, e5)
    +    dma_map_page(&e1->dev, e2, e3, e4, e5)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_page(e1, e2, e3, e4)
    +    dma_unmap_page(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_map_sg(e1, e2, e3, e4)
    +    dma_map_sg(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_sg(e1, e2, e3, e4)
    +    dma_unmap_sg(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
    +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
    +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
    +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
    +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2;
    @@
    -    pci_dma_mapping_error(e1, e2)
    +    dma_mapping_error(&e1->dev, e2)
    
    @@
    expression e1, e2;
    @@
    -    pci_set_dma_mask(e1, e2)
    +    dma_set_mask(&e1->dev, e2)
    
    @@
    expression e1, e2;
    @@
    -    pci_set_consistent_dma_mask(e1, e2)
    +    dma_set_coherent_mask(&e1->dev, e2)
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tititiou36 authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    bc3db19 View commit details
    Browse the repository at this point in the history
  17. media: drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c : fix typo 'in…

    … deed imporant' > 'indeed important'
    
    Change 'imporant' into 'important'.
    
    Signed-off-by: Herman <yanshuaijun@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Herman authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    d229a91 View commit details
    Browse the repository at this point in the history
  18. media: TDA1997x: enable EDID support

    Without this patch, the TDA19971 chip's EDID is inactive.
    EDID never worked with this driver, it was all tested with HDMI signal
    sources which don't need EDID support.
    
    Signed-off-by: Krzysztof Halasa <khalasa@piap.pl>
    Fixes: 9ac0038 ("media: i2c: Add TDA1997x HDMI receiver driver")
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    ea3e1c3 View commit details
    Browse the repository at this point in the history
  19. media: vivid: increase max number of allowed

    The max number of allowed logical addresses was set to 1 in
    vivid, for no good reason. This prevented testing with multiple
    logical addresses for the same CEC device. Increase this number to
    CEC_MAX_LOG_ADDRS.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    40c7f9c View commit details
    Browse the repository at this point in the history
  20. media: drivers/media/platform/marvell-ccic/mcam-core.c : fix typo 'ge…

    …ttig' > 'getting'
    
    Change 'gettig' into 'getting'.
    
    Signed-off-by: Herman <yanshuaijun@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Herman authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    46fdc30 View commit details
    Browse the repository at this point in the history
  21. media: saa7134: convert list_for_each to entry variant

    Convert list_for_each() to list_for_each_entry() where
    applicable.
    
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Yang Yingliang authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    3f3475a View commit details
    Browse the repository at this point in the history
  22. media: saa7164: remove redundant continue statement

    The continue statement at the end of a for-loop has no effect,
    remove it.
    
    Addresses-Coverity: ("Continue has no effect")
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Colin Ian King authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    afaff55 View commit details
    Browse the repository at this point in the history
  23. media: ti-vpe: cal: add g/s_parm for legacy API

    v4l2-compliance complains about g/s_parm when using the non-MC API. Fix
    it by adding the functions and just call v4l2_s/g_parm_cap for the
    phy subdev.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    4e11f02 View commit details
    Browse the repository at this point in the history
  24. media: ti-vpe: cal: fix error handling in cal_camerarx_create

    cal_camerarx_create() doesn't handle error returned from
    cal_camerarx_sd_init_cfg(). Fix this.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    918d6d1 View commit details
    Browse the repository at this point in the history
  25. media: ti-vpe: cal: remove unused cal_camerarx->dev field

    cal_camerarx->dev field is not used, remove it.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    97a2c65 View commit details
    Browse the repository at this point in the history
  26. media: ti-vpe: cal: rename "sensor" to "source"

    CAL driver uses "sensor" name to refer to the subdev connected to CAL.
    As the subdev can also be a bridge, the naming is misleading and might
    cause the reader to think it refers to the actual sensor at the end of
    the pipeline.
    
    Rename "sensor" to "source".
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    27f86b9 View commit details
    Browse the repository at this point in the history
  27. media: ti-vpe: cal: move global config from cal_ctx_wr_dma_config to …

    …runtime resume
    
    For some reason CAL_CTRL is written at the end of cal_ctx_wr_dma_config.
    CAL_CTRL is a global (for CAL) register, so it should be independent of
    contexts.
    
    Move the code to cal_runtime_resume().
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    93080e2 View commit details
    Browse the repository at this point in the history
  28. media: ti-vpe: cal: use v4l2_get_link_freq

    CAL driver uses V4L2_CID_PIXEL_RATE to get the required pixel rate, and
    then changes that value to link rate before configuring the registers.
    
    Rewrite the code to use v4l2_get_link_freq(), which simplifies the code
    as we get the link rate directly, and it also adds support for
    V4L2_CID_LINK_FREQ.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    bbdb9ae View commit details
    Browse the repository at this point in the history
  29. media: ti-vpe: cal: add cal_ctx_prepare/unprepare

    In the following patches we need to do context configuration which might
    fail. Add new functions, cal_ctx_prepare and cal_ctx_unprepare, to
    handle such configuration.
    
    [hverkuil: fix spurious newline checkpatch warning]
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    2e63c4c View commit details
    Browse the repository at this point in the history
  30. media: ti-vpe: cal: change index and cport to u8

    cal_ctx's index and cport fields are numbers less than 8. In the
    following patches we will get a bunch of new fields, all of which are
    similar small numbers, so lets change the type to u8.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    05b12b5 View commit details
    Browse the repository at this point in the history
  31. media: ti-vpe: cal: Add CSI2 context

    CAL has 8 CSI2 contexts per PHY, which are used to tag the incoming
    data.  The current driver only uses the first context, but we need to
    support all of them to implement multi-stream support.
    
    Add a csi2_ctx field to cal_ctx, which indicates which of the 8 CSI2
    contexts is used for the particular cal_ctx. Also clean up the context
    register macros to take the CSI2 context number as a parameter.
    
    Note that before this patch the CSI2 context used for both PHYs was
    always 0. This patch always uses cal_ctx index number as the CSI2
    context. There is no functional difference, but this approach will work
    also in the future when we use more than 1 CSI2 context per PHY.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    6266dde View commit details
    Browse the repository at this point in the history
  32. media: ti-vpe: cal: Add pixel processing context

    CAL has 4 pixel processing contexts (PIX PROC) of which the driver
    currently uses pix proc 0 for PHY0, and pix proc 1 for PHY1 (as the
    driver supports only a single source per PHY).
    
    Add a pix_proc field to cal_ctx to allow us to use different pix proc
    contexts in the future
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    0de6f41 View commit details
    Browse the repository at this point in the history
  33. media: ti-vpe: cal: rename cal_ctx->index to dma_ctx

    Rename cal_ctx->index to dma_ctx to clarify that the field refers to the
    DMA context number.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    42a1364 View commit details
    Browse the repository at this point in the history
  34. media: ti-vpe: cal: rename CAL_HL_IRQ_MASK

    CAL_HL_IRQ_MASK macro is used for both WDMA start and end status bits.
    For clarity, rename CAL_HL_IRQ_MASK macro to CAL_HL_IRQ_WDMA_END_MASK
    and CAL_HL_IRQ_WDMA_START_MASK.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    2eef9ee View commit details
    Browse the repository at this point in the history
  35. media: ti-vpe: cal: clean up CAL_CSI2_VC_IRQ_* macros

    The macros related to CAL_CSI2_VC_IRQ can be handled better by having
    the VC number as a macro parameter.
    
    Note that the macros are not used anywhere yet, so no other changes are
    needed.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    aece634 View commit details
    Browse the repository at this point in the history
  36. media: ti-vpe: cal: catch VC errors

    CAL driver currently ignores VC related errors. To help catch error
    conditions, enable all the VC error interrupts and handle them in the
    interrupt handler by printing an error.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    3b1fe1a View commit details
    Browse the repository at this point in the history
  37. media: ti-vpe: cal: remove wait when stopping camerarx

    Asserting ComplexIO reset seems to affect the HW (ie. asserting reset
    will break an active capture), but the RESET_DONE bit never changes to
    "reset is ongoing" state. Thus we always get a timeout.
    
    Drop the wait, as it seems to achieve nothing.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    af981fc View commit details
    Browse the repository at this point in the history
  38. media: ti-vpe: cal: disable csi2 ctx and pix proc at ctx_stop

    Disable CSI2 context and pix proc in cal_ctx_stop() to ensure they are
    not used if the same context is used later on a different PHY or without
    pix proc.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    38f7435 View commit details
    Browse the repository at this point in the history
  39. media: ti-vpe: cal: allocate pix proc dynamically

    CAL has 4 pixel processing units but the units are not needed e.g. for
    metadata. As we could be capturing 4 pixel streams and 4 metadata
    streams, i.e. using 8 DMA contexts, we cannot assign a pixel processing
    unit to every DMA context. Instead we need to reserve a pixel processing
    unit only when needed.
    
    Add functions to reserve and release a pix proc unit, and use them in
    cal_ctx_prepare/unprepare. Note that for the time being we still always
    reserve a pix proc unit.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    4cb3a0f View commit details
    Browse the repository at this point in the history
  40. media: ti-vpe: cal: add 'use_pix_proc' field

    We already have functions to reserve and release a pix proc unit, but we
    always reserve such and the code expects the pix proc unit to be used.
    
    Add a new field, 'use_pix_proc', to indicate if the pix prox unit has
    been reserved and should be used. Use the flag to skip programming pix
    proc unit when not needed.
    
    Note that we still always set the use_pix_proc flag to true.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    8927a9f View commit details
    Browse the repository at this point in the history
  41. media: ti-vpe: cal: add cal_ctx_wr_dma_enable and fix a race

    I have not noticed any errors due to this, but the DMA configuration
    looks racy. Setting the DMA mode bitfield in CAL_WR_DMA_CTRL supposedly
    enables the DMA. However, the driver currently a) continues configuring
    the DMA after setting the mode, and b) enables the DMA interrupts only
    after setting the mode.
    
    This probably doesn't cause any issues as there should be no data coming
    in to the DMA yet, but it's still better to fix this.
    
    Add a new function, cal_ctx_wr_dma_enable(), to set the DMA mode field,
    and call that function only after the DMA config and the irq enabling
    has been done.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    1a7adfd View commit details
    Browse the repository at this point in the history
  42. media: ti-vpe: cal: add vc and datatype fields to cal_ctx

    In preparation for supporting multiple virtual channels and datatypes,
    add vc and datatype fields to cal_ctx, initialize them to the currently
    used values, and use those fields when writing to the register.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    7d167e6 View commit details
    Browse the repository at this point in the history
  43. media: ti-vpe: cal: handle cal_ctx_v4l2_register error

    cal_async_notifier_complete() doesn't handle errors returned from
    cal_ctx_v4l2_register(). Add the error handling.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    a6c9aad View commit details
    Browse the repository at this point in the history
  44. media: ti-vpe: cal: set field always to V4L2_FIELD_NONE

    cal_camerarx_sd_set_fmt() accepts any value for the format field, but
    there should be no reason to have any other value accepted than
    V4L2_FIELD_NONE. So set the field always to V4L2_FIELD_NONE.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    37fa1d2 View commit details
    Browse the repository at this point in the history
  45. media: ti-vpe: cal: fix typo in a comment

    Fix a typo in a comment in cal_camerarx_sd_set_fmt().
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    d3409a6 View commit details
    Browse the repository at this point in the history
  46. media: ti-vpe: cal: add mbus_code support to cal_mc_enum_fmt_vid_cap

    Commit e5b6b07 ("media: v4l2: Extend VIDIOC_ENUM_FMT to support
    MC-centric devices") added support to enumerate formats based on
    mbus-code.
    
    Add this feature to cal driver.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    7f9f812 View commit details
    Browse the repository at this point in the history
  47. media: ti-vpe: cal: rename non-MC funcs to cal_legacy_*

    To make it more obvious if the function in question is dealing with
    media-controller API or the legacy API, rename legacy API functions to
    cal_legacy_*.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    e6a800d View commit details
    Browse the repository at this point in the history
  48. media: ti-vpe: cal: init ctx->v_fmt correctly in MC mode

    CAL driver enumerates mbus codes in the connected subdev to create a
    list of supported formats reported to userspace, and initializes
    ctx->v_fmt and ctx->fmtinfo to one of those formats.
    
    This works fine for legacy mode, but is not correct for MC mode, and the
    list is not even used in MC mode.
    
    Fix this by adding a new function, cal_ctx_v4l2_init_mc_format, which
    only initializes ctx->v_fmt and ctx->fmtinfo to a default value.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    8bfd1af View commit details
    Browse the repository at this point in the history
  49. media: ti-vpe: cal: remove cal_camerarx->fmtinfo

    struct cal_camerarx has fmtinfo field which is used to point to the
    current active input format. The only place where the field is used is
    cal_camerarx_get_ext_link_freq().
    
    With multiple streams the whole concept of single input format is not
    valid anymore, so lets remove the field by looking up the format in
    cal_camerarx_get_ext_link_freq(), making it easier to handle the
    multistream-case in the following patches.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    2e7e09a View commit details
    Browse the repository at this point in the history
  50. media: ti-vpe: cal: support 8 DMA contexts

    The current driver only ever needs 2 DMA contexts (one per PHY), but we
    need to use more of the 8 contexts to add support for multiple streams.
    
    Change the code so that we allocate DMA contexts as needed, which at
    this time is 1 per PHY, but could be up to 8.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    75e7e58 View commit details
    Browse the repository at this point in the history
  51. media: ti-vpe: cal: cleanup phy iteration in cal_remove

    Most of the driver has moved from ARRAY_SIZE(cal->phy) to
    cal->data->num_csi2_phy, but we have one place left in cal_remove. Also,
    checking for cal->phy[i] != NULL is not needed as we always have all the
    phys instantiated.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    b65836f View commit details
    Browse the repository at this point in the history
  52. media: ti-vpe: cal: fix ctx uninitialization

    Somewhere along the way the context uninitialization has gone a bit odd:
    
    * We have cal_ctx_create() but no matching destroy call, but we still
    need to call cal_ctx_v4l2_cleanup() for each context.
    
    * We have cal_media_cleanup() which calls cal_ctx_v4l2_cleanup() for all
    contexts, but cal_media_init() is not where the contexts are created.
    
    * The order of uninit steps in cal_remove() is different than the error
    handling path in cal_probe().
    
    * cal_probe()'s error handling calls cal_ctx_v4l2_cleanup() for each
    context, but also calls cal_media_clean(), doing the same context
    cleanup twice.
    
    So fix these, by introducing cal_ctx_destroy(), and using that in
    appropriate places instead of calling cal_ctx_v4l2_cleanup() in
    cal_media_clean(). Also use normal kzalloc (and kfree) instead of devm
    version as we anyway do manual cleanup for each context.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    9e67f24 View commit details
    Browse the repository at this point in the history
  53. media: ti-vpe: cal: fix queuing of the initial buffer

    When starting streaming the driver currently programs the buffer
    address to the CAL base-address register and assigns the buffer pointer
    to ctx->dma.pending. This is not correct, as the buffer is not
    "pending", but active, and causes the first buffer to be needlessly
    written twice.
    
    Fix this by assigning the buffer pointer to ctx->dma.active.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    892c37f View commit details
    Browse the repository at this point in the history
  54. media: ti-vpe: cal: add camerarx locking

    We don't have any locking in camerarx for the subdev ops. We have
    managed fine so far without locking, but in the future multiple video
    capture devices can use the same camerarx, and locking is a must.
    
    Add a mutex to protect the camerarx subdev ops. Some of the functions
    were slightly restructured to make lock handling cleaner.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    6cb0eee View commit details
    Browse the repository at this point in the history
  55. media: ti-vpe: cal: add camerarx enable/disable refcounting

    The following patches add multistream support and we will have multiple
    video devices using the same camerarx instances. Thus we need
    enable/disable refcounting for the camerarx.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    9eaca40 View commit details
    Browse the repository at this point in the history
  56. media: ti-vpe: cal: allow more than 1 source pads

    CAL RX has a single sink and a single source pad. To support multiple
    streams, we will have multiple source pads (up to 8, one for each
    CAL context).
    
    Change the driver to allow creating more source pads and change the code
    accordingly to handle multiple source pads. We still keep
    CAL_CAMERARX_NUM_SOURCE_PADS as 1, and the behavior is unchanged.
    
    Also rename CAL_CAMERARX_PAD_SOURCE to CAL_CAMERARX_PAD_FIRST_SOURCE to
    highlight that it's the first source.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    71e3a18 View commit details
    Browse the repository at this point in the history
  57. media: ti-vpe: cal: add embedded data support

    Add support for capturing embedded data from the sensor. The only
    difference with capturing pixel data and embedded data is that we need
    to ensure the PIX PROC is disabled for embedded data so that CAL doesn't
    repack the data.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tomba authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    f4a87d5 View commit details
    Browse the repository at this point in the history
  58. media: rc: streamzap: Removed unnecessary 'return'

    Removed unnecessary 'return'.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    e5dd864 View commit details
    Browse the repository at this point in the history
  59. media: rc: redrat3: Fix a typo

    Change 'an' to 'on'.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    adb08a0 View commit details
    Browse the repository at this point in the history
  60. media: rc: rc-main.c: deleted the repeated word

    deleted the repeated word 'the' in the comments.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    86541f0 View commit details
    Browse the repository at this point in the history
  61. media: cxd2880-spi: Fix an error handling path

    If an error occurs after a successful 'regulator_enable()' call,
    'regulator_disable()' must be called.
    
    Fix the error handling path of the probe accordingly.
    
    Fixes: cb496cd ("media: cxd2880-spi: Add optional vcc regulator")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tititiou36 authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    dcb0145 View commit details
    Browse the repository at this point in the history
  62. media: dvb-frontends: cx24117: Delete 'break' after 'goto'

    break is not useful after a goto, so delete 'break' after 'goto'.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    4acb04d View commit details
    Browse the repository at this point in the history
  63. media: usb: dvb-usb-v2: af9035: report if i2c client isn't bound

    If a sub device doesn't immediately bind after it was added, emit an
    error indication to the kernel log to help debugging. This happens for
    example if the needed driver isn't available at all.
    
    Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ukleinek authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    73415d7 View commit details
    Browse the repository at this point in the history
  64. media: usb: dvb-usb-v2: af9035: let subdrv autoselect enable si2168 a…

    …nd si2157
    
    The Logilink VG0022A DVB-T2 stick has these three devices. So to enable
    support for this stick in the presence of MEDIA_SUBDRV_AUTOSELECT,
    let DVB_USB_AF9035 select the two other drivers.
    
    Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ukleinek authored and mchehab committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    379e205 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2021

  1. media: rc-loopback: return number of emitters rather than error

    The LIRC_SET_TRANSMITTER_MASK ioctl should return the number of emitters
    if an invalid list was set.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    seanyoung authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    6b7f554 View commit details
    Browse the repository at this point in the history
  2. media: rc-loopback: use dev_dbg() rather than handrolled debug

    Make use of dynamic debug.
    
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    seanyoung authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    d9d0103 View commit details
    Browse the repository at this point in the history
  3. media: rc-loopback: send carrier reports

    When carrier reports are enabled, send them over loopback.
    
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    seanyoung authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    7300d0c View commit details
    Browse the repository at this point in the history
  4. media: rc-loopback: max_timeout of UINT_MAX does not work

    Any timeout larger than LIRC_VALUE_MASK cannot work for the lirc uapi.
    LIRC_VALUE_MASK is about 16 seconds which is more than enough.
    
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    seanyoung authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    5063454 View commit details
    Browse the repository at this point in the history
  5. media: rc: rename s_learning_mode() to s_wideband_receiver()

    The s_learning_mode() function is called in response to the ioctl
    LIRC_SET_WIDEBAND_RECEIVER, so rename it to s_wideband_receiver().
    
    Learning mode is when both the wideband receiver is turned on and
    carrier reports are enabled.
    
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    seanyoung authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    8b777ed View commit details
    Browse the repository at this point in the history
  6. media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init

    If dibusb_read_eeprom_byte fails, the mac address is not initialized.
    And nova_t_read_mac_address does not handle this failure, which leads to
    the uninit-value in dvb_usb_adapter_dvb_init.
    
    Fix this by handling the failure of dibusb_read_eeprom_byte.
    
    Reported-by: syzbot+e27b4fd589762b0b9329@syzkaller.appspotmail.com
    Fixes: 786baec ("[media] dvb-usb: move it to drivers/media/usb/dvb-usb")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mudongliang authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    c545376 View commit details
    Browse the repository at this point in the history
  7. media: dvb-usb: fix uninit-value in vp702x_read_mac_addr

    If vp702x_usb_in_op fails, the mac address is not initialized.
    And vp702x_read_mac_addr does not handle this failure, which leads to
    the uninit-value in dvb_usb_adapter_dvb_init.
    
    Fix this by handling the failure of vp702x_usb_in_op.
    
    Fixes: 786baec ("[media] dvb-usb: move it to drivers/media/usb/dvb-usb")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mudongliang authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    797c061 View commit details
    Browse the repository at this point in the history
  8. media: dvb-usb: Fix error handling in dvb_usb_i2c_init

    In dvb_usb_i2c_init, if i2c_add_adapter fails, it only prints an error
    message, and then continues to set DVB_USB_STATE_I2C. This affects the
    logic of dvb_usb_i2c_exit, which leads to that, the deletion of i2c_adap
    even if the i2c_add_adapter fails.
    
    Fix this by returning at the failure of i2c_add_adapter and then move
    dvb_usb_i2c_exit out of the error handling code of dvb_usb_i2c_init.
    
    Fixes: 13a79f1 ("media: dvb-usb: Fix memory leak at error in dvb_usb_device_init()")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mudongliang authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    131ae38 View commit details
    Browse the repository at this point in the history
  9. media: hantro: vp8: Move noisy WARN_ON to vpu_debug

    When the VP8 decoders can't find a reference frame,
    the driver falls back to the current output frame.
    
    This will probably produce some undesirable results,
    leading to frame corruption, but shouldn't cause
    noisy warnings.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    6ad61a7 View commit details
    Browse the repository at this point in the history
  10. media: hantro: Make struct hantro_variant.init() optional

    The hantro_variant.init() function is there for platforms
    to perform hardware-specific initialization, such as
    clock rate bumping.
    
    Not all platforms require it, so make it optional.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    96f33a5 View commit details
    Browse the repository at this point in the history
  11. media: hantro: Avoid redundant hantro_get_{dst,src}_buf() calls

    Getting the next src/dst buffer is relatively expensive
    so avoid doing it multiple times.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    b1e6056 View commit details
    Browse the repository at this point in the history
  12. media: hantro: h264: Move DPB valid and long-term bitmaps

    In order to reuse these bitmaps, move this process to
    struct hantro_h264_dec_hw_ctx. This will be used by
    the Rockchip VDPU2 H.264 driver.
    
    This idea was originally proposed by Jonas Karlman
    in "[RFC 08/12] media: hantro: Fix H264 decoding of field encoded content"
    which was posted a while ago.
    
    Link: https://lore.kernel.org/linux-media/HE1PR06MB4011EA39133818A85768B91FACBF0@HE1PR06MB4011.eurprd06.prod.outlook.com/
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    a9096c5 View commit details
    Browse the repository at this point in the history
  13. media: hantro: h264: Move reference picture number to a helper

    Add a hantro_h264_get_ref_nbr() helper function to get the reference
    picture numbers. This will be used by the Rockchip VDPU2 H.264 driver.
    
    This idea was originally proposed by Jonas Karlman in
    "[RFC 09/12] media: hantro: Refactor G1 H264 code"
    posted a while ago.
    
    Link: https://lore.kernel.org/linux-media/HE1PR06MB401165F2BA0AD8A634FDFAF2ACBF0@HE1PR06MB4011.eurprd06.prod.outlook.com/
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    678ddaf View commit details
    Browse the repository at this point in the history
  14. media: hantro: Add H.264 support for Rockchip VDPU2

    Rockchip VDPU2 core is present on RK3328, RK3326/PX30, RK3399
    and others. It's similar to Hantro G1, but it's not compatible with it.
    
    Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Kwiboo authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    c07665f View commit details
    Browse the repository at this point in the history
  15. media: hantro: Enable H.264 on Rockchip VDPU2

    Given H.264 support for VDPU2 was just added, let's enable it.
    For now, this is only enabled on platform that don't have
    an RKVDEC core, such as RK3328.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Tested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ezequielgarcia authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    1f82f2d View commit details
    Browse the repository at this point in the history
  16. media: hantro: Add support for the Rockchip PX30

    The PX30 SoC includes both the VDPU2 and VEPU2 blocks which are similar
    to the RK3399 (Hantro G1/H1 with shuffled registers).
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    paulkocialkowski authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    fb7cb34 View commit details
    Browse the repository at this point in the history
  17. media: dt-bindings: media: rockchip-vpu: Add PX30 compatible

    The Rockchip PX30 SoC has a Hantro VPU that features a decoder (VDPU2)
    and an encoder (VEPU2).
    
    Suggested-by: Alex Bee <knaerzche@gmail.com>
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    paulkocialkowski authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    9d05c1e View commit details
    Browse the repository at this point in the history
  18. media: dt-bindings: adv7180: Introduce the 'reset-gpios' property

    Introduce the 'reset-gpios' property to describe the GPIO that connects
    to the ADV7180 reset pin.
    
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    fabioestevam authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    724fae9 View commit details
    Browse the repository at this point in the history
  19. media: adv7180: Add optional reset GPIO

    There is a reset input that can be controlled by GPIO. Let's add it
    to let the driver control it if required.
    
    [hverkuil: fix a small checkpatch alignment warning]
    
    Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    fschrempf authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    abb7c7c View commit details
    Browse the repository at this point in the history
  20. media: i2c: adv7180: Print the chip ID on probe

    Improve the probe message by printing the chip ID version.
    
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    fabioestevam authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    f7b96a9 View commit details
    Browse the repository at this point in the history
  21. media: dt-bindings: adv7180: Introduce 'adv,force-bt656-4' property

    Captured NTSC video would be out of sync when using the adv7280 with
    the BT.656-4 protocol. Certain registers (0x04, 0x31, 0xE6) need to
    be configured properly to ensure BT.656-4 compatibility.
    
    Introduce the 'adv,force-bt656-4' property to allow the ADV7280
    behavior to be consistent with the ADV7180, where BT.656-4 timing
    is used by default.
    
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    fabioestevam authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    28d1e47 View commit details
    Browse the repository at this point in the history
  22. media: i2c: adv7180: fix adv7280 BT.656-4 compatibility

    Captured video would be out of sync when using the adv7280 with
    the BT.656-4 protocol. Certain registers (0x04, 0x31, 0xE6) had to
    be configured properly to ensure BT.656-4 compatibility.
    
    An error in the adv7280 reference manual suggested that EAV/SAV mode
    was enabled by default, however upon inspecting register 0x31, it was
    determined to be disabled by default.
    
    [fabio: Introduce "adv,force-bt656-4" to not affect the existing users]
    [hverkuil: fix a small checkpatch alignment warning]
    
    Signed-off-by: Matthew Michilot <matthew.michilot@gmail.com>
    Reviewed-by: Tim Harvey <tharvey@gateworks.com>
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Tested-by: Tim Harvey <tharvey@gateworks.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mmichilot authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    ed771d7 View commit details
    Browse the repository at this point in the history
  23. media: go7007: fix memory leak in go7007_usb_probe

    In commit 1376412 ("go7007: add sanity checking for endpoints")
    endpoint sanity check was introduced, but if check fails it simply
    returns with leaked pointers.
    
    Cutted log from my local syzbot instance:
    
    BUG: memory leak
    unreferenced object 0xffff8880209f0000 (size 8192):
      comm "kworker/0:4", pid 4916, jiffies 4295263583 (age 29.310s)
      hex dump (first 32 bytes):
        30 b0 27 22 80 88 ff ff 75 73 62 2d 64 75 6d 6d  0.'"....usb-dumm
        79 5f 68 63 64 2e 33 2d 31 00 00 00 00 00 00 00  y_hcd.3-1.......
      backtrace:
        [<ffffffff860ca856>] kmalloc include/linux/slab.h:556 [inline]
        [<ffffffff860ca856>] kzalloc include/linux/slab.h:686 [inline]
        [<ffffffff860ca856>] go7007_alloc+0x46/0xb40 drivers/media/usb/go7007/go7007-driver.c:696
        [<ffffffff860de74e>] go7007_usb_probe+0x13e/0x2200 drivers/media/usb/go7007/go7007-usb.c:1114
        [<ffffffff854a5f74>] usb_probe_interface+0x314/0x7f0 drivers/usb/core/driver.c:396
        [<ffffffff845a7151>] really_probe+0x291/0xf60 drivers/base/dd.c:576
    
    BUG: memory leak
    unreferenced object 0xffff88801e2f2800 (size 512):
      comm "kworker/0:4", pid 4916, jiffies 4295263583 (age 29.310s)
      hex dump (first 32 bytes):
        00 87 40 8a ff ff ff ff 00 00 00 00 00 00 00 00  ..@.............
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<ffffffff860de794>] kmalloc include/linux/slab.h:556 [inline]
        [<ffffffff860de794>] kzalloc include/linux/slab.h:686 [inline]
        [<ffffffff860de794>] go7007_usb_probe+0x184/0x2200 drivers/media/usb/go7007/go7007-usb.c:1118
        [<ffffffff854a5f74>] usb_probe_interface+0x314/0x7f0 drivers/usb/core/driver.c:396
        [<ffffffff845a7151>] really_probe+0x291/0xf60 drivers/base/dd.c:576
    
    Fixes: 1376412 ("go7007: add sanity checking for endpoints")
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    47d94da View commit details
    Browse the repository at this point in the history
  24. media: go7007: remove redundant initialization

    In go7007_alloc() kzalloc() is used for struct go7007
    allocation. It means that there is no need in zeroing
    any members, because kzalloc will take care of it.
    
    Removing these reduntant initialization steps increases
    execution speed a lot:
    
    	Before:
    		+ 86.802 us   |    go7007_alloc();
    	After:
    		+ 29.595 us   |    go7007_alloc();
    
    Fixes: 866b869 ("Staging: add the go7007 video driver")
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    6f5885a View commit details
    Browse the repository at this point in the history
  25. media: v4l2-subdev: fix some NULL vs IS_ERR() checks

    The v4l2_subdev_alloc_state() function returns error pointers, it
    doesn't return NULL.
    
    Fixes: 0d346d2 ("media: v4l2-subdev: add subdev-wide state struct")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Dan Carpenter authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    ba7a93e View commit details
    Browse the repository at this point in the history
  26. media: rkisp1: remove field 'vaddr' from 'rkisp1_buffer'

    The virtual address can be accessed using vb2_plane_vaddr
    therefore there is no need to save it in an extra field in
    'rkisp1_buffer'. Remove it.
    
    Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Dafna Hirschfeld authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    07e59d9 View commit details
    Browse the repository at this point in the history
  27. media: rkisp1: cap: initialize dma buf address in 'buf_init' cb

    Initializing the dma addresses of the capture buffers can
    move to the 'buf_init' callback, since it is enough to do
    it once for each buffer and not every time it is queued.
    
    Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Dafna Hirschfeld authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    f003d63 View commit details
    Browse the repository at this point in the history
  28. media: media/cec-core.rst: update adap_enable doc

    The description of adap_enable was out-of-date. Improve it so that it
    corresponds to what really happens.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    7910c23 View commit details
    Browse the repository at this point in the history
  29. media: stkwebcam: fix memory leak in stk_camera_probe

    My local syzbot instance hit memory leak in usb_set_configuration().
    The problem was in unputted usb interface. In case of errors after
    usb_get_intf() the reference should be putted to correclty free memory
    allocated for this interface.
    
    Fixes: ec16dae ("V4L/DVB (7019): V4L: add support for Syntek DC1125 webcams")
    Cc: stable@vger.kernel.org
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    514e976 View commit details
    Browse the repository at this point in the history
  30. media: platform: stm32: unprepare clocks at handling errors in probe

    stm32_cec_probe() did not unprepare clocks on error handling paths. The
    patch fixes that.
    
    Found by Linux Driver Verification project (linuxtesting.org).
    
    Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    eunovm authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    055d2db View commit details
    Browse the repository at this point in the history
  31. media: rockchip/rga: fix error handling in probe

    There are a few bugs in this code.  1)  No checks for whether
    dma_alloc_attrs() or __get_free_pages() failed.  2)  If
    video_register_device() fails it doesn't clean up the dma attrs or the
    free pages.  3)  The video_device_release() function frees "vfd" which
    leads to a use after free on the next line.  The call to
    video_unregister_device() is not required so I have just removed that.
    
    Fixes: f7e7b48 ("[media] rockchip/rga: v4l2 m2m support")
    Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Dan Carpenter authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    e58430e View commit details
    Browse the repository at this point in the history
  32. media: ti-vpe: cal: fix indexing of cal->ctx[] in cal_probe()

    cal->ctx[i] is allocated with this loop
    	for (i = 0; i < cal->data->num_csi2_phy; ++i) {
    and accessed in the error handler and else where with this loop
    	for (i = 0; i < cal->num_contexts; i++)
    Because the first loop contains a continue statement
    before cal->num_contexts is incremented, using i as the
    indexer will leave gaps in the cal->ctx[].
    
    So use cal->num_contexts as the indexer.
    
    Fixes: 75e7e58 ("media: ti-vpe: cal: support 8 DMA contexts")
    Signed-off-by: Tom Rix <trix@redhat.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Tom Rix authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    fa0b565 View commit details
    Browse the repository at this point in the history
  33. media: coda: fix frame_mem_ctrl for YUV420 and YVU420 formats

    The frame memory control register value is currently determined
    before userspace selects the final capture format and never corrected.
    Update ctx->frame_mem_ctrl in __coda_start_decoding() to fix decoding
    into YUV420 or YVU420 capture buffers.
    
    Reported-by: Andrej Picej <andrej.picej@norik.com>
    Fixes: 497e6b8 ("media: coda: add sequence initialization work")
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pH5 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    44693d7 View commit details
    Browse the repository at this point in the history
  34. media: atomisp: Fix typo "accesible"

    Trivial fix.
    
    Link: https://lore.kernel.org/linux-media/20210318202223.164873-2-ribalda@chromium.org
    Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ribalda authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    e6f2387 View commit details
    Browse the repository at this point in the history
  35. media: atomisp-ov2680: A trivial typo fix

    s/miror/mirror/
    
    Link: https://lore.kernel.org/linux-media/20210324135642.30054-1-unixbhaskar@gmail.com
    Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    unixbhaskar authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    fe8e320 View commit details
    Browse the repository at this point in the history
  36. media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe

    When hmm_pool_register() fails, a pairing PM usage counter
    increment is needed to keep the counter balanced. It's the
    same for the following error paths.
    
    Link: https://lore.kernel.org/linux-media/20210408081850.24278-1-dinghao.liu@zju.edu.cn
    Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
    Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    dinghaoliu authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    672fe1c View commit details
    Browse the repository at this point in the history
  37. media: atomisp: pci: fixed a curly bracket coding style issue.

    Fixed a coding style issue.
    
    Link: https://lore.kernel.org/linux-media/20210411134840.7184-1-dev.dragon@bk.ru
    Signed-off-by: Dmitrii Wolf <dev.dragon@bk.ru>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    SwDev12 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    24d4fbd View commit details
    Browse the repository at this point in the history
  38. media: atomisp: remove useless breaks

    Breaks are not useful after a return, they can
    simply be removed.
    
    Link: https://lore.kernel.org/linux-media/4b4a6ad1bc8fc1fd6aafc3e6cd7a4969890340c1.1620479607.git.paskripkin@gmail.com
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    9763267 View commit details
    Browse the repository at this point in the history
  39. media: atomisp: remove dublicate code

    Removed dublicate returns and breaks inside switch
    statements and useless return after switch.
    
    Link: https://lore.kernel.org/linux-media/3944cd10bb5a64157781b1e0ef044c62c05f07c7.1620479607.git.paskripkin@gmail.com
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    728a5c6 View commit details
    Browse the repository at this point in the history
  40. media: atomisp: remove useless returns

    Returns are not useful at the end of void functions,
    they can simply be removed.
    
    Link: https://lore.kernel.org/linux-media/23a6984ddfb15ba38f6983381bb6fdaef3edd7d8.1620479607.git.paskripkin@gmail.com
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pskrgag authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    264f590 View commit details
    Browse the repository at this point in the history
  41. media: atomisp: fix the uninitialized use and rename "retvalue"

    Inside function mt9m114_detect(), variable "retvalue" could
    be uninitialized if mt9m114_read_reg() returns error, however, it
    is used in the later if statement, which is potentially unsafe.
    
    The local variable "retvalue" is renamed to "model" to avoid
    confusion.
    
    Link: https://lore.kernel.org/linux-media/20210625053858.3862-1-yzhai003@ucr.edu
    Fixes: ad85094 (media / atomisp: fix the uninitialized use of model ID)
    Signed-off-by: Yizhuo <yzhai003@ucr.edu>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Yizhuo authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    c275e5d View commit details
    Browse the repository at this point in the history
  42. media: atomisp: use list_splice_init in atomisp_compat_css20.c

    Using list_splice_init() instead of entire while-loops
    in atomisp_compat_css20.c.
    
    Link: https://lore.kernel.org/linux-media/20210617140926.887680-1-libaokun1@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    LiBaokun96 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    9d971b8 View commit details
    Browse the repository at this point in the history
  43. media: atomisp: Resolve goto style issue in sh_css.c

    Change the goto label to lower case.
    Remove a space in the goto label.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-2-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    7f52dbb View commit details
    Browse the repository at this point in the history
  44. media: atomisp: Remove unnecessary parens in sh_css.c

    Remove unnecessary parenthesis.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-3-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    f6e2a76 View commit details
    Browse the repository at this point in the history
  45. media: atomisp: Use kcalloc instead of kzalloc with multiply in sh_css.c

    Use kcalloc instead of kzalloc with multiplication.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-4-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    00ba215 View commit details
    Browse the repository at this point in the history
  46. media: atomisp: Fix line continuation style issue in sh_css.c

    Fix logical continuation style issue and adjacent line splits.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-5-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    6b6d228 View commit details
    Browse the repository at this point in the history
  47. media: atomisp: Use sysfs_emit() instead of sprintf() where appropriate

    sysfs_emit() is preferred over raw sprintf() for sysfs attributes since it
    knows about the sysfs buffer specifics and has some built-in sanity checks.
    
    Link: https://lore.kernel.org/linux-media/20210513034650.252993-1-phind.uet@gmail.com
    Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ita93 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    2c08a01 View commit details
    Browse the repository at this point in the history
  48. media: atomisp: Align block comments

    Fixing the following checkpatch warning:
    WARNING: Block comments should align the * on each line
    
    Link: https://lore.kernel.org/linux-media/20210518112938.88240-1-wanjiabing@vivo.com
    Signed-off-by: Jiabing Wan <kael_w@yeah.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    wanjb2115 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    95d2117 View commit details
    Browse the repository at this point in the history
  49. media: atomisp: Fix whitespace at the beginning of line

    This patch fixes whitespace at the beginning of line by wrapping after
    the type name and aligning the arguments with the open parenthesis.
    Identified by checkpatch: WARNING: please, no spaces at the start of a
    line.
    
    Link: https://lore.kernel.org/linux-media/20210524173609.672153-1-aniketmail669@gmail.com
    Signed-off-by: Aniket Bhattacharyea <aniketmail669@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    heraldofsolace authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    f89aa0d View commit details
    Browse the repository at this point in the history
  50. media: atomisp: improve error handling in gc2235_detect()

    Static analysis reports this representative problem
    
    atomisp-gc2235.c:867:20: warning: The right operand
      of '|' is a garbage value
            id = ((high << 8) | low);
                              ^ ~~~
    When gc2235_read_reg() fails, its return val is never written.
    
    For gc2235_detect(), high and low are or-ed and compared
    with GC2235_ID, 0x2235.  Initialize both to 0 and skip
    checking the read returns, it's errors are not passed up, only
    -ENODEV is.
    
    Link: https://lore.kernel.org/linux-media/20210521194805.2078135-1-trix@redhat.com
    Signed-off-by: Tom Rix <trix@redhat.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Tom Rix authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    544ee73 View commit details
    Browse the repository at this point in the history
  51. media: atomisp: remove the repeated declaration

    Function 'ia_css_mmu_invalidate_cache' is declared twice, remove the
    repeated declaration.
    
    Link: https://lore.kernel.org/linux-media/1621922559-1859-1-git-send-email-zhangshaokun@hisilicon.com
    Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    zhangshk authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    d741db7 View commit details
    Browse the repository at this point in the history
  52. media: atomisp: Remove unused declarations

    There is a few static declarations that are not used anywhere, remove them.
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-3-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    8e38adf View commit details
    Browse the repository at this point in the history
  53. media: atomisp: Annotate a couple of definitions with __maybe_unused

    There are definitions in the header that are not used by all modules inside
    the driver. Annotate them with __maybe_unused to avoid compiler warnings.
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-4-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    86d92c3 View commit details
    Browse the repository at this point in the history
  54. media: atomisp: Remove unused port_enabled variable

    Remove unused port_enabled variable in ia_css_isys_rx_configure().
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-6-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    a5d46d9 View commit details
    Browse the repository at this point in the history
  55. media: atomisp: pci: Remove checks before kfree/kvfree

    Removed checks for pointers != NULL before freeing memory. If kvfree()
    and kfree() are given NULL pointers no operations are performed, so
    there is no need for the above-mentioned checks. Coccinelle detected the
    second of the two unnecessary checks.
    
    Link: https://lore.kernel.org/linux-media/20210527193922.25225-1-fmdefrancesco@gmail.com
    Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    xp4ns3 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    179b1fc View commit details
    Browse the repository at this point in the history
  56. media: atomisp: pci: Remove unnecessary (void *) cast

    Removed an unnecessary (void *) cast for an argument passed to kfree().
    
    Link: https://lore.kernel.org/linux-media/20210605020855.1065-3-fmdefrancesco@gmail.com
    Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    xp4ns3 authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    655ace3 View commit details
    Browse the repository at this point in the history
  57. media: atomisp: pci: fix error return code in atomisp_pci_probe()

    If init_atomisp_wdts() fails, atomisp_pci_probe() need return
    error code.
    
    Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Yang Yingliang authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    d14e272 View commit details
    Browse the repository at this point in the history
  58. media: atomisp: Perform a single memset() for union

    There is no need to memset() both dvs_grid_info and dvs_stat_grid_info
    separately: they are part of the same union. Instead, just zero the
    union itself. This additionally avoids a false positive (due to a
    gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE
    improvements:
    
    In function 'fortify_memset_chk',
        inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3,
        inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10:
    ./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
      199 |    __write_overflow_field();
          |    ^~~~~~~~~~~~~~~~~~~~~~~~
    
    [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419
    
    Link: https://lore.kernel.org/linux-media/20210711145101.1434065-1-keescook@chromium.org
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    kees authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    1d74a91 View commit details
    Browse the repository at this point in the history
  59. media: atomisp: Move MIPI_PORT_LANES to the only user

    Move MIPI_PORT_LANES to the only user of it, i.e. pci/runtime/isys/src/rx.c.
    
    Link: https://lore.kernel.org/linux-media/20210713152523.19902-4-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    70d4ac6 View commit details
    Browse the repository at this point in the history
  60. media: atomisp: i2c: Remove a superfluous else clause in atomisp-mt9m…

    …114.c
    
    Remove a superfluous clause in mt9m114_s_power()
    
    Link: https://lore.kernel.org/linux-media/20210719055216.28508-1-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    278cc35 View commit details
    Browse the repository at this point in the history
  61. media: atomisp: pci: reposition braces as per coding style

    Misplaced braces makes it difficult to follow the code easily. This also
    goes against the code style guidelines. This resolved following checkpatch
    complaints:
    
    ERROR: open brace '{' following function definitions go on the next line
    ERROR: that open brace { should be on the previous line
    
    Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104
    
    [mchehab: dropped a hunk with a merge conflict]
    Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------)
    Signed-off-by: Deepak R Varma <drv@mailo.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    drvgithubuser authored and mchehab committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    c27479d View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2021

  1. media: atomisp: fix the uninitialized use and rename "retvalue"

    Inside function mt9m114_detect(), variable "retvalue" could
    be uninitialized if mt9m114_read_reg() returns error, however, it
    is used in the later if statement, which is potentially unsafe.
    
    The local variable "retvalue" is renamed to "model" to avoid
    confusion.
    
    Link: https://lore.kernel.org/linux-media/20210625053858.3862-1-yzhai003@ucr.edu
    Fixes: ad85094 ("Revert "media: staging: atomisp: Remove driver"")
    Signed-off-by: Yizhuo <yzhai003@ucr.edu>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Yizhuo authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    0c980e3 View commit details
    Browse the repository at this point in the history
  2. media: atomisp: Resolve goto style issue in sh_css.c

    Change the goto label to lower case.
    Remove a space in the goto label.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-2-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    9e77871 View commit details
    Browse the repository at this point in the history
  3. media: atomisp: Remove unnecessary parens in sh_css.c

    Remove unnecessary parenthesis.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-3-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    a93cf5a View commit details
    Browse the repository at this point in the history
  4. media: atomisp: Use kcalloc instead of kzalloc with multiply in sh_css.c

    Use kcalloc instead of kzalloc with multiplication.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-4-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    d2f3009 View commit details
    Browse the repository at this point in the history
  5. media: atomisp: Fix line continuation style issue in sh_css.c

    Fix logical continuation style issue and adjacent line splits.
    
    Link: https://lore.kernel.org/linux-media/20210508235622.300394-5-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    66b2242 View commit details
    Browse the repository at this point in the history
  6. media: atomisp: Use sysfs_emit() instead of sprintf() where appropriate

    sysfs_emit() is preferred over raw sprintf() for sysfs attributes since it
    knows about the sysfs buffer specifics and has some built-in sanity checks.
    
    Link: https://lore.kernel.org/linux-media/20210513034650.252993-1-phind.uet@gmail.com
    Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    ita93 authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    e53656a View commit details
    Browse the repository at this point in the history
  7. media: atomisp: Align block comments

    Fixing the following checkpatch warning:
    WARNING: Block comments should align the * on each line
    
    Link: https://lore.kernel.org/linux-media/20210518112938.88240-1-wanjiabing@vivo.com
    Signed-off-by: Jiabing Wan <kael_w@yeah.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    wanjb2115 authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    b09ea93 View commit details
    Browse the repository at this point in the history
  8. media: atomisp: Fix whitespace at the beginning of line

    This patch fixes whitespace at the beginning of line by wrapping after
    the type name and aligning the arguments with the open parenthesis.
    Identified by checkpatch: WARNING: please, no spaces at the start of a
    line.
    
    Link: https://lore.kernel.org/linux-media/20210524173609.672153-1-aniketmail669@gmail.com
    Signed-off-by: Aniket Bhattacharyea <aniketmail669@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    heraldofsolace authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    6bdad3b View commit details
    Browse the repository at this point in the history
  9. media: atomisp: improve error handling in gc2235_detect()

    Static analysis reports this representative problem
    
    atomisp-gc2235.c:867:20: warning: The right operand
      of '|' is a garbage value
            id = ((high << 8) | low);
                              ^ ~~~
    When gc2235_read_reg() fails, its return val is never written.
    
    For gc2235_detect(), high and low are or-ed and compared
    with GC2235_ID, 0x2235.  Initialize both to 0 and skip
    checking the read returns, it's errors are not passed up, only
    -ENODEV is.
    
    Link: https://lore.kernel.org/linux-media/20210521194805.2078135-1-trix@redhat.com
    Signed-off-by: Tom Rix <trix@redhat.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Tom Rix authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    2803555 View commit details
    Browse the repository at this point in the history
  10. media: atomisp: remove the repeated declaration

    Function 'ia_css_mmu_invalidate_cache' is declared twice, remove the
    repeated declaration.
    
    Link: https://lore.kernel.org/linux-media/1621922559-1859-1-git-send-email-zhangshaokun@hisilicon.com
    Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    zhangshk authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    0ae19e8 View commit details
    Browse the repository at this point in the history
  11. media: atomisp: Remove unused declarations

    There is a few static declarations that are not used anywhere, remove them.
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-3-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    85001df View commit details
    Browse the repository at this point in the history
  12. media: atomisp: Annotate a couple of definitions with __maybe_unused

    There are definitions in the header that are not used by all modules inside
    the driver. Annotate them with __maybe_unused to avoid compiler warnings.
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-4-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    dbe93bc View commit details
    Browse the repository at this point in the history
  13. media: atomisp: Remove unused port_enabled variable

    Remove unused port_enabled variable in ia_css_isys_rx_configure().
    
    Link: https://lore.kernel.org/linux-media/20210526124322.48915-6-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    693064e View commit details
    Browse the repository at this point in the history
  14. media: atomisp: pci: Remove checks before kfree/kvfree

    Removed checks for pointers != NULL before freeing memory. If kvfree()
    and kfree() are given NULL pointers no operations are performed, so
    there is no need for the above-mentioned checks. Coccinelle detected the
    second of the two unnecessary checks.
    
    Link: https://lore.kernel.org/linux-media/20210527193922.25225-1-fmdefrancesco@gmail.com
    Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    xp4ns3 authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    1c6edb2 View commit details
    Browse the repository at this point in the history
  15. media: atomisp: pci: Remove unnecessary (void *) cast

    Removed an unnecessary (void *) cast for an argument passed to kfree().
    
    Link: https://lore.kernel.org/linux-media/20210605020855.1065-3-fmdefrancesco@gmail.com
    Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    xp4ns3 authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    454a623 View commit details
    Browse the repository at this point in the history
  16. media: atomisp: pci: fix error return code in atomisp_pci_probe()

    If init_atomisp_wdts() fails, atomisp_pci_probe() need return
    error code.
    
    Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Yang Yingliang authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    d27f346 View commit details
    Browse the repository at this point in the history
  17. media: atomisp: Perform a single memset() for union

    There is no need to memset() both dvs_grid_info and dvs_stat_grid_info
    separately: they are part of the same union. Instead, just zero the
    union itself. This additionally avoids a false positive (due to a
    gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE
    improvements:
    
    In function 'fortify_memset_chk',
        inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3,
        inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10:
    ./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
      199 |    __write_overflow_field();
          |    ^~~~~~~~~~~~~~~~~~~~~~~~
    
    [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419
    
    Link: https://lore.kernel.org/linux-media/20210711145101.1434065-1-keescook@chromium.org
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    kees authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    69aa1de View commit details
    Browse the repository at this point in the history
  18. media: atomisp: Move MIPI_PORT_LANES to the only user

    Move MIPI_PORT_LANES to the only user of it, i.e. pci/runtime/isys/src/rx.c.
    
    Link: https://lore.kernel.org/linux-media/20210713152523.19902-4-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    andy-shev authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    a5e5cea View commit details
    Browse the repository at this point in the history
  19. media: atomisp: i2c: Remove a superfluous else clause in atomisp-mt9m…

    …114.c
    
    Remove a superfluous clause in mt9m114_s_power()
    
    Link: https://lore.kernel.org/linux-media/20210719055216.28508-1-vrzh@vrzh.net
    Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    v-rzh authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    f83f86e View commit details
    Browse the repository at this point in the history
  20. media: atomisp: pci: reposition braces as per coding style

    Misplaced braces makes it difficult to follow the code easily. This also
    goes against the code style guidelines. This resolved following checkpatch
    complaints:
    
    ERROR: open brace '{' following function definitions go on the next line
    ERROR: that open brace { should be on the previous line
    
    Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104
    
    [mchehab: dropped a hunk with a merge conflict]
    Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------)
    Signed-off-by: Deepak R Varma <drv@mailo.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    drvgithubuser authored and mchehab committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    c3cdc01 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. Merge commit 'c3cdc019a6bf' into media_tree

    * commit 'c3cdc019a6bf':
      media: atomisp: pci: reposition braces as per coding style
      media: atomisp: i2c: Remove a superfluous else clause in atomisp-mt9m114.c
      media: atomisp: Move MIPI_PORT_LANES to the only user
      media: atomisp: Perform a single memset() for union
      media: atomisp: pci: fix error return code in atomisp_pci_probe()
      media: atomisp: pci: Remove unnecessary (void *) cast
      media: atomisp: pci: Remove checks before kfree/kvfree
      media: atomisp: Remove unused port_enabled variable
      media: atomisp: Annotate a couple of definitions with __maybe_unused
      media: atomisp: Remove unused declarations
      media: atomisp: remove the repeated declaration
      media: atomisp: improve error handling in gc2235_detect()
      media: atomisp: Fix whitespace at the beginning of line
      media: atomisp: Align block comments
      media: atomisp: Use sysfs_emit() instead of sprintf() where appropriate
      media: atomisp: Fix line continuation style issue in sh_css.c
      media: atomisp: Use kcalloc instead of kzalloc with multiply in sh_css.c
      media: atomisp: Remove unnecessary parens in sh_css.c
      media: atomisp: Resolve goto style issue in sh_css.c
      media: atomisp: fix the uninitialized use and rename "retvalue"
    mchehab committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    a7a48b4 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. media: rc: meson-ir-tx: document device tree bindings

    This patch adds binding documentation for the IR transmitter
    available in Amlogic Meson SoCs.
    
    Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
    Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    viktor-prutyanov authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    e9f504f View commit details
    Browse the repository at this point in the history
  2. media: rc: introduce Meson IR TX driver

    This patch adds the driver for Amlogic Meson IR transmitter.
    
    Some Amlogic SoCs such as A311D and T950D4 have IR transmitter
    (also called blaster) controller onboard. It is capable of sending
    IR signals with arbitrary carrier frequency and duty cycle.
    
    The driver supports 2 modulation clock sources:
     - xtal3 clock (xtal divided by 3)
     - 1us clock
    
    Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    viktor-prutyanov authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    49be1c7 View commit details
    Browse the repository at this point in the history
  3. media: em28xx-input: fix refcount bug in em28xx_usb_disconnect

    If em28xx_ir_init fails, it would decrease the refcount of dev. However,
    in the em28xx_ir_fini, when ir is NULL, it goes to ref_put and decrease
    the refcount of dev. This will lead to a refcount bug.
    
    Fix this bug by removing the kref_put in the error handling code
    of em28xx_ir_init.
    
    refcount_t: underflow; use-after-free.
    WARNING: CPU: 0 PID: 7 at lib/refcount.c:28 refcount_warn_saturate+0x18e/0x1a0 lib/refcount.c:28
    Modules linked in:
    CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.13.0 #3
    Workqueue: usb_hub_wq hub_event
    RIP: 0010:refcount_warn_saturate+0x18e/0x1a0 lib/refcount.c:28
    Call Trace:
      kref_put.constprop.0+0x60/0x85 include/linux/kref.h:69
      em28xx_usb_disconnect.cold+0xd7/0xdc drivers/media/usb/em28xx/em28xx-cards.c:4150
      usb_unbind_interface+0xbf/0x3a0 drivers/usb/core/driver.c:458
      __device_release_driver drivers/base/dd.c:1201 [inline]
      device_release_driver_internal+0x22a/0x230 drivers/base/dd.c:1232
      bus_remove_device+0x108/0x160 drivers/base/bus.c:529
      device_del+0x1fe/0x510 drivers/base/core.c:3540
      usb_disable_device+0xd1/0x1d0 drivers/usb/core/message.c:1419
      usb_disconnect+0x109/0x330 drivers/usb/core/hub.c:2221
      hub_port_connect drivers/usb/core/hub.c:5151 [inline]
      hub_port_connect_change drivers/usb/core/hub.c:5440 [inline]
      port_event drivers/usb/core/hub.c:5586 [inline]
      hub_event+0xf81/0x1d40 drivers/usb/core/hub.c:5668
      process_one_work+0x2c9/0x610 kernel/workqueue.c:2276
      process_scheduled_works kernel/workqueue.c:2338 [inline]
      worker_thread+0x333/0x5b0 kernel/workqueue.c:2424
      kthread+0x188/0x1d0 kernel/kthread.c:319
      ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
    
    Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Fixes: ac56886 ("media: em28xx: Fix possible memory leak of em28xx struct")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mudongliang authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    6fa54bc View commit details
    Browse the repository at this point in the history
  4. media: v4l2-subdev: Fix documentation of the subdev_notifier member

    Fix the name of the function that registers the subdev_notifier member
    of the v4l2_subdev structure.
    
    [Sakari Ailus: Drop _sensor from the function name.]
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    paulkocialkowski authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    c3609c4 View commit details
    Browse the repository at this point in the history
  5. media: dt-bindings: media: Add bindings for imx335

    - Add dt-bindings documentation for Sony imx335 sensor driver
    - Add MAINTAINERS entry for Sony imx335 binding documentation
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    932741d View commit details
    Browse the repository at this point in the history
  6. media: i2c: Add imx335 camera sensor driver

    Add a v4l2 sub-device driver for the Sony imx335 image sensor.
    ThE camera sensor uses the i2c bus for control and the csi-2
    bus for data.
    
    The following features are supported:
    - manual exposure and analog gain control support
    - vblank/hblank/pixel rate/link freq control support
    - supported resolution:
    	- 2592x1940 @ 30fps
    - supported bayer order output:
    	- SRGGB12
    
    [Sakari Ailus: Rebase on commit c802a4174beeb25cb539c806c9d0d3c0f61dfa53.]
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    45d19b5 View commit details
    Browse the repository at this point in the history
  7. media: dt-bindings: media: Add bindings for imx412

    - Add dt-bindings documentation for Sony imx412 sensor driver
    - Add MAINTAINERS entry for Sony imx412 binding documentation
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    333b312 View commit details
    Browse the repository at this point in the history
  8. media: i2c: Add imx412 camera sensor driver

    Add a v4l2 sub-device driver for the Sony imx412 image sensor.
    This is a camera sensor using the i2c bus for control and the
    csi-2 bus for data.
    
    The following features are supported:
    - manual exposure and analog gain control support
    - vblank/hblank/pixel rate/link freq control support
    - supported resolution:
        - 4056x3040 @ 30fps
    - supported bayer order output:
        - SRGGB10
    
    [Sakari Ailus: Rebase on commit c802a4174beeb25cb539c806c9d0d3c0f61dfa53.]
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    9214e86 View commit details
    Browse the repository at this point in the history
  9. media: dt-bindings: media: Add bindings for ov9282

    - Add dt-bindings documentation for OmniVision ov9282 sensor driver
    - Add MAINTAINERS entry for OmniVision ov9282 binding documentation
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    4874ea3 View commit details
    Browse the repository at this point in the history
  10. media: i2c: Add ov9282 camera sensor driver

    Add a v4l2 sub-device driver for the OmniVisison ov9282
    black&white image sensor.
    The camera sensor uses the i2c bus for control and the
    csi-2 bus for data.
    
    The following features are supported:
    - manual exposure and analog gain control support
    - vblank/hblank/pixel rate/link freq control support
    - supported resolution:
        - 1280x720 @ 30fps
    
    [Sakari Ailus: Rebase on commit c802a4174beeb25cb539c806c9d0d3c0f61dfa53.]
    
    Signed-off-by: Martina Krasteva <martinax.krasteva@intel.com>
    Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
    Acked-by: Paul J. Murphy <paul.j.murphy@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Martina Krasteva authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    14ea315 View commit details
    Browse the repository at this point in the history
  11. media: ov5640: Complement yuv mbus formats with their 1X16 versions

    According to media bus pixel codes definition, data formats on serial
    busses should be described with one bus sample per pixel.
    
    Documentation/userspace-api/media/v4l/subdev-formats.rst states:
    
    "The media bus pixel codes document parallel formats. Should the pixel
    data be transported over a serial bus, the media bus pixel code that
    describes a parallel format that transfers a sample on a single clock
    cycle is used. For instance, both MEDIA_BUS_FMT_BGR888_1X24 and
    MEDIA_BUS_FMT_BGR888_3X8 are used on parallel busses for transferring an
    8 bits per sample BGR data, whereas on serial busses the data in this
    format is only referred to using MEDIA_BUS_FMT_BGR888_1X24. This is
    because there is effectively only a single way to transport that
    format on the serial busses."
    
    Some MIPI CSI receivers strictly obey this definition and declare
    support for only *1X_* formats.
    
    Hence, complement the supported media bus formats with their 1X16 versions
    (currently applicable to yuyv, uyvy) to enhance interoperability with CSI
    receivers.
    
    Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    xroumegue authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    1536fbd View commit details
    Browse the repository at this point in the history
  12. media: mc-device.c: use DEVICE_ATTR_RO() helper macro

    Use DEVICE_ATTR_RO() helper macro instead of DEVICE_ATTR(), which is
    simpler and more readable.
    
    Due to the name of the read function of the sysfs attribute is normalized,
    there is a natural association.
    
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    7b537f2 View commit details
    Browse the repository at this point in the history
  13. media: i2c: et8ek8: use DEVICE_ATTR_RO() helper macro

    Use DEVICE_ATTR_RO() helper macro instead of DEVICE_ATTR(), which is
    simpler and more readable.
    
    Due to the name of the read function of the sysfs attribute is normalized,
    there is a natural association.
    
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Acked-by: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    5fca416 View commit details
    Browse the repository at this point in the history
  14. media: i2c: use DEVICE_ATTR_RO() helper macro

    Use DEVICE_ATTR_RO() helper macro instead of DEVICE_ATTR(), which is
    simpler and more readable.
    
    Due to the name of the read function of the sysfs attribute is normalized,
    there is a natural association.
    
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    9256de0 View commit details
    Browse the repository at this point in the history
  15. media: exynos4-is: use DEVICE_ATTR_RW() helper macro

    Use DEVICE_ATTR_RW() helper macro instead of DEVICE_ATTR(), which is
    simpler and more readable.
    
    Due to the names of the read and write functions of the sysfs attribute is
    normalized, there is a natural association.
    
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    e006558 View commit details
    Browse the repository at this point in the history
  16. media: omap3isp: Fix missing unlock in isp_subdev_notifier_complete()

    Add the missing unlock before return from function
    isp_subdev_notifier_complete() in the init error
    handling case.
    
    Fixes: ba689d9 ("media: omap3isp: Acquire graph mutex for graph traversal")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Wei Yongjun authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    0368e7d View commit details
    Browse the repository at this point in the history
  17. media: Documentation: media: Improve camera sensor documentation

    Modernise the documentation to make it more precise and update the use of
    pixel rate control and various other changes. In particular:
    
    - Use non-proportional font for file names, properties as well as
      controls.
    
    - The unit of the HBLANK control is pixels, not lines.
    
    - The unit of PIXEL_RATE control is pixels per second, not Hz.
    
    - Merge common requirements for CSI-2 and parallel busses.
    
    - Include all DT properties needed for assigned clocks.
    
    - Fix referencing the link rate control.
    
    - SMIA driver's new name is CCS driver.
    
    - The PIXEL_RATE control denotes pixel rate on the pixel array on camera
      sensors. Do not suggest it is used to tell the maximum pixel rate on the
      bus anymore.
    
    - Improve ReST syntax (plain struct and function names).
    
    - Remove the suggestion to use s_power() in receiver drivers.
    
    - Make MIPI website URL use HTTPS, add Wikipedia links to BT.601 and
      BT.656.
    
    Fixes: e4cf8c5 ("media: Documentation: media: Document how to write camera sensor drivers")
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    b9a5433 View commit details
    Browse the repository at this point in the history
  18. media: Documentation: media: Fix v4l2-async kerneldoc syntax

    Fix kerneldoc syntax in v4l2-async. The references were not produced
    correctly.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    6f8f9fd View commit details
    Browse the repository at this point in the history
  19. media: Documentation: v4l: Fix V4L2_CID_PIXEL_RATE documentation

    The V4L2_CID_PIXEL_RATE is nowadays used to tell pixel sampling rate in
    the sub-device's pixel array, not the pixel rate over a link (for which it
    also becomes unfit with the addition of multiplexed streams later on). Fix
    this.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    8925b53 View commit details
    Browse the repository at this point in the history
  20. media: Documentation: v4l: Improve frame rate configuration documenta…

    …tion
    
    Improve the documentation of the frame rate configuration so that it can
    be understood by a regular human being.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    e5a466d View commit details
    Browse the repository at this point in the history
  21. media: Documentation: v4l: Rework LP-11 documentation, add callbacks

    Rework LP-11 and LP-111 mode documentation to make it more understandable
    and useful. This involves adding pre_streamon and post_streamon callbacks
    that make it possible to explicitly transition the transmitter to either
    mode.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    013c35b View commit details
    Browse the repository at this point in the history
  22. media: v4l: subdev: Add pre_streamon and post_streamoff callbacks

    Add pre_streamon and post_streamoff callbacks that can be used to set a
    CSI-2 transmitter to LP-11 or LP-111 mode. This can be used by receiver
    drivers to reliably initialise the receiver when its initialisation
    requires software involvement.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    253171a View commit details
    Browse the repository at this point in the history
  23. media: ccs: Implement support for manual LP control

    Use the pre_streamon callback to transition the transmitter to either
    LP-11 or LP-111 mode if supported by the sensor.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    41a95d0 View commit details
    Browse the repository at this point in the history
  24. media: v4l2-flash: Add sanity checks for flash and indicator controls

    The V4L2 flash API supports combinations of indicator and flash LEDs. Due
    to this, there's a fair amount of code that deals with all the possible
    options and just reading one part of the file doesn't really tell which
    combinations are really possible.
    
    Make the checks more explicit to keep static analysers happy and to make
    the code more resilient to future mishaps.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    a40eba9 View commit details
    Browse the repository at this point in the history
  25. media: v4l2-flash: Check whether setting LED brightness succeeded

    Setting LED brightness may return an error but the return value was never
    checked by the V4L2 flash LED class. Do it now.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    4d7adf0 View commit details
    Browse the repository at this point in the history
  26. media: ov2740: use group write for digital gain

    As the RGB digital gains of ov2740 were not applied as group, some
    artifacts were observed in low light environment, use group write for
    digital gain can make the RGB digital can be guaranteed to applied
    together at frame boundary.
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    8436350 View commit details
    Browse the repository at this point in the history
  27. media: ov9734: use group write for digital gain

    As the RGB digital gains of ov9734 were not applied as group, some
    artifacts were observed in low light environment, use group write for
    digital gain can make the RGB digital can be guaranteed to applied
    together at frame boundary.
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    0e2b855 View commit details
    Browse the repository at this point in the history
  28. media: ov8856: ignore gpio and regulator for ov8856 with ACPI

    For ov8856 working with ACPI, it does not depend on the reset gpio
    and regulator to do reset and power control, so should get the gpio
    and regulator for non-ACPI cases only, otherwise it will break ov8856
    with ACPI.
    
    [Sakari Ailus: Wrap a line over 80 chars.]
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Tianshu Qiu <tian.shu.qiu@intel.com>
    Cc: Robert Foss <robert.foss@linaro.org>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    d84a2e4 View commit details
    Browse the repository at this point in the history
  29. media: imx258: Rectify mismatch of VTS value

    The frame_length_lines (0x0340) registers are hard-coded as follows:
    
    - 4208x3118
      frame_length_lines = 0x0c50
    
    - 2104x1560
      frame_length_lines = 0x0638
    
    - 1048x780
      frame_length_lines = 0x034c
    
    The driver exposes the V4L2_CID_VBLANK control in read-only mode and
    sets its value to vts_def - height, where vts_def is a mode-dependent
    value coming from the supported_modes array. It is set using one of
    the following macros defined in the driver:
    
      #define IMX258_VTS_30FPS                0x0c98
      #define IMX258_VTS_30FPS_2K             0x0638
      #define IMX258_VTS_30FPS_VGA            0x034c
    
    There's a clear mismatch in the value for the full resolution mode i.e.
    IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for
    the frame_length_lines register as stated above.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
    Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    51f93ad View commit details
    Browse the repository at this point in the history
  30. media: imx258: Limit the max analogue gain to 480

    The range for analog gain mentioned in the datasheet is [0, 480].
    The real gain formula mentioned in the datasheet is:
    
    	Gain = 512 / (512 – X)
    
    Hence, values larger than 511 clearly makes no sense. The gain
    register field is also documented to be of 9-bits in the datasheet.
    
    Certainly, it is enough to infer that, the kernel driver currently
    advertises an arbitrary analog gain max. Fix it by rectifying the
    value as per the data sheet i.e. 480.
    
    Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Umang Jain authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    f809665 View commit details
    Browse the repository at this point in the history
  31. media: dt-bindings: media: nxp,imx7-csi: Add i.MX8MM support

    The i.MX8MM integrates a CSI bridge IP core, as the i.MX7. There seems
    to be no difference between the two SoCs according to the reference
    manual, but as documentation may not be accurate, add a compatible
    string for the i.MX8MM, with a fallback on the compatible i.MX7.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    e8713c3 View commit details
    Browse the repository at this point in the history
  32. media: imx: imx7-media-csi: Set TWO_8BIT_SENSOR for >= 10-bit formats

    Sample code from NXP, as well as experiments on i.MX8MM with RAW10
    capture with an OV5640 sensor connected over CSI-2, showed that the
    TWO_8BIT_SENSOR field of the CSICR3 register needs to be set for formats
    larger than 8 bits. Do so, even if the reference manual doesn't clearly
    describe the effect of the field.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    a581c87 View commit details
    Browse the repository at this point in the history
  33. media: imx: imx7-media-csi: Don't set PIXEL_BIT in CSICR1

    The PIXEL_BIT field of the CSICR1 register is documented as setting the
    Bayer data width to 10 bits, and is set by the driver for all non-YUV
    pixel formats. Test code from NXP showed that the bit shouldn't be set
    for Bayer formats, and this was confirmed by experimentation with RAW8
    capture (which doesn't work when setting the field) and RAW10 capture
    (for which setting the field doesn't seem to make a difference) on
    i.MX8MM with an OV5640 sensor connected over CSI-2. Don't set it.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    8b22617 View commit details
    Browse the repository at this point in the history
  34. media: imx: imx7-media-csi: Fix buffer return upon stream start failure

    When the stream fails to start, the first two buffers in the queue have
    been moved to the active_vb2_buf array and are returned to vb2 by
    imx7_csi_dma_unsetup_vb2_buf(). The function is called with the buffer
    state set to VB2_BUF_STATE_ERROR unconditionally, which is correct when
    stopping the stream, but not when the start operation fails. In that
    case, the state should be set to VB2_BUF_STATE_QUEUED. Fix it.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    0ada169 View commit details
    Browse the repository at this point in the history
  35. media: imx: imx7_mipi_csis: convert some switch cases to the default

    Static analysis reports this false positive
    imx7-mipi-csis.c:1027:2: warning: 4th function call argument is
      an uninitialized value
    
    The variable 'align' is falsely reported as uninitialized.
    Even though all the cases are covered in the
    	switch (csis_fmt->width % 8) {
    
    Because there is no default case, it is reported as uninialized.
    
    Improve the switch by converting the most numerous set of cases
    to the default and silence the false positive.
    
    Signed-off-by: Tom Rix <trix@redhat.com>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Tom Rix authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    43c3f12 View commit details
    Browse the repository at this point in the history
  36. media: dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver…

    … phy and controller
    
    The i.MX8MQ SoC integrates a different MIPI CSI receiver as the i.MX8MM so
    describe the DT bindings for it.
    
    Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    merge authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    3725574 View commit details
    Browse the repository at this point in the history
  37. media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller

    Add a driver to support the i.MX8MQ MIPI CSI receiver. The hardware side
    is based on
    https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/imx8/mxc-mipi-csi2_yav.c?h=imx_5.4.70_2.3.0
    
    It's built as part of VIDEO_IMX7_CSI because that's documented to support
    i.MX8M platforms. This driver adds i.MX8MQ support where currently only the
    i.MX8MM platform has been supported.
    
    Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    merge authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    f33fd8d View commit details
    Browse the repository at this point in the history
  38. media: v4l2-dv-timings.c: fix wrong condition in two for-loops

    These for-loops should test against v4l2_dv_timings_presets[i].bt.width,
    not if i < v4l2_dv_timings_presets[i].bt.width. Luckily nothing ever broke,
    since the smallest width is still a lot higher than the total number of
    presets, but it is wrong.
    
    The last item in the presets array is all 0, so the for-loop must stop
    when it reaches that sentinel.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Reported-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    4108b3e View commit details
    Browse the repository at this point in the history
  39. media: Fix cosmetic error in TDA1997x driver

    The colon isn't followed by anything here.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    95d4536 View commit details
    Browse the repository at this point in the history
  40. media: TDA1997x: fix tda1997x_query_dv_timings() return value

    Correctly propagate the tda1997x_detect_std error value.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    7dee103 View commit details
    Browse the repository at this point in the history
  41. media: TDA1997x: report -ENOLINK after disconnecting HDMI source

    The TD1997x chip retains vper, hper and hsper register values when the
    HDMI source is disconnected. Use a different means of checking if the
    link is still valid.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    5cdd19b View commit details
    Browse the repository at this point in the history
  42. media: cec-pin: rename timer overrun variables

    The cec pin timer overruns are measured in microseconds, but the variable
    names include the millisecond symbol "ms". To avoid confusion, replace
    "ms" with "us" in the variable names and printed status message.
    
    Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    deborahbrouwer authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    c8b2639 View commit details
    Browse the repository at this point in the history
  43. media: tegra-cec: Handle errors of clk_prepare_enable()

    tegra_cec_probe() and tegra_cec_resume() ignored possible errors of
    clk_prepare_enable(). The patch fixes this.
    
    Found by Linux Driver Verification project (linuxtesting.org).
    
    Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    eunovm authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    3836707 View commit details
    Browse the repository at this point in the history
  44. media: venus: hfi: fix return value check in sys_get_prop_image_versi…

    …on()
    
    In case of error, the function qcom_smem_get() returns ERR_PTR()
    and never returns NULL. The NULL test in the return value check
    should be replaced with IS_ERR().
    
    Fixes: d566e78 ("media: venus : hfi: add venus image info into smem")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    331e06b View commit details
    Browse the repository at this point in the history
  45. media: venus: venc: Fix potential null pointer dereference on pointer…

    … fmt
    
    Currently the call to find_format can potentially return a NULL to
    fmt and the nullpointer is later dereferenced on the assignment of
    pixmp->num_planes = fmt->num_planes.  Fix this by adding a NULL pointer
    check and returning NULL for the failure case.
    
    Addresses-Coverity: ("Dereference null return")
    
    Fixes: aaaa93e ("[media] media: venus: venc: add video encoder files")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Colin Ian King authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    09ea971 View commit details
    Browse the repository at this point in the history
  46. media: venus: helper: do not set constrained parameters for UBWC

    Plane constraints firmware interface is to override the default
    alignment for a given color format. By default venus hardware has
    alignments as 128x32, but NV12 was defined differently to meet
    various usecases. Compressed NV12 has always been aligned as 128x32,
    hence not needed to override the default alignment.
    
    Fixes: bc28936 ("media: venus: helpers, hfi, vdec: Set actual plane constraints to FW")
    Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
    Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Mansur Alisha Shaik authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    1ac61fa View commit details
    Browse the repository at this point in the history
  47. media: docs: ext-ctrls-codec: Document cyclic intra-refresh zero cont…

    …rol value
    
    In all drivers _CYCLIC_INTRA_REFRESH_MB default control value is zero
    which means that the macroblocks will not be intra-refreshed. Document
    this _CYCLIC_INTRA_REFRESH_MB control behaviour in control description.
    
    Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Stanimir Varbanov authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    ea9f911 View commit details
    Browse the repository at this point in the history
  48. media: v4l2-ctrls: Add intra-refresh period control

    Add a control to set intra-refresh period.
    
    Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Stanimir Varbanov authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    9d5adee View commit details
    Browse the repository at this point in the history
  49. media: venus: venc: Add support for intra-refresh period

    Add support for intra-refresh period v4l2 control and drop
    cyclic intra-refresh macroblock control in the same time.
    
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Stanimir Varbanov authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    f7a3d3d View commit details
    Browse the repository at this point in the history
  50. media: venus: venc: add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRAN…

    …SFORM control
    
    Add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM control for
    H264 high profile and constrained high profile.
    
    Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Mansur Alisha Shaik authored and mchehab committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    bfee75f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2021

  1. Merge tag 'v5.14-rc4' into media_tree

    Linux 5.14-rc4
    
    * tag 'v5.14-rc4': (948 commits)
      Linux 5.14-rc4
      pipe: make pipe writes always wake up readers
      Revert "perf map: Fix dso->nsinfo refcounting"
      mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook()
      slub: fix unreclaimable slab stat for bulk free
      mm/migrate: fix NR_ISOLATED corruption on 64-bit
      mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code
      ocfs2: issue zeroout to EOF blocks
      ocfs2: fix zero out valid data
      lib/test_string.c: move string selftest in the Runtime Testing menu
      gve: Update MAINTAINERS list
      arch: Kconfig: clean up obsolete use of HAVE_IDE
      can: esd_usb2: fix memory leak
      can: ems_usb: fix memory leak
      can: usb_8dev: fix memory leak
      can: mcba_usb_start(): add missing urb->transfer_dma initialization
      can: hi311x: fix a signedness bug in hi3110_cmd()
      MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver
      scsi: fas216: Fix fall-through warning for Clang
      scsi: acornscsi: Fix fall-through warning for clang
      ...
    mchehab committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    9c3a0f2 View commit details
    Browse the repository at this point in the history