Skip to content

Commit 39a30ec

Browse files
committed
drm/vc4: kms: Register a different drm_mode_config_funcs on BCM2711
On the BCM2711, our current definition of drm_mode_config_funcs uses the custom vc4_fb_create(). However, that function relies on the buffer allocation path that was relying on the GPU, and is no longer relevant. Let's create another drm_mode_config_funcs structure that we will register on the BCM2711. Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220610115149.964394-7-maxime@cerno.tech
1 parent 538f111 commit 39a30ec

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/vc4/vc4_kms.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,12 @@ static const struct drm_mode_config_funcs vc4_mode_funcs = {
997997
.fb_create = vc4_fb_create,
998998
};
999999

1000+
static const struct drm_mode_config_funcs vc5_mode_funcs = {
1001+
.atomic_check = vc4_atomic_check,
1002+
.atomic_commit = drm_atomic_helper_commit,
1003+
.fb_create = drm_gem_fb_create,
1004+
};
1005+
10001006
int vc4_kms_load(struct drm_device *dev)
10011007
{
10021008
struct vc4_dev *vc4 = to_vc4_dev(dev);
@@ -1031,7 +1037,7 @@ int vc4_kms_load(struct drm_device *dev)
10311037
dev->mode_config.max_height = 2048;
10321038
}
10331039

1034-
dev->mode_config.funcs = &vc4_mode_funcs;
1040+
dev->mode_config.funcs = vc4->is_vc5 ? &vc5_mode_funcs : &vc4_mode_funcs;
10351041
dev->mode_config.helper_private = &vc4_mode_config_helpers;
10361042
dev->mode_config.preferred_depth = 24;
10371043
dev->mode_config.async_page_flip = true;

0 commit comments

Comments
 (0)