Commit 06b01ed
committed
hmem/fabtests: Use neuron nrt_get_dmabuf_fd_v2 if available
nrt_get_dmabuf_fd() does not return an offset value through its api. This
means that if a non-aligned VA is given to it, the call will fail because
the dmabuf fd has to point to an aligned address region and there is no way
to return to the caller the offset that their non-aligned VA will have in
the region.
nrt_get_dmabuf_fd_v2() fixes this by adding an offset.
The new code will look to see if it can link to nrt_get_dmabuf_fd_v2() and
if it can't, it will fall back to nrt_get_dmabuf_fd(), and set the offset
to 0, as that is the only case in which it will work.
Signed-off-by: Charles Stoll <stollcha@amazon.com>1 parent 102872c commit 06b01ed
2 files changed
+63
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
63 | 91 | | |
64 | 92 | | |
65 | 93 | | |
| |||
123 | 151 | | |
124 | 152 | | |
125 | 153 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 154 | + | |
131 | 155 | | |
132 | 156 | | |
133 | 157 | | |
| |||
345 | 369 | | |
346 | 370 | | |
347 | 371 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 372 | | |
358 | 373 | | |
359 | | - | |
| 374 | + | |
360 | 375 | | |
361 | 376 | | |
362 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
61 | 89 | | |
62 | 90 | | |
63 | 91 | | |
| |||
91 | 119 | | |
92 | 120 | | |
93 | 121 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 122 | + | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
| |||
228 | 251 | | |
229 | 252 | | |
230 | 253 | | |
231 | | - | |
| 254 | + | |
232 | 255 | | |
233 | 256 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 257 | | |
242 | 258 | | |
243 | 259 | | |
| |||
0 commit comments