lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] media: rcar-vin: Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format
Hi Lad,

I spent all day playing with different solutions to how to move forward
with this. My main problem is I have no setup where I can produce RAW
image formats to test. But reading the datasheet I see the problem you
are trying to solve.

I think for now the best solution might be to in rvin_crop_scale_comp()
add a check for if the pixelformat is RAW and cut the value written to
VNIS_REG in half. The bpp for the format shall still be set to 1.


fmt = rvin_format_from_pixel(vin, vin->format.pixelformat);
stride = vin->format.bytesperline / fmt->bpp;

if (vin->format.pixelformat == V4L2_PIX_FMT_SRGGB8)
stride /= 2;

rvin_write(vin, stride, VNIS_REG);

I would also add a nice big comment above the if () that explains why
the stride is cut in half for raw.

On 2020-04-07 11:56:23 +0200, Niklas wrote:
> Hi Lad,
>
> On 2020-04-06 18:20:33 +0100, Lad, Prabhakar wrote:
> > Did you manage to get the required information on this ?
>
> I'm still working on it, sorry for not completing it last week. I will
> let you know as soon as I can.
>
> --
> Regards,
> Niklas Söderlund

--
Regards,
Niklas Söderlund

\
 
 \ /
  Last update: 2020-04-14 21:43    [W:2.057 / U:1.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site