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/arm/bifrost/arbiter/mali_kbase_arbif.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/arbiter/mali_kbase_arbif.c b/kernel/drivers/gpu/arm/bifrost/arbiter/mali_kbase_arbif.c
index 64e11ce..b5d3cd6 100644
--- a/kernel/drivers/gpu/arm/bifrost/arbiter/mali_kbase_arbif.c
+++ b/kernel/drivers/gpu/arm/bifrost/arbiter/mali_kbase_arbif.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2019-2022 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -28,12 +28,12 @@
#include <tl/mali_kbase_tracepoints.h>
#include <linux/of.h>
#include <linux/of_platform.h>
-#include "mali_kbase_arbiter_interface.h"
+#include "linux/mali_arbiter_interface.h"
/* Arbiter interface version against which was implemented this module */
#define MALI_REQUIRED_KBASE_ARBITER_INTERFACE_VERSION 5
#if MALI_REQUIRED_KBASE_ARBITER_INTERFACE_VERSION != \
- MALI_KBASE_ARBITER_INTERFACE_VERSION
+ MALI_ARBITER_INTERFACE_VERSION
#error "Unsupported Mali Arbiter interface version."
#endif
@@ -205,6 +205,7 @@
if (!pdev->dev.driver || !try_module_get(pdev->dev.driver->owner)) {
dev_err(kbdev->dev, "arbiter_if driver not available\n");
+ put_device(&pdev->dev);
return -EPROBE_DEFER;
}
kbdev->arb.arb_dev = &pdev->dev;
@@ -212,6 +213,7 @@
if (!arb_if) {
dev_err(kbdev->dev, "arbiter_if driver not ready\n");
module_put(pdev->dev.driver->owner);
+ put_device(&pdev->dev);
return -EPROBE_DEFER;
}
@@ -233,6 +235,7 @@
if (err) {
dev_err(&pdev->dev, "Failed to register with arbiter\n");
module_put(pdev->dev.driver->owner);
+ put_device(&pdev->dev);
if (err != -EPROBE_DEFER)
err = -EFAULT;
return err;
@@ -262,8 +265,10 @@
arb_if->vm_ops.vm_arb_unregister_dev(kbdev->arb.arb_if);
}
kbdev->arb.arb_if = NULL;
- if (kbdev->arb.arb_dev)
+ if (kbdev->arb.arb_dev) {
module_put(kbdev->arb.arb_dev->driver->owner);
+ put_device(kbdev->arb.arb_dev);
+ }
kbdev->arb.arb_dev = NULL;
}
--
Gitblit v1.6.2