]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/vc4: hvs: Change prototype of __vc4_hvs_alloc to pass registers
authorMaxime Ripard <mripard@kernel.org>
Fri, 21 Jun 2024 15:20:52 +0000 (16:20 +0100)
committerDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 9 Sep 2024 12:02:54 +0000 (13:02 +0100)
commit7621db4d40217e6309a4c747a0c3e9a22a742337
tree42a63a8c93537df196b80270598bade62643b682
parent74c3b7c63b5e718a97881f8d80bef02f8a94a2b2
drm/vc4: hvs: Change prototype of __vc4_hvs_alloc to pass registers

The BCM2712 HVS has registers to report the size of the various SRAM the
driver uses, and their size actually differ depending on the stepping.

The initialisation of the memory pools happen in the __vc4_hvs_alloc()
function that also allocates the main HVS structure, that will then hold
the pointer to the memory mapping of the registers.

This creates some kind of circular dependency that we can break by
passing the mapping pointer as an argument for __vc4_hvs_alloc() to use
to query to get the SRAM sizes and initialise the memory pools
accordingly.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-29-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/tests/vc4_mock.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_hvs.c