• Janusz Krzysztofik's avatar
    media: ov6650: Fix stored frame format not in sync with hardware · 3143b459
    Janusz Krzysztofik authored
    The driver stores frame format settings supposed to be in line with
    hardware state in a device private structure.  Since the driver initial
    submission, those settings are updated before they are actually applied
    on hardware.  If an error occurs on device update, the stored settings
    my not reflect hardware state anymore and consecutive calls to
    .get_fmt() may return incorrect information.  That in turn may affect
    ability of a bridge device to use correct DMA transfer settings if such
    incorrect informmation on active frame format returned by .get_fmt() is
    used.
    
    Assuming a failed device update means its state hasn't changed, update
    frame format related settings stored in the device private structure
    only after they are successfully applied so the stored values always
    reflect hardware state as closely as possible.
    
    Fixes: 2f6e2404 ("[media] SoC Camera: add driver for OV6650 sensor")
    Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    3143b459
ov6650.c 27.2 KB