From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/kernel/drivers/gpu/drm/meson/meson_drv.c b/kernel/drivers/gpu/drm/meson/meson_drv.c
index b0bfe85..5c29ddf 100644
--- a/kernel/drivers/gpu/drm/meson/meson_drv.c
+++ b/kernel/drivers/gpu/drm/meson/meson_drv.c
@@ -320,38 +320,38 @@
if (priv->afbcd.ops) {
ret = priv->afbcd.ops->init(priv);
if (ret)
- return ret;
+ goto free_drm;
}
/* Encoder Initialization */
ret = meson_venc_cvbs_create(priv);
if (ret)
- goto free_drm;
+ goto exit_afbcd;
if (has_components) {
ret = component_bind_all(drm->dev, drm);
if (ret) {
dev_err(drm->dev, "Couldn't bind all components\n");
- goto free_drm;
+ goto exit_afbcd;
}
}
ret = meson_plane_create(priv);
if (ret)
- goto free_drm;
+ goto unbind_all;
ret = meson_overlay_create(priv);
if (ret)
- goto free_drm;
+ goto unbind_all;
ret = meson_crtc_create(priv);
if (ret)
- goto free_drm;
+ goto unbind_all;
ret = drm_irq_install(drm, priv->vsync_irq);
if (ret)
- goto free_drm;
+ goto unbind_all;
drm_mode_config_reset(drm);
@@ -369,6 +369,12 @@
uninstall_irq:
drm_irq_uninstall(drm);
+unbind_all:
+ if (has_components)
+ component_unbind_all(drm->dev, drm);
+exit_afbcd:
+ if (priv->afbcd.ops)
+ priv->afbcd.ops->exit(priv);
free_drm:
drm_dev_put(drm);
--
Gitblit v1.6.2