• Janusz Krzysztofik's avatar
    media: ov6650: Fix crop rectangle affected by set format · 985d2d7a
    Janusz Krzysztofik authored
    According to subdevice interface specification found in V4L2 API
    documentation, set format pad operations should not affect image
    geometry set in preceding image processing steps. Unfortunately, that
    requirement is not respected by the driver implementation of set format
    as it was not the case when that code was still implementing a pair of
    now obsolete .s_mbus_fmt() / .try_mbus_fmt() video operations before
    they have been merged and reused as an implementation of .set_fmt() pad
    operation by commit 717fd5b4 ("[media] v4l2: replace try_mbus_fmt
    by set_fmt").
    
    Exclude non-compliant crop rectangle adjustments from set format try,
    as well as a call to .set_selection() from set format active processing
    path, so only frame scaling is applied as needed and crop rectangle is
    no longer modified.
    
    [Sakari Ailus: Rebase on subdev state patches]
    
    Fixes: 717fd5b4 ("[media] v4l2: replace try_mbus_fmt by set_fmt")
    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@kernel.org>
    985d2d7a
ov6650.c 27.3 KB