Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc work against t602x/bringup #138

Closed
wants to merge 6 commits into from
drm/apple: Remove simpledrm framebuffer before DRM device alloc
Should result in drm apple to be registered as first DRM device
replacing simpledrm. Should resolve problems with userspace assuming
that card0 is the main displays device.

Signed-off-by: Janne Grunau <j@jannau.net>
  • Loading branch information
jannau committed Apr 20, 2023
commit 5d41d320ff9e18c586af3b06e50fb034597c2dcb
@@ -467,6 +467,14 @@ static int apple_drm_init(struct device *dev)
if (ret)
return ret;

fb_size = fb_r.end - fb_r.start + 1;
ret = drm_aperture_remove_conflicting_framebuffers(fb_r.start, fb_size,
false, &apple_drm_driver);
if (ret) {
dev_err(dev, "Failed remove fb: %d\n", ret);
goto err_unbind;
}

apple = devm_drm_dev_alloc(dev, &apple_drm_driver,
struct apple_drm_private, drm);
if (IS_ERR(apple))
@@ -478,14 +486,6 @@ static int apple_drm_init(struct device *dev)
if (ret)
return ret;

fb_size = fb_r.end - fb_r.start + 1;
ret = drm_aperture_remove_conflicting_framebuffers(fb_r.start, fb_size,
false, &apple_drm_driver);
if (ret) {
dev_err(dev, "Failed remove fb: %d\n", ret);
goto err_unbind;
}

ret = drmm_mode_config_init(&apple->drm);
if (ret)
goto err_unload;