amdgpu: Find a way to handle submissions with too many IBs
Currently, amdgpu seems to allow submitting any arbitrary number of IBs and silently fails to execute those that don't fit the ring buffer. As far as I understand, the maximum limit is currently unknowable by user space, and would be calculated as something like this: (ring->max_dw - emit_frame_size) / emit_ib_size
― please correct me if I'm wrong.
I see two possible solutions here:
- Change
max_dw
so that the maximum IB count is predictable to userspace. - Reject submissions with too many IBs, and add a way for userspace to query the maximum amount.
- (Really allow submitting an arbitrary number of IBs ― probably not a practical option.)