commit | cb1d9967461cdf3b6aac6317c8d954a14f842571 | [log] [tgz] |
---|---|---|
author | Yong Zhao <yong.zhao@amd.com> | Wed Sep 20 18:10:21 2017 -0400 |
committer | Oded Gabbay <oded.gabbay@gmail.com> | Wed Sep 20 18:10:21 2017 -0400 |
tree | 50bfb10a76331b899b285ba803f7c03c8090545c | |
parent | b22666febf6fc67776d49782057fe4dd06f41552 [diff] |
drm/amdkfd: Fix kernel-queue wrapping bugs Avoid intermediate negative numbers when doing calculations with a mix of signed and unsigned variables where implicit conversions can lead to unexpected results. When kernel queue buffer wraps around to 0, we need to check that rptr won't be overwritten by the new packet. Signed-off-by: Yong Zhao <yong.zhao@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>