austriancoder changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://freenode.irclog.whitequark.org/etnaviv
Net147 has joined #etnaviv
pcercuei has joined #etnaviv
lynxeye has joined #etnaviv
berton has joined #etnaviv
chewitt has joined #etnaviv
srk has quit [Remote host closed the connection]
srk has joined #etnaviv
chewitt has quit [Quit: Zzz..]
chewitt has joined #etnaviv
chewitt_ has joined #etnaviv
chewitt has quit [Ping timeout: 240 seconds]
chewitt_ is now known as chewitt
karolherbst has quit [Quit: duh 🐧]
karolherbst has joined #etnaviv
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #etnaviv
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #etnaviv
lynxeye has quit [Quit: lynxeye]
chewitt has quit [Read error: Connection reset by peer]
chewitt has joined #etnaviv
chewitt has quit [*.net *.split]
Chewi has quit [*.net *.split]
Chewi has joined #etnaviv
chewitt has joined #etnaviv
berton has quit [Ping timeout: 248 seconds]
chewitt has quit [Read error: Connection reset by peer]
chewitt has joined #etnaviv
adjtm_ has joined #etnaviv
adjtm has quit [Ping timeout: 240 seconds]
cengiz_io has joined #etnaviv
<cengiz_io> hello there. I'm having an issue with gradient rendering on my imx6 solo. can you share some common things to check to discover if it's really an etnaviv issue or a TFT misconfiguration issue?
<cengiz_io> for example, kmscube application draws a cube with white/off color lines just on certain color values and whenever the sample cube rotates, those "wrong colored" lines rotate as well
<cengiz_io> I know I didn't share enough info but don't want to spam this channel until I get some diagnostics first
<cphealy> If you have concerns that it may be a TFT mis-configuration issue, I would suggest putting a gradient on the screen without using the 3D GPU.
<cphealy> In the past, I put a pattern generator in barebox (bootloader) which would allow putting up various test patterns including gradients for this very purpose.
<cphealy> For example, this kind gradient test pattern would be useful for testing LCD panel misconfiguration: https://git.pengutronix.de/cgit/barebox/commit/commands/fbtest.c?id=162cbde1dd62710a506d86bce2e57e26dad3d801
<cengiz_io> cphealy: sounds very sensible.
<marex> cengiz_io: try running your application with LIBGL_ALWAYS_SOFTWARE=1 env var set, then it uses software rendering instead of GPU
<cphealy> The same could be done with a test app in Linux on framebuffer.
<marex> that way you can rule out the GPU
<cphealy> What marex is suggesting is also a good way of ruling out the GPU.
<marex> I dont see why you would need to exchange bootloader to test framebuffer, that makes no sense
<cengiz_io> btw I'm using kms drm so with my default kernel, fb0 is non existent. at least to me.
<marex> you can enable fbdev emulation in kernel config
<cphealy> I'm not suggesting exchanging bootloaders. I'm only pointing out a method used in the past.
<cphealy> I'm sure the same could be done with u-boot... ;-)
<cengiz_io> which marex loves
<marex> cphealy: that's irrelevant
<cphealy> ;-)
<cengiz_io> hello u-boot champion
<marex> getting graphics working in the bootloader is too much work
<marex> just use linux, it is much easier and you dont have to debug two things
<cphealy> The reason I had this put in the bootloader was to support "fast" automated testing of HW during manufacturing. No need to load a full OS to put a picture on the screen when testing thousands of units.
<cengiz_io> instructions unclear. my board now runs openbsd
<marex> with etnaviv ?
<marex> cphealy: yeah well, then you amortized the investment into debugging the bootloader on the 1000s of units
<cphealy> Well, someone does once. Once the bootloader has it, it's done and can be used by anyone (the opensource way...) ;-)
<cphealy> We added color bars, solid colors, and geometry patterns too.
<cphealy> It helped greatly for the HW folks doing HW bringup and testing.
<marex> cphealy: great
<cphealy> Unfortunately, even with the geometry pattern support, it still didn't prevent people from getting the touchscreen masking wrong...
<cphealy> touchscreen masking - black paint on back of glass around active LCD area
<marex> cengiz_io: so, are you running etnaviv on openbsd ?
<cengiz_io> marex: lol no. I wouldn't even dare to boot openbsd with my board. I will try forcing software rendering now. see what happens
<cengiz_io> let's assume that the banding issue goes away with software rendering. how can I use a newer etnaviv? by switching to a newer version of kernel I guess
<marex> what do you run now ?
<marex> also, got a picture of the effect ?
<cengiz_io> sure.
<cengiz_io> which image hoster is acceptable here?
<marex> whatever works for you
<cengiz_io> ok. kernel is not upstream. it's fslc community fork based on v5.4. https://github.com/Freescale/linux-fslc/tree/5.4.x+fslc
<cengiz_io> (no need to check there I know. It's a zombie)
<marex> hm, you probably want to bump at least to 5.10 to get the new drm scheduler, that one helped quite a bit with performance
Net147 has quit [Read error: Connection reset by peer]
<cengiz_io> marex: will look into it. offtopic: this is a selected commit by automotive grade linux team for freescale. so I'll have to fiddle with it
<marex> hum :(
Net147 has joined #etnaviv
<marex> still, your performance might be worse, but with up-to-date mesa you should be fine
<marex> what's your mesa version ?
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #etnaviv
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #etnaviv
<cengiz_io> how can one check that? except going into the commit logs
<marex> I think the kmscube prints it on start
<marex> glxinfo does too
<cengiz_io> version: "1.4" vendor: "Mesa Project"
<cengiz_io> version: "OpenGL ES 2.0 Mesa 20.0.2" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "etnaviv" renderer: "Vivante GC880 rev 5106"
<marex> might make sense to bump to 20.3.5 or 21.0.x
<cengiz_io> noted
<cengiz_io> sorry couldn't get them into an album
<cengiz_io> (and kmscube can't run with LIBGL_ALWAYS_SOFTWARE=1)
<cengiz_io> these kinds of "banding" issues can also be seen under qt applications, whenever there are dynamic/moving gradients
<cengiz_io> qt runs with weston -> wayland -> drm -> panel-simple
<marex> cengiz_io: so what happens if you display just a gradient ?
<cengiz_io> trying to get a test application like that now
<marex> modetest command might be what you're looking for
<marex> or if you have weston, set weston background :)
<marex> there is also some weston-image viewer I think
<marex> just use a picture with the gradient
<marex> cengiz_io: btw the banding looks kinda like two neighboring pins of RGB panel got connected together or something
<cengiz_io> indeed it resembles some noise
<cengiz_io> getting a grayscale pattern image now. will share
<marex> is that parallel panel (DPI) or something else ?
<cengiz_io> parallel rgb
<marex> did you set RGB888/RGB666 correctly ?
<cengiz_io> it's currently RGB888. .bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
<cengiz_io> not sure about those flags though. copied from another tianma panel.
<marex> see include/drm/drm_connector.h
<marex> DE_HIGH means DE signed goes HI, then RGB data are on the rgb lines, then DE goes LO
<marex> the other one is ... uh ... different in 5.10
<marex> DRM_BUS_FLAG_PIXDATA_NEGEDGE is DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE , so DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE
<marex> so display samples pixel data on rising edge of pixel clock
<marex> your LCD controller needs to shift data onto the bus on falling edge of pixel clock
<marex> you should also set HSync and VSync polaridy
<marex> *polarity
<cengiz_io> hmm
<marex> grab the display datasheet, there are waveforms in it somewhere
<marex> it tells you how HS/VS/DE and pixel data relate to pixel clock
<cengiz_io> got the datasheet. will try to understand what's going on regarding these. in the meantime, can you take a look at these as well?
<marex> at what ?
* cengiz_io uploads
<cengiz_io> https://ibb.co/xXYqZdP last one for today
<cengiz_io> (sorry for the messy border around tft. country under 18 day lockdown. had to pack fast)
<marex> cengiz_io: grayscale is still RGB-scale
<marex> you can try ruling out separate colors -- use red or green or blue gradient only
<marex> but the distribution of the bands might indicate something with specific signal in the 24 RGB signals being broken
<cengiz_io> marex: I generated that image with # modetest -M imx-drm -s 43@34:800x480 -Fgradient
<marex> or you have the data polarity wrong, so your scanout engine clocks the pixels at falling edge and the display also expects them at falling edge
<cengiz_io> looks very curious doesn't it
<marex> in that case, you have setup time violation and the banding might be a result of different capacitance of each line
<marex> i.e. it almost works for most pixels, but not all
<marex> maybe just quickly try .bus_format = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE and see what happens
<cengiz_io> will do that. thanks
<cengiz_io> btw marex I didn't add any explicit modes for this panel, I have added a timing struct (with min, avg, max values afaik)
<cengiz_io> so the values are (I assume) evaluated somehow and proper mode is calculated right?
<marex> so that's better asked in dri-devel, but pretty much yes, the timing struct permits the kernel to negotiate optimal timing between the scanout engine and the panel
<cengiz_io> marex: ofc. this is not a topic to be discussed here.
<cengiz_io> as usual, you have helped me so much. thanks a lot! and nice to meet you cphealy
<cengiz_io> marex: I owe you a bagful of beers whenever this pandemic ends
<marex> seems OKish
<marex> cengiz_io: did the PIXDATA_POSEDGE make any difference ?
<cengiz_io> marex: can't compile that fast :D
<marex> cengiz_io: you want to double-check the timings against your panel datasheet
<marex> should make it easy to match it against the datasheet
<cengiz_io> yep, read that before
<cengiz_io> values are (if they're present on datasheet) exactly the same.
<cengiz_io> some of them, I had to ask to vendor
<marex> btw be careful that the timings are in pixel clock, datasheet tend to have them in uS or mS