diff options
author | Keith Packard <keithp@keithp.com> | 2007-12-04 12:22:30 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2007-12-11 20:23:00 -0800 |
commit | 57b9a54eb668477407c8be54c041d7a9f92c1f51 (patch) | |
tree | 45210a219a48374ac1a85e087aae5b1fcd145b5e /README | |
parent | cfa21b22b43c7113107b5eb086b5f4d4ec36dc0a (diff) |
Allow relocation to be skipped when buffers don't move.
One of the costs of superioctl has been the need to perform relocations
inside the kernel. The cost of mapping the buffers to the CPU and writing
data is fairly high, especially if those buffers have been mapped and read
by the GPU.
If we assume that buffers don't move around very often, we can have the
client compute the relocations itself using the previous GPU address. When
that object doesn't move, the kernel can skip computing and writing the
updated data.
Here's a patch which adds a new field to struct drm_bo_info_req called
'presumed_offset', and a new DRM_BO_HINT_PRESUMED_OFFSET that is set when
this field has been filled in by the client.
There are two separate optimizations performed when the presumed_offset is
correct:
1. i915_exec_reloc checks to see if all previous buffer offsets were guessed
correctly. If so, there's no need for it to look at *any* of the
relocations for a buffer. When this happens, it skips the whole
relocation process, simply returning success.
2. i915_apply_reloc checks to see if the target buffer offset was guessed
correctly. If so, it skips mapping the relocatee, computing the
relocation and writing the value. If no relocations are needed, the
relocatee should never be mapped to the CPU, and so the kernel shouldn't
need to wait for any fences to pass.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions