lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Mar 2020 16:37:49 -0300
From:   Helen Koike <helen.koike@...labora.com>
To:     Shuah Khan <skhan@...uxfoundation.org>,
        Nícolas F. R. A. Prado 
        <nfraprado@...tonmail.com>, linux-media@...r.kernel.org
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil@...all.nl>,
        linux-kernel@...r.kernel.org, lkcamp@...ts.libreplanetbr.org
Subject: Re: [PATCH v2 2/3] media: vimc: Add missing {RGB,BGR,GBR}888 media
 bus codes



On 3/26/20 6:56 PM, Shuah Khan wrote:
> On 3/26/20 3:47 PM, Nícolas F. R. A. Prado wrote:
>> Add missing RGB888_*, BGR888_* and GBR888_* media bus codes in the
>> vimc_pix_map_list. Since there is no GBR24 pixelformat, use the RGB24
>> pixelformat for MEDIA_BUS_FMT_GBR888_1X24.
>>
>> Co-developed-by: Vitor Massaru Iha <vitor@...saru.org>
>> Signed-off-by: Vitor Massaru Iha <vitor@...saru.org>
>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...tonmail.com>
>> ---
>>
>> Changes in v2:
>> - Fix array formatting
>> - Change commit message to reflect v2 changes
>> - Change code array size
>> - Add other BGR888 and RGB888 formats to BGR24 and RGB24 pixelformats
>>
>>   drivers/media/platform/vimc/vimc-common.c | 16 ++++++++++++++--
>>   drivers/media/platform/vimc/vimc-common.h |  2 +-
>>   2 files changed, 15 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/platform/vimc/vimc-common.c b/drivers/media/platform/vimc/vimc-common.c
>> index 119846f3eaa5..11489334cff7 100644
>> --- a/drivers/media/platform/vimc/vimc-common.c
>> +++ b/drivers/media/platform/vimc/vimc-common.c
>> @@ -19,13 +19,25 @@ static const struct vimc_pix_map vimc_pix_map_list[] = {
>>         /* RGB formats */
>>       {
>> -        .code = { MEDIA_BUS_FMT_BGR888_1X24 },
>> +        .code = {
>> +            MEDIA_BUS_FMT_BGR888_1X24,
>> +            MEDIA_BUS_FMT_BGR888_3X8
>> +        },
>>           .pixelformat = V4L2_PIX_FMT_BGR24,
>>           .bpp = 3,
>>           .bayer = false,
>>       },
>>       {
>> -        .code = { MEDIA_BUS_FMT_RGB888_1X24 },
>> +        .code = {
>> +            MEDIA_BUS_FMT_RGB888_1X24,
>> +            MEDIA_BUS_FMT_RGB888_2X12_BE,
>> +            MEDIA_BUS_FMT_RGB888_2X12_LE,
>> +            MEDIA_BUS_FMT_RGB888_3X8,
>> +            MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
>> +            MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
>> +            MEDIA_BUS_FMT_RGB888_1X32_PADHI,
>> +            MEDIA_BUS_FMT_GBR888_1X24
>> +        },
>>           .pixelformat = V4L2_PIX_FMT_RGB24,
>>           .bpp = 3,
>>           .bayer = false,
>> diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/platform/vimc/vimc-common.h
>> index 585441694c86..d5e0e8d32542 100644
>> --- a/drivers/media/platform/vimc/vimc-common.h
>> +++ b/drivers/media/platform/vimc/vimc-common.h
>> @@ -69,7 +69,7 @@ do {                                    \
>>    * V4L2_PIX_FMT_* fourcc pixelformat and its bytes per pixel (bpp)
>>    */
>>   struct vimc_pix_map {
>> -    unsigned int code[1];
> 
>> +    unsigned int code[8];
> Please add a define for this instead of hard coded value.

With this change suggested by Shuah:

Acked-by: Helen Koike <helen.koike@...labora.com>

Regards,
Helen

> 
> 
>>       unsigned int bpp;
>>       u32 pixelformat;
>>       bool bayer;
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ