lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.17 381/772] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check
    Date
    From: Eugen Hristev <eugen.hristev@microchip.com>

    [ Upstream commit 91f49b80983f7bffdea9498209b2b896231ac776 ]

    While this does not happen in production, this check should be done
    versus the mask, as checking with the YCYC value may not include
    some bits that may be set.
    It is correct and safe to check the whole mask.

    Fixes: 123aaf816b95 ("media: atmel: atmel-sama5d2-isc: fix YUYV format")
    Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
    Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
    index 949035cdb846..a1fd240c6aeb 100644
    --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
    +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
    @@ -267,7 +267,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc)
    * Thus, if the YCYC mode is selected, replace it with the
    * sama5d2-compliant mode which is YYCC .
    */
    - if ((rlp_mode & ISC_RLP_CFG_MODE_YCYC) == ISC_RLP_CFG_MODE_YCYC) {
    + if ((rlp_mode & ISC_RLP_CFG_MODE_MASK) == ISC_RLP_CFG_MODE_YCYC) {
    rlp_mode &= ~ISC_RLP_CFG_MODE_MASK;
    rlp_mode |= ISC_RLP_CFG_MODE_YYCC;
    }
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-06-07 23:12    [W:2.379 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site