Commit 91f49b80 authored by Eugen Hristev's avatar Eugen Hristev Committed by Mauro Carvalho Chehab

media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check

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: 123aaf81 ("media: atmel: atmel-sama5d2-isc: fix YUYV format")
Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 1f0c113c
...@@ -291,7 +291,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc) ...@@ -291,7 +291,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc)
* Thus, if the YCYC mode is selected, replace it with the * Thus, if the YCYC mode is selected, replace it with the
* sama5d2-compliant mode which is YYCC . * 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_MASK;
rlp_mode |= ISC_RLP_CFG_MODE_YYCC; rlp_mode |= ISC_RLP_CFG_MODE_YYCC;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment