Commit graph

8 commits

Author SHA1 Message Date
Juan A. Suarez Romero
786caf580b broadcom: do not include simulator if not available
Instead of including always the simulator file and have the code under
`#ifdefs` depending if the simulator is available or not, let's not
include the simulator directory entirely if the simulator is not
available.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31356>
2024-09-26 06:12:23 +00:00
Eric Engestrom
eae740f2e4 v3d,v3dv: simplify USE_V3D_SIMULATOR/using_v3d_simulator logic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:24 +00:00
Christopher Michael
fa939898bb broadcom: fix issue of ‘addr’ is used uninitialized
This small patch fixes an issue where 'addr' is used uninitialized if
the assert gets removed due to compiling release code and thus
returning uninitialized 'addr'

v2: Modified based on initial review:
    a) No need to initialize the 'addr' and 'ret' variables
    b) Fix 'ret' variable to be proper type based on hw->get_mem return value

v3: Modified based on additional review:
    a) Since both the simulator and mesa have their own version of
'unreachable()' and we cannot use ASSERT for the 'ret' value here,
just use a (void) ret after the assert

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29434>
2024-05-30 20:40:26 +00:00
Juan A. Suarez Romero
33e77c9041 v3d,v3d: use new simulator
The new simulator provides a new API, so we need to adapt the code.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28009>
2024-03-11 10:23:48 +00:00
Alejandro Piñeiro
50907105f9 v3d/simulator: get rid of has_gca wrapper
We can assume that it is always present on 3.3 and below. In fact,
recent updates of the simulator will remove it, so this change would
be needed soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11040>
2021-06-07 21:52:20 +00:00
Alejandro Piñeiro
646a8338b1 v3d/simulator: hw mem is now an v3d_size_t, typedef to uint32_t
It would be really awesome to be able to write this so it would work
with old and new versions of the simulator, but I was not able to do
that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11040>
2021-06-07 21:52:20 +00:00
Alejandro Piñeiro
123c7d7277 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>
2021-06-01 12:22:28 +02:00
Alejandro Piñeiro
583d7d3d8d v3d: moving v3d simulator to src/broadcom
So it could be used by both the OpenGL and the Vulkan driver.

In addition to the move, some small changes were needed to be made on
the API. For example, the simulator was receiving v3d_screen on
initialization, and that code setted v3d_screen->sim_file. Now it
returns the new sim_file created.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5666>
2020-06-27 00:06:58 +00:00
Renamed from src/gallium/drivers/v3d/v3d_simulator_wrapper.cpp (Browse further)