Merged
Conversation
Owner
|
mmap does not do a read, so it shouldn't cause the same. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a bug I introduced with #140.
Other GPUs such as laptop GPUs and older/newer GPUs have a different memory layout. I was told to add a check to disable the video encode/decode detection feature on those GPUs, but I accidentally only added a check during display. I missed the if statements around the actual memory reads. This PR adds these missing conditionals.
It is weird that a read (strange but I suppose it could happen when we get to hardware and might be expected from my experience of AMD drivers being unstable) is causing the problems, especially in userspace. There is also code doing
mmapof these registers that ideally should be wrapped in the same condition, but it's architecturally complicated becauseinitbits(int)is called afterinit_pciand there are a lot of data dependencies, so that code isn't changed. Also, I was originally planning to suggest the alternative solution of disabling the bits on laptop APUs, but that wouldn't have worked without the PR. Thanks to @madushan1000 in #149 for leading me to this solution by mentioning that his GPU is a model that the original if statement already excludes and that commenting it out did nothing, which made me look elsewhere and find this solution.