Re: [PATCH] vivid: fix kernel oops when enabling HFLIP and OSD

2018-10-08 Thread Hans Verkuil
On 10/08/2018 09:08 PM, Hans Verkuil wrote: > When the OSD is on (i.e. vivid displays text on top of the test pattern), and > you enable hflip, then the driver crashes. > > The cause turned out to be a division of a negative number by an unsigned > value. > You expect that -8 / 2 would be -4, but

Re: [PATCH] vivid: fix kernel oops when enabling HFLIP and OSD

2018-10-08 Thread Hans Verkuil
On 10/08/2018 09:08 PM, Hans Verkuil wrote: > When the OSD is on (i.e. vivid displays text on top of the test pattern), and > you enable hflip, then the driver crashes. > > The cause turned out to be a division of a negative number by an unsigned > value. > You expect that -8 / 2 would be -4, but

[PATCH] vivid: fix kernel oops when enabling HFLIP and OSD

2018-10-08 Thread Hans Verkuil
When the OSD is on (i.e. vivid displays text on top of the test pattern), and you enable hflip, then the driver crashes. The cause turned out to be a division of a negative number by an unsigned value. You expect that -8 / 2 would be -4, but in reality it is 2147483644 :-( Signed-off-by: Hans Ver