liquidAcid has quit [Quit: Leaving]
prahal__ has quit [Remote host closed the connection]
prahal__ has joined #linux-exynos
zombah has quit [Quit: Leaving]
dlan has quit [Ping timeout: 240 seconds]
dlan has joined #linux-exynos
dlan has quit [Ping timeout: 264 seconds]
dlan has joined #linux-exynos
dlan has quit [Ping timeout: 260 seconds]
dlan has joined #linux-exynos
liquidAcid has joined #linux-exynos
prahal__ has quit [Quit: prahal__]
nashpa has quit [Ping timeout: 252 seconds]
prahal__ has joined #linux-exynos
prahal__ has quit [Read error: Connection reset by peer]
prahal___ has joined #linux-exynos
nashpa has joined #linux-exynos
prahal___ has quit [Ping timeout: 256 seconds]
ssvb has joined #linux-exynos
prahal___ has joined #linux-exynos
<liquidAcid> [ 88.569822] PAGE FAULT occurred at 0xdfb80 by 10a40000.sysmmu(Page table base: 0x6d860000)
<liquidAcid> prahal___, oops i did it again :)
<prahal___> liquidAcid: gasp , ! thanks for the feedback
<prahal___> gtg
ssvb has quit [Ping timeout: 246 seconds]
prahal___ has quit [Ping timeout: 256 seconds]
prahal__ has joined #linux-exynos
<liquidAcid> prahal__, seems to be an out-of-array-bounds access, more details later
ssvb has joined #linux-exynos
<liquidAcid> prahal__, userspace buffer allocated via posix_memalign to system pagesize: userptr (0xb189d000), size = 458752
<liquidAcid> g2d_map_cmdlist_gem creates this dma_addr out of it: 0x20080000
<liquidAcid> PAGE FAULT occurred at 0x200f0380 by 10a40000.sysmmu(Page table base: 0x6d9d4000)
<liquidAcid> 0x200f0380 - 0x20080000 = 0x70380 = 459648
<liquidAcid> and 459648 > 458752, so it reads beyond the buffer
<liquidAcid> the only thing i wonder: WHY?
<prahal__> I had not noticed before that g2d iommu space was different than the main exynos_drm iommu space
<prahal__> I remind of http://lwn.net/Articles/607626/ namely "FIMD, HDMI-mixer and others form together Exynos DRM subsystem; it is highly welcome to let them to operate in the same, shared DMA address space to simplify buffer sharing"
<liquidAcid> i think it's sysmmu_g2d, and not sysmmu_tv as the rest
<prahal__> that is one point I find hard about exynos drm the above also tell "DMA-mapping subsystem assumes that there is only one DMA (IO) address space associated with the given struct device entity."
<prahal__> then "To let driver to access other DMA (IO) address spaces a sub-device has been introduced. This approach has been already used by s5p-mfc driver "
<prahal__> by hard I mean hackish and confusing
<prahal__> will be afk
<liquidAcid> shouldn't make a difference for this issue though, at least i don't think so
<liquidAcid> maybe i should overallocate the buffer and see what happens then
prahal__ has quit [Quit: prahal__]
prahal___ has joined #linux-exynos
dlezcano has quit [Ping timeout: 240 seconds]
<liquidAcid> not completly sure, but i get the impression that this is totally broken. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/exynos/exynos_drm_g2d.c#n651
<liquidAcid> i only checks if the "area" size of the buffer is smaller than the buffer size
<liquidAcid> but nothing about whether the area is actually inside the buffer
<liquidAcid> it doesn't consider stride at all
prahal___ has quit [Remote host closed the connection]
prahal___ has joined #linux-exynos
<liquidAcid> ok, it's not just my imagination, the check is broken and doesn't actually check anything
<liquidAcid> after rechecking everything in userspace i get an image now, but it suffers from various "stripey" artifacts
<liquidAcid> downclocking the engine doesn't help, the artifacts stay
<liquidAcid> i've also tried to put memory fences around the g2d call, but to no avail
prahal___ has quit [Remote host closed the connection]
prahal___ has joined #linux-exynos
prahal___ has quit [Remote host closed the connection]
prahal___ has joined #linux-exynos
prahal___ has quit [Quit: prahal___]
prahal__ has joined #linux-exynos
prahal__ has quit [Remote host closed the connection]
prahal__ has joined #linux-exynos
dlezcano has joined #linux-exynos
<liquidAcid> prahal__, you there?
<prahal__> yes
<prahal__> liquidAcid: pong
<liquidAcid> fails almost immediately for me
<prahal__> in two days I could . I only have ssh access to the droid
<liquidAcid> prahal__, k, however it doesn't crash the system
<liquidAcid> well, you never know for sure
<liquidAcid> what's funny is that the corruption go away when i increase the buffer size
<liquidAcid> ./exynos_fimg2d_userptr -w 4096 -h 4096 -i 2 -n 8
<liquidAcid> exynos/fimg2d: G2D version (4.1).
<liquidAcid> starting G2D userptr test
<liquidAcid> buffer width = 4096, buffer height = 4096, iterations = 2
<liquidAcid> exits properly
<prahal__> well what about a non PAGE_SIZE multiple ?
<liquidAcid> prahal__, you mean buffer size a non-multiple?
<prahal__> yes , as -w 5120 -h 5120
<liquidAcid> 104857600 % 4096 == 0
<liquidAcid> so your example is a multiple
<prahal__> gee :/
<liquidAcid> interesting
<liquidAcid> exynos/fimg2d: G2D version (4.1).
<liquidAcid> starting G2D userptr test
<liquidAcid> buffer width = 3784, buffer height = 3991, iterations = 2
<liquidAcid> pagesize = 4096
<liquidAcid> exynos/fimg2d: failed to set cmdlist.
<liquidAcid> error: buffer copy 0 failed in iteration 0
<liquidAcid> oh, i know
<liquidAcid> prahal__, it's your fault ;)
<prahal__> looks like it was "based" on https://github.com/tobiasjakobi/linux-odroid/commit/d81e870d5afa1b0a95ea94c4052d3c7e973fae8c from when I was after a fix for the g2d unstability :/
<liquidAcid> yep, i won't bother with unaligned accesses for now -- when the aligned ones still are this shaky
<liquidAcid> i guess there is some flushing here missing here, maybe something to do with mixer being in tv iommu domain and g2d in its own