18 Jan, 2021

1 commit


04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

7 commits

  • [ Upstream commit eb08c48132a1f594478ab9fa2b6ee646c3513a49 ]

    If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather
    than an errno, because we doesn't initialize the return value.

    Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
    Reported-by: Hulk Robot
    Signed-off-by: Zhang Xiaoxu
    Reviewed-by: Marco Felsch
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Zhang Xiaoxu
     
  • [ Upstream commit 1ed36ecd1459b653cced8929bfb37dba94b64c5d ]

    To comply with the intended usage of the V4L2 selection target when
    used to retrieve a sensor image properties, adjust the rectangles
    returned by the imx219 driver.

    The top/left crop coordinates of the TGT_CROP rectangle were set to
    (0, 0) instead of (8, 8) which is the offset from the larger physical
    pixel array rectangle. This was also a mismatch with the default values
    crop rectangle value, so this is corrected. Found with v4l2-compliance.

    While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and
    CROP_BOUNDS have the same size as the non-active pixels are not readable
    using the selection API. Found with v4l2-compliance.

    [reword commit message, use macros for pixel offsets]

    Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection")
    Signed-off-by: Hans Verkuil
    Signed-off-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Hans Verkuil
     
  • [ Upstream commit 7fe1d4453fb6bf103d668a19d957a7b2fc21887c ]

    The MAX9271 GPIO1 line that controls the sensor reset is by default
    enabled after a serializer chip reset.

    As rdacm20 does not go through an explicit serializer reset, make sure
    GPIO1 is enabled to make the camera module driver more robust.

    Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
    Signed-off-by: Jacopo Mondi
    Reviewed-by: Kieran Bingham
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Jacopo Mondi
     
  • [ Upstream commit 909a0a189c677307edd461e21fd962784370d27f ]

    Fix GPIO enable/disable operations which wrongly read the 0x0f register
    to obtain the current mask of the enabled lines instead of using
    the correct 0x0e register.

    Also fix access to bit 0 of the register which is marked as reserved.

    Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
    Signed-off-by: Jacopo Mondi
    Reviewed-by: Geert Uytterhoeven
    Reviewed-by: Kieran Bingham
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Jacopo Mondi
     
  • [ Upstream commit 9b1b0cb0636166187478ef68d5b95f5caea062ec ]

    This is supposed to return negative error codes but the type is bool so
    it returns true instead.

    Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Dan Carpenter
     
  • [ Upstream commit eeb76afbe8d91e112396c6281cd020725160f006 ]

    Stop video streaming when requested.

    When s_stream is called to stop the video streaming, if/else condition calls
    start_streaming function instead of the one for stopping it.

    Fixes: 436190596241 ("media: imx214: Add imx214 camera sensor driver")
    Signed-off-by: Daniel Gomez
    Signed-off-by: Ricardo Ribalda
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Daniel Gomez
     
  • [ Upstream commit 68579b32e786f9680e7c6b6c7d17e26943bb02b3 ]

    Fix PCLK polarity not being taken into account.
    Add comments about BT656 register control.
    Remove useless ov5640_set_stream_bt656() function.
    Refine comments about MIPI IO register control.

    Fixes: 4039b03720f7 ("media: i2c: ov5640: Add support for BT656 mode")
    Signed-off-by: Hugues Fruchet
    Reviewed-by: Jacopo Mondi
    Tested-by: Lad Prabhakar
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Hugues Fruchet
     

14 Dec, 2020

10 commits


08 Oct, 2020

2 commits

  • tvp7002.c: In function 'tvp7002_g_register':
    tvp7002.c:691:11: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
    691 | reg->val = val;
    | ~~~~~~~~~^~~~~

    Just return without setting 'reg' if tvp7002_read returns an error.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • struct s5k5baf_fw ends with this:

    struct {
    u16 id;
    u16 offset;
    } seq[0];
    u16 data[];
    };

    which is rather confusing and can cause gcc warnings:

    s5k5baf.c: In function 's5k5baf_load_setfile.isra':
    s5k5baf.c:390:13: warning: array subscript 65535 is outside the bounds of an interior zero-length array 'struct [0]' [-Wzero-length-bounds]
    390 | if (f->seq[i].offset + d seq[0].id and 'seq[0]' can be replaced by
    'seq[]'.

    This is both more readable and solved that warnings.

    Signed-off-by: Hans Verkuil
    Cc: Kyungmin Park
    Cc: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

26 Sep, 2020

2 commits

  • tc358743_cec_isr is misnammed, it is not the main isr.
    So rename it to be consistent with its siblings,
    tc358743_cec_handler.

    It also does not check if its input parameter 'handled' is
    is non NULL like its siblings, so add a check.

    Fixes: a0ec8d1dc42e ("media: tc358743: add CEC support")
    Signed-off-by: Tom Rix
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Tom Rix
     
  • clang static analysis flags this error

    tc358743.c:1468:9: warning: Branch condition evaluates
    to a garbage value
    return handled ? IRQ_HANDLED : IRQ_NONE;
    ^~~~~~~
    handled should be initialized to false.

    Fixes: d747b806abf4 ("[media] tc358743: add direct interrupt handling")
    Signed-off-by: Tom Rix
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Tom Rix
     

10 Sep, 2020

10 commits

  • OV8856 supports 3264x2448 @ 30 FPS, which is added
    in this commit.

    Signed-off-by: Robert Foss
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Robert Foss
     
  • OV8856 supports 1632x1224 @ 60 FPS, which is added
    in this commit.

    Signed-off-by: Robert Foss
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Robert Foss
     
  • v4l2_async_notifier_add_subdev() requires the asd to be allocated
    dynamically, but the max9286 driver embeds it in the max9286_source
    structure. This causes memory corruption when the notifier is destroyed
    at remove time with v4l2_async_notifier_cleanup().

    Fix this issue by registering the asd with
    v4l2_async_notifier_add_fwnode_subdev(), which allocates it dynamically
    internally. A new max9286_asd structure is introduced, to store a
    pointer to the corresonding max9286_source that needs to be accessed
    from bound and unbind callbacks. There's no need to take an extra
    explicit reference to the fwnode anymore as
    v4l2_async_notifier_add_fwnode_subdev() does so internally.

    While at it, use %u instead of %d to print the unsigned index in the
    error message from the v4l2_async_notifier_add_fwnode_subdev() error
    path.

    Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver")
    Signed-off-by: Laurent Pinchart
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • Fail probe if unsupported bus_type is detected.

    Signed-off-by: Lad Prabhakar
    Reviewed-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • Enable support for BT656 mode.

    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Reviewed-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • Configure HVP lines in s_power callback instead of configuring everytime
    in ov5640_set_stream_dvp().

    Alongside also disable MIPI in DVP mode.

    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Tested-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • During testing this sensor on iW-RainboW-G21D-Qseven platform in 8-bit DVP
    mode with rcar-vin bridge noticed the capture worked fine for the first run
    (with yavta), but for subsequent runs the bridge driver waited for the
    frame to be captured. Debugging further noticed the data lines were
    enabled/disabled in stream on/off callback and dumping the register
    contents 0x3017/0x3018 in ov5640_set_stream_dvp() reported the correct
    values, but yet frame capturing failed.

    To get around this issue data lines are enabled in s_power callback.
    (Also the sensor remains in power down mode if not streaming so power
    consumption shouldn't be affected)

    Fixes: f22996db44e2d ("media: ov5640: add support of DVP parallel interface")
    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Tested-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • In preparation for adding DVP configuration in s_power callback
    move mipi configuration into separate function

    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Tested-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • Keep the sensor in software power down mode and wake up only in
    ov5640_set_stream_dvp() callback.

    Signed-off-by: Lad Prabhakar
    Reviewed-by: Biju Das
    Tested-by: Jacopo Mondi
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Lad Prabhakar
     
  • Alan Chiang's e-mail address no longer works. Remove it.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     

07 Sep, 2020

1 commit

  • Linux 5.9-rc4

    * tag 'v5.9-rc4': (1001 commits)
    Linux 5.9-rc4
    io_uring: fix linked deferred ->files cancellation
    io_uring: fix cancel of deferred reqs with ->files
    include/linux/log2.h: add missing () around n in roundup_pow_of_two()
    mm/khugepaged.c: fix khugepaged's request size in collapse_file
    mm/hugetlb: fix a race between hugetlb sysctl handlers
    mm/hugetlb: try preferred node first when alloc gigantic page from cma
    mm/migrate: preserve soft dirty in remove_migration_pte()
    mm/migrate: remove unnecessary is_zone_device_page() check
    mm/rmap: fixup copying of soft dirty and uffd ptes
    mm/migrate: fixup setting UFFD_WP flag
    mm: madvise: fix vma user-after-free
    checkpatch: fix the usage of capture group ( ... )
    fork: adjust sysctl_max_threads definition to match prototype
    ipc: adjust proc_ipc_sem_dointvec definition to match prototype
    mm: track page table modifications in __apply_to_page_range()
    MAINTAINERS: IA64: mark Status as Odd Fixes only
    MAINTAINERS: add LLVM maintainers
    MAINTAINERS: update Cavium/Marvell entries
    mm: slub: fix conversion of freelist_corrupted()
    ...

    Mauro Carvalho Chehab
     

03 Sep, 2020

1 commit

  • rc-core kapi uses nanoseconds for infrared durations for receiving, and
    microseconds for sending. The uapi already uses microseconds for both,
    so this patch does not change the uapi.

    Infrared durations do not need nanosecond resolution. IR protocols do not
    have durations shorter than about 100 microseconds. Some IR hardware offers
    250 microseconds resolution, which is sufficient for most protocols.
    Better hardware has 50 microsecond resolution and is enough for every
    protocol I am aware off.

    Unify on microseconds everywhere. This simplifies the code since less
    conversion between microseconds and nanoseconds needs to be done.

    This affects:
    - rx_resolution member of struct rc_dev
    - timeout member of struct rc_dev
    - duration member in struct ir_raw_event

    Cc: "Bruno Prémont"
    Cc: Hans Verkuil
    Cc: Maxim Levitsky
    Cc: Patrick Lerda
    Cc: Kevin Hilman
    Cc: Neil Armstrong
    Cc: Jerome Brunet
    Cc: Martin Blumenstingl
    Cc: Sean Wang
    Cc: Matthias Brugger
    Cc: Patrice Chotard
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: "David Härdeman"
    Cc: Benjamin Valentin
    Cc: Antti Palosaari
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     

01 Sep, 2020

5 commits

  • The unit of exposure value is different from other OmniVision sensors,
    driver will divide by 2 before set register, the exposure range exposed
    by v4l2 ctrl to user should be same as others, so the calculation for
    the maximum exposure value in current driver need be fixed.

    Signed-off-by: Bingbu Cao
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Bingbu Cao
     
  • Make use of SCCB APIs for regmap operations.
    Remove i2c_check_functionality as devm_regmap_init_sccb
    does it for us.

    Signed-off-by: Raag Jadav
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Raag Jadav
     
  • 1) the numerator and/or denominator might be 0, in that case
    fall back to the default frame interval. This is per the spec
    and this caused a v4l2-compliance failure.

    2) the updated frame interval wasn't returned in the s_frame_interval
    subdev op.

    Signed-off-by: Hans Verkuil
    Reviewed-by: Luca Ceresoli
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • clang static analysis reports this error

    m5mols_core.c:767:4: warning: Called function pointer
    is null (null dereference) [core.CallAndMessage]
    info->set_power(&client->dev, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In other places, the set_power ptr is checked.
    So add a check.

    Fixes: bc125106f8af ("[media] Add support for M-5MOLS 8 Mega Pixel camera ISP")
    Signed-off-by: Tom Rix
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Tom Rix
     
  • Currently the error return from the call to max9286_read is masked
    with 0xf0 so the following check for a negative error return is
    never true. Fix this by checking for an error first, then masking
    the return value for subsequent conflink_mask checking.

    Addresses-Coverity: ("Logically dead code")

    Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver")
    Signed-off-by: Colin Ian King
    Reviewed-by: Kieran Bingham
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Colin Ian King