v3d/simulator: capture hub interrupts
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 7 May 2021 23:11:42 +0000 (01:11 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 1 Jun 2021 10:22:28 +0000 (12:22 +0200)
commit123c7d7277817287fdce97092678bdc4136bfbb5
tree420694e72d5cf04f0576c2cbf5e12a5441a56b91
parent4e9f1261eedf047d1198877b1debd7ee9e1715ee
v3d/simulator: capture hub interrupts

So far we were not capturing any HUB interrupt, just core. This could
be a problem if any is fired, as we could enter on an infinite
loop. With this commit we start to capture them. So we split v3d_isr
into core and hub interrupt handling.

As reference we capture the same HUB interrupts that we capture on the
v3d kernel support.

It is worth to note that all those are mostly untested. Now with both
opengl/vulkan driver being stable we were not able to raise those
interrupts.

v2 (Juan feedback):
   * Just one V3D_VERSION >= 41 block, more readable
   * Assert that the core is 0 at v3d_isr_core (we don't handle
     multi-core right now).

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11039>
src/broadcom/simulator/v3d_simulator_wrapper.cpp
src/broadcom/simulator/v3d_simulator_wrapper.h
src/broadcom/simulator/v3dx_simulator.c