mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 16:23:59 -04:00
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>
This commit is contained in:
committed by
Dave Stevenson
parent
74c3b7c63b
commit
7621db4d40
@@ -175,7 +175,7 @@ static struct vc4_dev *__mock_device(struct kunit *test, enum vc4_gen gen)
|
||||
vc4->dev = dev;
|
||||
vc4->gen = gen;
|
||||
|
||||
vc4->hvs = __vc4_hvs_alloc(vc4, NULL);
|
||||
vc4->hvs = __vc4_hvs_alloc(vc4, NULL, NULL);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, vc4->hvs);
|
||||
|
||||
drm = &vc4->base;
|
||||
|
||||
Reference in New Issue
Block a user