ChanServ changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://oftc.irclog.whitequark.org/etnaviv
pbaggett has quit [Remote host closed the connection]
cockroach has quit [Quit: leaving]
dv_ has quit [Ping timeout: 480 seconds]
dv_ has joined #etnaviv
frieder has joined #etnaviv
lynxeye has joined #etnaviv
pcercuei has joined #etnaviv
Surkow|laptop is now known as Surkow
ad has joined #etnaviv
ad is now known as Guest1496
Guest1496 has left #etnaviv [#etnaviv]
ad__ has joined #etnaviv
<ad__> hi, i think i have finally etnaviv/coda up and running on 5.4, how can i test it ?
<ad__> on /dev/dri i see by-path/ card0 renderD128
<mntmn> ad__: kmscube for example
<mntmn> ad__: but normally you should have two cardX files... one for the display and one for the gpu
<ad__> mntmn, ok, i suspected is not up properly. so i miss the cardX for the displau seems
<mntmn> ad__: do you have any display output, do you have /dev/fb0?
<mntmn> ad__: on imx6 if i remember correctly the display driver is ipuv3
<ad__> no, i am on imx6, do i still need fb nodes in devicetree ?
<mntmn> depends on what kind of display you're using
<ad__> board has 2 displays, main is lvds, second (backup) hdmi
<mntmn> so, do you have output on lvds or hdmi?
<mntmn> this is independent from gpu
<mntmn> you should have a basic framebuffer up
<ad__> mm my understanding is that a drm/dri driver is different from framebuffer, correct ?
<lynxeye> ad__: Yes, two different things. But if you have DRM_FB_EMULATION enabled in your config, the kernel will provide a framebuffer device on top of the DRM one.
<lynxeye> For i.MX& you need IMX_DRM for the display side and at least DRM_IMX_LDB for LVDS and DRM_IMX_HDMI for the HDMI youtput.
<ad__> lynxeye, i am in kernel 5.4, don't see any CONFIG_IMX_DRM, but DRM_IMX_IPUV3 DRM_IMX_HDMI
<ad__> both are enabled
<ad__> DRM_IMX_LDB is "n" maybe i miss that
<lynxeye> ad__: imx-drm is a composite device. The DRM device will not be exposed to userspace until all the parts of the display pipeline listed as enabled in your board DT have a driver probed. So if LVDS is enabled in the DT, you need the LDB driver.
<ad__> lynxeye, thanks. Adding DRM_IMX_LDB worked but getting now a kernel panic
<lynxeye> ad__: Hm, I don't recognize that one. I know that we had some issues with DRM object lifetime in the past, but don't know when it was fixed. BTW: why are you running an ancient 5.4 kernel?
<ad__> it's something required from some constrains
<ad__> i can't easily move to upgrade
JohnnyonFlame has quit [Remote host closed the connection]
<ad__> lynxeye, video is up and running now
<ad__> thanks
<mntmn> ad__: how did you fix the panic?
<mntmn> (just curious)
<ad__> a generic lvds panel driver was missing
<ad__> (meuconfig) in theory i think kernel should not crash in this way, but ok
<mntmn> i see, cool
<ad__> so now i need to adapt yocto side for etnaviv in place of vivante
JohnnyonFlame has joined #etnaviv
frieder has quit [Remote host closed the connection]
lynxeye has quit [Quit: Leaving.]
dri-logger has quit [Write error: connection closed]
dri-logger has joined #etnaviv
DPA has quit [Quit: ZNC 1.8.2+deb2~bpo10+1 - https://znc.in]
pbaggett has joined #etnaviv
DPA has joined #etnaviv
<pbaggett> Hi all! I'm working on a RG350M handheld (GC860) and I was wondering if I can disable waiting for the vblank using DRM_MODE_PAGE_FLIP_ASYNC.
<pbaggett> Using drmModePageFlip() with DRM_MODE_PAGE_FLIP_EVENT seems to work, but changing it to DRM_MODE_PAGE_FLIP_ASYNC doesn't.
<pbaggett> That is to say, I'm OK with tearing and I'd rather not wait.
<sravn> pcercuei: ^
ad__ has quit [Quit: Leaving]
<pcercuei> pbaggett: use the atomic API
<pbaggett> The atomic API allows tearing buffer swaps?
<pcercuei> it allows you to queue commits asynchronously
<pcercuei> Then I think your DRM commit will happen on the next vblank
<pcercuei> But you don't have to wait for it
<pbaggett> Hmm...ok. I think I need to take a step back. I noticed that my game runs at ~30 FPS on the RG350M when using the 640x480 @ 60 Hz mode, then 25 FPS on the 50 Hz mode. If I don't draw as much stuff (even if trivial), I get ~60 / ~50 FPS.
<pbaggett> This makes me think that there is either some kind of internal driver stalling or a vsync wait that is taking too long.
<pbaggett> To narrow it down, I wanted to disable vsync in my rendering.
<JohnnyonFlame> pbaggett: what is "too much stuff" here
<pcercuei> Are you using SDL1? SDL2?
<pbaggett> OpenGL ES 2.0 + GBM
<JohnnyonFlame> if you don't batch draw calls a simple text UI can easily add 70ms to your frametime
<pcercuei> I guess you can disable vsync in GBM, no?
<pbaggett> I have a couple of static VBOs / IBOs. No changes to data. I have about 15-19 glDrawElements() calls per frame.
<pbaggett> I implemented psuedo instancing to reduce the draw calls from an absurd number of small meshes (220-250) down to these 15 or so.
<pbaggett> I have n copies of a mesh with position.w as the instance id. The instance id acts an index into the transform matrices.
<pbaggett> Mesh here means like 10-15 triangles.
<JohnnyonFlame> okay, that's very good
<pbaggett> What I can't understand is why I get either 30 FPS /or/ 60 FPS
<JohnnyonFlame> oh
<JohnnyonFlame> enable vsync completely
<pbaggett> the 60 FPS is only if I disable those 15 glDrawElements() calls
<JohnnyonFlame> I've seen this behavior on SDL2's implementation - it will drop frames if you dont
<pbaggett> what does "enable vsync completely" mean though?
<JohnnyonFlame> /s/complety//
<JohnnyonFlame> brain farted
<pbaggett> I still don't follow.
<pbaggett> I have used drmModePageFlip() -- shouldn't that wait for the vblank?
<pcercuei> JohnnyonFlame: he wants to *disable* vsync
<JohnnyonFlame> can you do that on KMS?
<pcercuei> You can do async updates
<JohnnyonFlame> I recall trying and reading some discussions claiming that this is an unfortunate design issue, and recommending triple buffering instead
<JohnnyonFlame> at least with triple buffering vs double it won't lock to factors of your refresh rate
<pbaggett> I actually don't know how to implement triple buffering with the GBM API, but it sounds like something I can try.
<pbaggett> Can there be any other reason that you can think of why I might be seeing a stall like this?
<JohnnyonFlame> I can think of reasons for it dropping under 60, but not for locking to factors of your refresh rate
<JohnnyonFlame> idk if it helps you, but in SDL1.2 we're using this implementation for triple buffering: https://github.com/OpenDingux/SDL/blob/SDL-1.2/src/video/kmsdrm/SDL_kmsdrmvideo.c#L681
<pcercuei> pbaggett: how do you call drmModePageFlip()?
<pcercuei> You probably want DRM_MODE_ATOMIC_NONBLOCK, but that's only for the atomic API
<pbaggett> I started DRM_MODE_PAGE_FLIP_EVENT + waiting on vblank event. I changed to DRM_MODE_PAGE_FLIP_ASYNC and got invalid arg.
<pbaggett> I've also tried drmModeSetCrtc() but it doesn't seem to have any notable difference in my app compared to drmModePageFlip() + DRM_MODE_PAGE_FLIP_EVENT.
pcercuei has quit [Quit: dodo]
cockroach has joined #etnaviv