00:07
machinehum has quit [Ping timeout: 480 seconds]
00:48
machinehum has joined #linux-sunxi
00:56
machinehum has quit [Ping timeout: 480 seconds]
01:36
montjoie has joined #linux-sunxi
01:37
machinehum has joined #linux-sunxi
01:38
montjoie_ has quit [Ping timeout: 480 seconds]
01:45
machinehum has quit [Ping timeout: 480 seconds]
01:55
apritzel has quit [Ping timeout: 480 seconds]
02:27
machinehum has joined #linux-sunxi
02:35
machinehum has quit [Ping timeout: 480 seconds]
03:10
colinsane has quit []
03:12
colinsane has joined #linux-sunxi
03:17
machinehum has joined #linux-sunxi
03:21
colinsane has quit []
03:24
colinsane has joined #linux-sunxi
03:25
machinehum has quit [Ping timeout: 480 seconds]
04:06
machinehum has joined #linux-sunxi
04:14
machinehum has quit [Ping timeout: 480 seconds]
04:39
hexdump0815 has joined #linux-sunxi
04:40
machinehum has joined #linux-sunxi
04:41
hexdump01 has quit [Ping timeout: 480 seconds]
04:48
machinehum has quit [Ping timeout: 480 seconds]
05:12
JohnDoe_71Rus has joined #linux-sunxi
05:29
machinehum has joined #linux-sunxi
05:37
machinehum has quit [Ping timeout: 480 seconds]
05:56
gsz has joined #linux-sunxi
05:57
apritzel has joined #linux-sunxi
06:07
apritzel has quit [Ping timeout: 480 seconds]
07:23
warpme has joined #linux-sunxi
07:35
gsz has quit [Ping timeout: 480 seconds]
07:37
pg12 has quit [Remote host closed the connection]
07:37
pg12 has joined #linux-sunxi
07:49
KREYREN__ has quit [Remote host closed the connection]
07:50
KREYREN__ has joined #linux-sunxi
07:58
warpme has joined #linux-sunxi
07:59
advancel has joined #linux-sunxi
08:03
vertex004 has joined #linux-sunxi
08:15
montjoie has quit [Remote host closed the connection]
08:49
Hypfer is now known as Guest13836
08:49
Hypfer has joined #linux-sunxi
08:54
Guest13836 has quit [Ping timeout: 480 seconds]
09:10
Net147_ has joined #linux-sunxi
09:10
Net147 has quit [Ping timeout: 480 seconds]
09:24
apritzel has joined #linux-sunxi
09:48
macromorgan_ has joined #linux-sunxi
09:50
montjoie has joined #linux-sunxi
09:55
uLumia has joined #linux-sunxi
09:55
macromorgan has quit [Ping timeout: 480 seconds]
10:30
Hypfer is now known as Guest13845
10:30
Hypfer has joined #linux-sunxi
10:31
Guest13845 has quit [Remote host closed the connection]
11:28
dsimic is now known as Guest13849
11:28
dsimic has joined #linux-sunxi
11:30
Guest13849 has quit [Ping timeout: 480 seconds]
12:40
gsz has joined #linux-sunxi
12:42
warpme has joined #linux-sunxi
13:15
JohnDoe_71Rus has quit []
13:15
apritzel has quit []
13:32
uLumia has joined #linux-sunxi
13:46
apritzel has joined #linux-sunxi
14:05
KREYREN_ has joined #linux-sunxi
14:05
KREYREN__ has quit [Remote host closed the connection]
14:11
macromorgan_ has quit []
14:11
macromorgan has joined #linux-sunxi
14:36
KREYREN__ has joined #linux-sunxi
14:37
KREYREN_ has quit [Remote host closed the connection]
14:57
JohnDoe_71Rus has joined #linux-sunxi
15:45
<
apritzel >
rzr: you did everything correctly, just happened to send the patch while I was away ;-)
16:23
Hypfer is now known as Guest13871
16:23
Hypfer has joined #linux-sunxi
16:28
Guest13871 has quit [Ping timeout: 480 seconds]
17:06
vertex004 has quit [Remote host closed the connection]
17:20
chewitt has quit [Quit: Zzz..]
17:24
gamiee has quit [Remote host closed the connection]
17:25
gamiee has joined #linux-sunxi
17:29
machinehum has joined #linux-sunxi
17:48
vertex004 has joined #linux-sunxi
17:49
<
jernej >
I only build tested it and checked (offline) that tables are correctly written in SRAM
17:50
<
jernej >
everything else was updated to follow open source version that I linked few days ago
17:56
<
jernej >
hm... probably ffmpeg can use stateless v4l2 decoding for jpeg
17:57
<
jernej >
*can be used
17:59
<
linkmauve >
I’ve started (re)adding JPEG decoding support in Onix today, I’ll try it alongside.
17:59
<
linkmauve >
Experimental userspace against experimental kernel driver, yay~
18:00
<
jernej >
that's how first of a kind codecs are developed :)
18:01
<
jernej >
but at least with JPEG it's easier, no extra data needed, just put whole image in buffer, submit it and hope for the best
18:02
<
jernej >
note that make request api optional for JPEG
18:21
vagrantc has joined #linux-sunxi
18:31
apritzel has quit [Ping timeout: 480 seconds]
18:41
mripard has quit [Quit: mripard]
18:57
machinehum has quit [Ping timeout: 480 seconds]
18:58
JohnDoe_71Rus has quit []
19:05
KREYREN__ has quit [Remote host closed the connection]
19:06
KREYREN__ has joined #linux-sunxi
19:08
<
linkmauve >
jernej, hmm, I receive -53 when I VIDIOC_QBUF the out buffer containing my JPEG data.
19:10
<
jernej >
the only code that I changed outside jpeg driver itself it was to allow non-request api
19:10
<
jernej >
maybe that is causing the issue?
19:11
<
linkmauve >
I made sure not to pass a requests fd.
19:11
<
linkmauve >
I’ll try with one then.
19:12
<
jernej >
you can try also with supports_requests = false
19:13
KREYREN__ has quit [Remote host closed the connection]
19:13
KREYREN__ has joined #linux-sunxi
19:13
<
jernej >
although it's probably some corner case that I didn't see
19:14
<
linkmauve >
I get ENOFILE on queuing the request fd on the media device when I do set it on the out buffer.
19:15
<
jernej >
just revert change I made for JPEG in cedrus_video.c at the end of the file
19:18
<
linkmauve >
Hmm no, even when I set it back to true it still rejects my MEDIA_REQUEST_IOC_QUEUE of that fd.
19:19
<
linkmauve >
But it seems quite useless, and no userspace program will ever use the request fd for decoding a JPEG I guess.
19:19
apritzel has joined #linux-sunxi
19:19
<
linkmauve >
I’ll revert that.
19:20
machinehum has joined #linux-sunxi
19:23
<
linkmauve >
Hmm, still -53 on QBUF when I set it to false, so that it doesn’t support requests at all.
19:33
<
jernej >
linkmauve: can you try hardcoding requires_requests to false? I think this is set earlier than format
19:33
<
linkmauve >
That’s exactly what I did.
19:33
<
linkmauve >
src_vq->supports_requests = false;
19:33
<
linkmauve >
src_vq->requires_requests = false;
19:33
<
linkmauve >
This is what I currently have, yet QBUF fails.
19:33
<
linkmauve >
[ 121.477969] video0: VIDIOC_QBUF: error -53: 00:00:00.000000 index=0, type=vid-out, request_fd=0, flags=0x00004000, field=any, sequence=0, memory=mmap, bytesused=451385, offset/userptr=0x0, length=451385
19:33
<
linkmauve >
[ 121.478047] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
19:34
<
linkmauve >
This is what my kernel logs with 0xffff in /sys/class/video4linux/video0/dev_debug
19:37
<
jernej >
linkmauve: is it possible that you set V4L2_BUF_FLAG_REQUEST_FD flag to buffer in userspace?
19:38
<
linkmauve >
No, flags isn’t 0x00804000, it is 0x00004000.
19:45
<
linkmauve >
It sounds like drivers/media/common/videobuf2/videobuf2-core.c line 1654, but I can’t figure out how to enable dprintk(). ^^'
19:48
<
linkmauve >
Ah, I got a kernel oops…
19:49
<
linkmauve >
But this time QBUF worked, after I just removed the level check in dprintk(). :o
19:49
<
jernej >
that place could be hit only if requires_requests is true
19:50
<
linkmauve >
Oh, there is something wrong here!
19:51
<
linkmauve >
The trigger happens before the second QBUF, so it can’t know where to write the output…
19:51
<
jernej >
decoding should be triggered according to your output
19:52
<
jernej >
oh, try with queueing capture buffer first and then output buffer
19:52
<
linkmauve >
Yeah, but one syscall too early.
19:53
<
jernej >
since it doesn't use request api, capture and output buffer are probably not connected
19:54
<
linkmauve >
Now all of my ssh connections froze all at once at this point.
19:55
<
linkmauve >
I expect it’s the same crash I previously experienced when the decoding triggers.
19:55
<
jernej >
call streamon on output after capture
19:58
<
linkmauve >
Ah, this time DQBUF set the V4L2_BUF_FLAG_ERROR flag on the out buffer, but not on the cap buffer.
19:59
<
linkmauve >
[ 49.005107] cedrus_irq: 6 (error=6 done=5)
20:00
<
linkmauve >
And the whole board is frozen again.
20:00
<
jernej >
hm... looks like it's easier to give Cedrus request api jobs, since whole driver was designed that wa
20:00
<
linkmauve >
I’ve also tried doing the STREAMONs after the QBUFs.
20:01
<
linkmauve >
paulk, did your refactorings change anything in that area?
20:02
<
linkmauve >
Why would the error flag be on the out buffer? Could that mean that the capture buffer received the expected decoded data?
20:03
<
linkmauve >
Ah no, the error flag is present on both buffers actually.
20:07
advancel has quit [Quit: Leaving]
20:09
<
paulk >
mhh doesn't ring a bell
20:09
<
paulk >
but I've seen code which checks other registers for jpeg decode status though
20:10
<
linkmauve >
I’m decoding a 4:4:4 JPEG, yet the driver only allocates enough space for 4:2:0 data!
20:10
<
linkmauve >
Hmm, but it can only ever decode to ST12, which is 4:2:0, so that’s not it…
20:12
<
jernej >
linkmauve: oh, for 444 and 411 format you have to set bit 18 to VE_CTL register, so core knows that it needs transform to 420
20:12
<
jernej >
I forgot to implement that
20:14
<
linkmauve >
I don’t see any VE_CTL here.
20:14
<
jernej >
register 0x14
20:15
<
linkmauve >
Ok, VE_DEC_MPEG_CTRL.
20:15
<
jernej >
yeah, that one :)
20:20
vertex004 has quit [Remote host closed the connection]
20:27
<
linkmauve >
Actually, my guess is that the oops is just hidden once in a while, when the kernel crashes after it has managed to send it over the ssh connection.
20:27
<
linkmauve >
I’ll switch to a serial console.
20:34
<
linkmauve >
Ok, serial is much worse than ssh, because it is so much slower.
20:42
<
jernej >
I'll try to test it tomorrow on H6 with IOMMU enabled, so it won't crash the system
20:44
<
linkmauve >
Thanks!
20:50
apritzel has quit [Ping timeout: 480 seconds]
20:50
<
linkmauve >
I’ve also tested with a 4:2:0 JPEG, but it did an oops as well.
20:59
<
jernej >
is there any collection of sample JPEG files with different features used?
20:59
<
linkmauve >
I don’t have any test suite atm.
20:59
<
linkmauve >
I just picked one from the photos people sent me over time.
21:01
<
linkmauve >
Perhaps Fate or Gstreamer have one?
21:06
<
linkmauve >
jernej, if you want my userspace program to test it with, `git clone -b jpeg-decoder
https://git.linkmauve.fr/onix.git ` and then `cargo run --release --example=jpeg-decoder <image.jpeg> <width> <height> <output.st12>`.
21:14
machinehum has quit [Ping timeout: 480 seconds]
21:15
<
jernej >
interesting, there is mjpegplus lib, which supports more formats
22:07
apritzel has joined #linux-sunxi
22:39
linkmauve has quit [Quit: Gateway shutdown]
22:46
vagrantc has quit [Quit: leaving]