Summary: | [regression bisected] Stuttering in games caused by commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many vblanks were missed" | ||
---|---|---|---|
Product: | DRI | Reporter: | Dave Witbrodt <dawitbro> |
Component: | DRM/Radeon | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | medium | CC: | dawitbro, ernstp, mario.kleiner, ville.syrjala |
Version: | DRI git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Description
Dave Witbrodt
2015-11-28 03:08:57 UTC
Created attachment 120188 [details]
Xorg.0.log when running kernel built at "bad" commit
Does running the affected apps with the environment variable LIBGL_DRI3_DISABLE=1 avoid the problem? (In reply to Michel Dänzer from comment #2) > Does running the affected apps with the environment variable > LIBGL_DRI3_DISABLE=1 avoid the problem? Yes, symptoms are completely eliminated in prboom-plus when using that variable. (I am currently using a kernel built from a local branch with fa4270d8 and 4dfd6486 reverted, but I have left my previous kernel installed. I tested by rebooting to the previous kernel, and running prboom-plus with and w/o the variable set.) I recently ran into this with armagetronad. I've now confirmed that reverting these changes fixes that as well, thanks Dave for saving me the time to track this down! Ville, any ideas what's going on / how to fix it? If not, please revert these changes. (In reply to Michel Dänzer from comment #4) > I recently ran into this with armagetronad. I've now confirmed that > reverting these changes fixes that as well, thanks Dave for saving me the > time to track this down! > > Ville, any ideas what's going on / how to fix it? If not, please revert > these changes. I'm guessing this is the stuff Mario was trying to fix. Oh FFS, apparently he didn't cc dri-devel so the entire discussion has all been in private :( Though you were cc:d on most of it I think. Maybe I can bounce the entire thing onto the list... (In reply to Ville Syrjala from comment #5) > I'm guessing this is the stuff Mario was trying to fix. You're right, the patch from http://lists.freedesktop.org/archives/dri-devel/2015-November/095679.html fixes it for me. Mario, can you submit your fix(es) for inclusion? (In reply to Michel Dänzer from comment #6) > (In reply to Ville Syrjala from comment #5) > > I'm guessing this is the stuff Mario was trying to fix. > > You're right, the patch from > http://lists.freedesktop.org/archives/dri-devel/2015-November/095679.html > fixes it for me. Applying the patch in question to my local 4.3 + DRM 4.4 kernel (with no reverts) makes the symptoms go away for me also. (In reply to Michel Dänzer from comment #7) > Mario, can you submit your fix(es) for inclusion? Still on it. The proper patch for radeon-kms will hopefully be finished and tested within a day or so. But ideally i'd need some feedback on the line buffer sizes/partitions/watermarks - see my last e-mail on that. Otherwise i'll have to use very conservative guesstimates for the fudge constant in the current patch to be on the safe side. amdgpu-kms will have the same problem and solution, but i haven't looked into how to hook that up, with the difference in how the display engine code is hooked up. thanks, -mario Created attachment 120301 [details] [review] First proposed patch to fix this on radeon-kms Ok, the attached patch works on my test systems with my timing tests and hardware timing measurement equipment and i think it hopefully avoids the races Ville and me could come up with so far. One thing which might make sense for improved efficiency is to replace the udelay(5) in the radeon_flip_work_func() with a usleep_range() that avoids polling and sleeps the right minimum amount of time. I'll try to try that today. For the line buffer sizes for < DCE4 i just guessed values which are hopefully big enough to cover earlier asics. I think too big is not a big problem for correctness, but potentially for performance under higher graphics load. Created attachment 120310 [details] [review] port fix to amdgpu (In reply to Mario Kleiner from comment #10) > Created attachment 120301 [details] [review] [review] > First proposed patch to fix this on radeon-kms Works good on my hardware. Thanks. Will test any proposed fixes that follow, as well. Created attachment 120350 [details] [review] v2 of the radeon-kms fix: Slightly more efficient. Same as original, but busy wait in flip_work_func replaced by hr-timer sleep with event lock released, for more efficiency. Ditto for the following amdgpu fix v2. Created attachment 120351 [details] [review] v2 of the amdgpu-kms fix: Slightly more efficient. Like v2 of radeon-kms. Alex original port is R-b'ed by me. Thanks Dave for testing the v1 of the patch. I think i'm done with these, v2 should be as good as it gets from my side. -mario I tried the v2 amdgpu patch on top of agd5f/amdgpu-powerplay and my screens never turn on with it. Created attachment 120356 [details] [review] v3 for amdgpu Fix a crash in the crtc disabled case. (In reply to Mario Kleiner from comment #13) > Created attachment 120350 [details] [review] [review] > v2 of the radeon-kms fix: Slightly more efficient. Works very well on my hardware. Thanks for "Tested By:" Will wait to see if agd5f picks this up (then airlied), or if others will be commenting/changing it first. DW Tested the amdgpu v3 patch on top of agd5f/amdgpu-powerplay, seems to work fine. Just brought my local tree up to date with drm-fixes. The patch from comment 13 is now present there (and has been picked up by Linus), and updating with this patch and the others relevant to my system produces a nicely working kernel. Thanks for getting this fixed! I'm not sure what the protocol is for closing this bug. Usually if a bug is in a released kernel, the bug is not closed until the patch appears in a released kernel. This bug never appeared in a released kernel, though, so it seems like it can be closed immediately? Don't forget to merge the AMDGPU version also. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.