linux-google-nyan: upgrade to 6.6.17 (MR 4840)
This switches from 6.1 LTS to 6.6 LTS. Unfortunately, this version has regressions related to SPI (breaks keyboard) and DRM (breaks display). Thus adding patches to revert these regressions. Hopefully, these will be properly fixed until the next LTS release. This also makes it pass community kconfig check again. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
6923219afc
commit
bf944e6c06
7 changed files with 880 additions and 222 deletions
|
@ -8,13 +8,13 @@ changed anymore.
|
||||||
|
|
||||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||||
---
|
---
|
||||||
arch/arm/boot/dts/tegra124-nyan.dtsi | 3 +++
|
arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi | 3 +++
|
||||||
1 file changed, 3 insertions(+)
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
diff --git a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
index 63a812703..84a97e32d 100644
|
index 63a812703..84a97e32d 100644
|
||||||
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
|
--- a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
+++ b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
@@ -4,6 +4,9 @@
|
@@ -4,6 +4,9 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
|
|
@ -8,15 +8,15 @@ Configure this pin properly.
|
||||||
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
|
||||||
Tested-by: Alexander Warnecke <awarnecke002@hotmail.com>
|
Tested-by: Alexander Warnecke <awarnecke002@hotmail.com>
|
||||||
---
|
---
|
||||||
arch/arm/boot/dts/tegra124-nyan-big.dts | 2 +-
|
arch/arm/boot/dts/nvidia/tegra124-nyan-big.dts | 2 +-
|
||||||
arch/arm/boot/dts/tegra124-nyan-blaze.dts | 2 +-
|
arch/arm/boot/dts/nvidia/tegra124-nyan-blaze.dts | 2 +-
|
||||||
arch/arm/boot/dts/tegra124-nyan.dtsi | 3 +--
|
arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi | 3 +--
|
||||||
3 files changed, 3 insertions(+), 4 deletions(-)
|
3 files changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
|
diff --git a/arch/arm/boot/dts/nvidia/tegra124-nyan-big.dts b/arch/arm/boot/dts/nvidia/tegra124-nyan-big.dts
|
||||||
index 1d2aac2cb..320e1da3f 100644
|
index 1d2aac2cb..320e1da3f 100644
|
||||||
--- a/arch/arm/boot/dts/tegra124-nyan-big.dts
|
--- a/arch/arm/boot/dts/nvidia/tegra124-nyan-big.dts
|
||||||
+++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
|
+++ b/arch/arm/boot/dts/nvidia/tegra124-nyan-big.dts
|
||||||
@@ -677,7 +677,7 @@ kb_row6_pr6 {
|
@@ -677,7 +677,7 @@ kb_row6_pr6 {
|
||||||
};
|
};
|
||||||
kb_row7_pr7 {
|
kb_row7_pr7 {
|
||||||
|
@ -26,10 +26,10 @@ index 1d2aac2cb..320e1da3f 100644
|
||||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||||
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
||||||
};
|
};
|
||||||
diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
|
diff --git a/arch/arm/boot/dts/nvidia/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/nvidia/tegra124-nyan-blaze.dts
|
||||||
index 677babde6..06b27fb6c 100644
|
index 677babde6..06b27fb6c 100644
|
||||||
--- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts
|
--- a/arch/arm/boot/dts/nvidia/tegra124-nyan-blaze.dts
|
||||||
+++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
|
+++ b/arch/arm/boot/dts/nvidia/tegra124-nyan-blaze.dts
|
||||||
@@ -675,7 +675,7 @@ kb_row6_pr6 {
|
@@ -675,7 +675,7 @@ kb_row6_pr6 {
|
||||||
};
|
};
|
||||||
kb_row7_pr7 {
|
kb_row7_pr7 {
|
||||||
|
@ -39,10 +39,10 @@ index 677babde6..06b27fb6c 100644
|
||||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||||
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
||||||
};
|
};
|
||||||
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
diff --git a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
index 84a97e32d..11655575b 100644
|
index 84a97e32d..11655575b 100644
|
||||||
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
|
--- a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
+++ b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi
|
||||||
@@ -778,8 +778,7 @@ sound {
|
@@ -778,8 +778,7 @@ sound {
|
||||||
<&tegra_car TEGRA124_CLK_EXTERN1>;
|
<&tegra_car TEGRA124_CLK_EXTERN1>;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
From 394c7d15b0aab3eef9bdd8df6bcf4a76d0991e49 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anton Bambura <jenneron@protonmail.com>
|
||||||
|
Date: Mon, 19 Feb 2024 02:21:51 +0200
|
||||||
|
Subject: [PATCH 3/5] Revert "spi: Reintroduce spi_set_cs_timing()"
|
||||||
|
|
||||||
|
This reverts commit 684a47847ae639689e7b823251975348a8e5434f.
|
||||||
|
|
||||||
|
Thanks hexdump0815
|
||||||
|
---
|
||||||
|
drivers/spi/spi.c | 37 -------------------------------------
|
||||||
|
1 file changed, 37 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
|
||||||
|
index 8d6304cb061e..70dc5ba504f8 100644
|
||||||
|
--- a/drivers/spi/spi.c
|
||||||
|
+++ b/drivers/spi/spi.c
|
||||||
|
@@ -3660,37 +3660,6 @@ static int __spi_validate_bits_per_word(struct spi_controller *ctlr,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/**
|
||||||
|
- * spi_set_cs_timing - configure CS setup, hold, and inactive delays
|
||||||
|
- * @spi: the device that requires specific CS timing configuration
|
||||||
|
- *
|
||||||
|
- * Return: zero on success, else a negative error code.
|
||||||
|
- */
|
||||||
|
-static int spi_set_cs_timing(struct spi_device *spi)
|
||||||
|
-{
|
||||||
|
- struct device *parent = spi->controller->dev.parent;
|
||||||
|
- int status = 0;
|
||||||
|
-
|
||||||
|
- if (spi->controller->set_cs_timing && !spi_get_csgpiod(spi, 0)) {
|
||||||
|
- if (spi->controller->auto_runtime_pm) {
|
||||||
|
- status = pm_runtime_get_sync(parent);
|
||||||
|
- if (status < 0) {
|
||||||
|
- pm_runtime_put_noidle(parent);
|
||||||
|
- dev_err(&spi->controller->dev, "Failed to power device: %d\n",
|
||||||
|
- status);
|
||||||
|
- return status;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- status = spi->controller->set_cs_timing(spi);
|
||||||
|
- pm_runtime_mark_last_busy(parent);
|
||||||
|
- pm_runtime_put_autosuspend(parent);
|
||||||
|
- } else {
|
||||||
|
- status = spi->controller->set_cs_timing(spi);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- return status;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* spi_setup - setup SPI mode and clock rate
|
||||||
|
* @spi: the device whose settings are being modified
|
||||||
|
@@ -3787,12 +3756,6 @@ int spi_setup(struct spi_device *spi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- status = spi_set_cs_timing(spi);
|
||||||
|
- if (status) {
|
||||||
|
- mutex_unlock(&spi->controller->io_mutex);
|
||||||
|
- return status;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (spi->controller->auto_runtime_pm && spi->controller->set_cs) {
|
||||||
|
status = pm_runtime_resume_and_get(spi->controller->dev.parent);
|
||||||
|
if (status < 0) {
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
|
@ -0,0 +1,360 @@
|
||||||
|
From b05ad03707395b4fcdf1f0d69bd1b50816ad917f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anton Bambura <jenneron@protonmail.com>
|
||||||
|
Date: Mon, 19 Feb 2024 02:04:49 +0200
|
||||||
|
Subject: [PATCH 4/5] Revert "drm/tegra: Implement fbdev emulation as in-kernel
|
||||||
|
client"
|
||||||
|
|
||||||
|
This reverts commit 71ec16f45ef8d10e20c58e85f7d3644e324d3c13.
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/tegra/drm.c | 23 ++++-
|
||||||
|
drivers/gpu/drm/tegra/drm.h | 18 +++-
|
||||||
|
drivers/gpu/drm/tegra/fbdev.c | 173 +++++++++++++++++++---------------
|
||||||
|
3 files changed, 132 insertions(+), 82 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
|
||||||
|
index ff36171c8fb7..1073f26a2bba 100644
|
||||||
|
--- a/drivers/gpu/drm/tegra/drm.c
|
||||||
|
+++ b/drivers/gpu/drm/tegra/drm.c
|
||||||
|
@@ -56,6 +56,9 @@ static int tegra_atomic_check(struct drm_device *drm,
|
||||||
|
|
||||||
|
static const struct drm_mode_config_funcs tegra_drm_mode_config_funcs = {
|
||||||
|
.fb_create = tegra_fb_create,
|
||||||
|
+#ifdef CONFIG_DRM_FBDEV_EMULATION
|
||||||
|
+ .output_poll_changed = drm_fb_helper_output_poll_changed,
|
||||||
|
+#endif
|
||||||
|
.atomic_check = tegra_atomic_check,
|
||||||
|
.atomic_commit = drm_atomic_helper_commit,
|
||||||
|
};
|
||||||
|
@@ -882,6 +885,7 @@ static const struct drm_driver tegra_drm_driver = {
|
||||||
|
DRIVER_ATOMIC | DRIVER_RENDER | DRIVER_SYNCOBJ,
|
||||||
|
.open = tegra_drm_open,
|
||||||
|
.postclose = tegra_drm_postclose,
|
||||||
|
+ .lastclose = drm_fb_helper_lastclose,
|
||||||
|
|
||||||
|
#if defined(CONFIG_DEBUG_FS)
|
||||||
|
.debugfs_init = tegra_debugfs_init,
|
||||||
|
@@ -1179,11 +1183,15 @@ static int host1x_drm_probe(struct host1x_device *dev)
|
||||||
|
drm->mode_config.funcs = &tegra_drm_mode_config_funcs;
|
||||||
|
drm->mode_config.helper_private = &tegra_drm_mode_config_helpers;
|
||||||
|
|
||||||
|
+ err = tegra_drm_fb_prepare(drm);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ goto config;
|
||||||
|
+
|
||||||
|
drm_kms_helper_poll_init(drm);
|
||||||
|
|
||||||
|
err = host1x_device_init(dev);
|
||||||
|
if (err < 0)
|
||||||
|
- goto poll;
|
||||||
|
+ goto fbdev;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Now that all display controller have been initialized, the maximum
|
||||||
|
@@ -1246,14 +1254,18 @@ static int host1x_drm_probe(struct host1x_device *dev)
|
||||||
|
if (err < 0)
|
||||||
|
goto hub;
|
||||||
|
|
||||||
|
- err = drm_dev_register(drm, 0);
|
||||||
|
+ err = tegra_drm_fb_init(drm);
|
||||||
|
if (err < 0)
|
||||||
|
goto hub;
|
||||||
|
|
||||||
|
- tegra_fbdev_setup(drm);
|
||||||
|
+ err = drm_dev_register(drm, 0);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ goto fb;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
+fb:
|
||||||
|
+ tegra_drm_fb_exit(drm);
|
||||||
|
hub:
|
||||||
|
if (tegra->hub)
|
||||||
|
tegra_display_hub_cleanup(tegra->hub);
|
||||||
|
@@ -1266,8 +1278,10 @@ static int host1x_drm_probe(struct host1x_device *dev)
|
||||||
|
}
|
||||||
|
|
||||||
|
host1x_device_exit(dev);
|
||||||
|
-poll:
|
||||||
|
+fbdev:
|
||||||
|
drm_kms_helper_poll_fini(drm);
|
||||||
|
+ tegra_drm_fb_free(drm);
|
||||||
|
+config:
|
||||||
|
drm_mode_config_cleanup(drm);
|
||||||
|
domain:
|
||||||
|
if (tegra->domain)
|
||||||
|
@@ -1288,6 +1302,7 @@ static int host1x_drm_remove(struct host1x_device *dev)
|
||||||
|
drm_dev_unregister(drm);
|
||||||
|
|
||||||
|
drm_kms_helper_poll_fini(drm);
|
||||||
|
+ tegra_drm_fb_exit(drm);
|
||||||
|
drm_atomic_helper_shutdown(drm);
|
||||||
|
drm_mode_config_cleanup(drm);
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
|
||||||
|
index f9d18e8cf6ab..576f03b8434e 100644
|
||||||
|
--- a/drivers/gpu/drm/tegra/drm.h
|
||||||
|
+++ b/drivers/gpu/drm/tegra/drm.h
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
#include <drm/drm_bridge.h>
|
||||||
|
#include <drm/drm_edid.h>
|
||||||
|
#include <drm/drm_encoder.h>
|
||||||
|
+#include <drm/drm_fb_helper.h>
|
||||||
|
#include <drm/drm_fixed.h>
|
||||||
|
#include <drm/drm_probe_helper.h>
|
||||||
|
#include <uapi/drm/tegra_drm.h>
|
||||||
|
@@ -193,9 +194,22 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
|
||||||
|
const struct drm_mode_fb_cmd2 *cmd);
|
||||||
|
|
||||||
|
#ifdef CONFIG_DRM_FBDEV_EMULATION
|
||||||
|
-void tegra_fbdev_setup(struct drm_device *drm);
|
||||||
|
+int tegra_drm_fb_prepare(struct drm_device *drm);
|
||||||
|
+void tegra_drm_fb_free(struct drm_device *drm);
|
||||||
|
+int tegra_drm_fb_init(struct drm_device *drm);
|
||||||
|
+void tegra_drm_fb_exit(struct drm_device *drm);
|
||||||
|
#else
|
||||||
|
-static inline void tegra_fbdev_setup(struct drm_device *drm)
|
||||||
|
+static inline int tegra_drm_fb_prepare(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+static inline void tegra_drm_fb_free(struct drm_device *drm)
|
||||||
|
+{ }
|
||||||
|
+static inline int tegra_drm_fb_init(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+static inline void tegra_drm_fb_exit(struct drm_device *drm)
|
||||||
|
{ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
index db6eaac3d30e..0892d9f36195 100644
|
||||||
|
--- a/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
+++ b/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
@@ -11,9 +11,6 @@
|
||||||
|
#include <linux/fb.h>
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
|
-#include <drm/drm_drv.h>
|
||||||
|
-#include <drm/drm_crtc_helper.h>
|
||||||
|
-#include <drm/drm_fb_helper.h>
|
||||||
|
#include <drm/drm_fourcc.h>
|
||||||
|
#include <drm/drm_framebuffer.h>
|
||||||
|
#include <drm/drm_gem_framebuffer_helper.h>
|
||||||
|
@@ -37,33 +34,12 @@ static int tegra_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||||
|
return __tegra_gem_mmap(&bo->gem, vma);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void tegra_fbdev_fb_destroy(struct fb_info *info)
|
||||||
|
-{
|
||||||
|
- struct drm_fb_helper *helper = info->par;
|
||||||
|
- struct drm_framebuffer *fb = helper->fb;
|
||||||
|
- struct tegra_bo *bo = tegra_fb_get_plane(fb, 0);
|
||||||
|
-
|
||||||
|
- drm_fb_helper_fini(helper);
|
||||||
|
-
|
||||||
|
- /* Undo the special mapping we made in fbdev probe. */
|
||||||
|
- if (bo->pages) {
|
||||||
|
- vunmap(bo->vaddr);
|
||||||
|
- bo->vaddr = NULL;
|
||||||
|
- }
|
||||||
|
- drm_framebuffer_remove(fb);
|
||||||
|
-
|
||||||
|
- drm_client_release(&helper->client);
|
||||||
|
- drm_fb_helper_unprepare(helper);
|
||||||
|
- kfree(helper);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static const struct fb_ops tegra_fb_ops = {
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
__FB_DEFAULT_DMAMEM_OPS_RDWR,
|
||||||
|
DRM_FB_HELPER_DEFAULT_OPS,
|
||||||
|
__FB_DEFAULT_DMAMEM_OPS_DRAW,
|
||||||
|
.fb_mmap = tegra_fb_mmap,
|
||||||
|
- .fb_destroy = tegra_fbdev_fb_destroy,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
||||||
|
@@ -154,52 +130,16 @@ static const struct drm_fb_helper_funcs tegra_fb_helper_funcs = {
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void tegra_fbdev_client_unregister(struct drm_client_dev *client)
|
||||||
|
-{
|
||||||
|
- struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
|
||||||
|
-
|
||||||
|
- if (fb_helper->info) {
|
||||||
|
- drm_fb_helper_unregister_info(fb_helper);
|
||||||
|
- } else {
|
||||||
|
- drm_client_release(&fb_helper->client);
|
||||||
|
- drm_fb_helper_unprepare(fb_helper);
|
||||||
|
- kfree(fb_helper);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
+{ }
|
||||||
|
|
||||||
|
-static int tegra_fbdev_client_restore(struct drm_client_dev *client)
|
||||||
|
+static int tregra_fbdev_client_restore(struct drm_client_dev *client)
|
||||||
|
{
|
||||||
|
- drm_fb_helper_lastclose(client->dev);
|
||||||
|
-
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int tegra_fbdev_client_hotplug(struct drm_client_dev *client)
|
||||||
|
{
|
||||||
|
- struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
|
||||||
|
- struct drm_device *dev = client->dev;
|
||||||
|
- int ret;
|
||||||
|
-
|
||||||
|
- if (dev->fb_helper)
|
||||||
|
- return drm_fb_helper_hotplug_event(dev->fb_helper);
|
||||||
|
-
|
||||||
|
- ret = drm_fb_helper_init(dev, fb_helper);
|
||||||
|
- if (ret)
|
||||||
|
- goto err_drm_err;
|
||||||
|
-
|
||||||
|
- if (!drm_drv_uses_atomic_modeset(dev))
|
||||||
|
- drm_helper_disable_unused_functions(dev);
|
||||||
|
-
|
||||||
|
- ret = drm_fb_helper_initial_config(fb_helper);
|
||||||
|
- if (ret)
|
||||||
|
- goto err_drm_fb_helper_fini;
|
||||||
|
-
|
||||||
|
return 0;
|
||||||
|
-
|
||||||
|
-err_drm_fb_helper_fini:
|
||||||
|
- drm_fb_helper_fini(fb_helper);
|
||||||
|
-err_drm_err:
|
||||||
|
- drm_err(dev, "Failed to setup fbdev emulation (ret=%d)\n", ret);
|
||||||
|
- return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct drm_client_funcs tegra_fbdev_client_funcs = {
|
||||||
|
@@ -209,28 +149,109 @@ static const struct drm_client_funcs tegra_fbdev_client_funcs = {
|
||||||
|
.hotplug = tegra_fbdev_client_hotplug,
|
||||||
|
};
|
||||||
|
|
||||||
|
-void tegra_fbdev_setup(struct drm_device *dev)
|
||||||
|
+static struct drm_fb_helper *tegra_fbdev_create(struct drm_device *drm)
|
||||||
|
{
|
||||||
|
struct drm_fb_helper *helper;
|
||||||
|
- int ret;
|
||||||
|
-
|
||||||
|
- drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
|
||||||
|
- drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
|
||||||
|
|
||||||
|
helper = kzalloc(sizeof(*helper), GFP_KERNEL);
|
||||||
|
if (!helper)
|
||||||
|
- return;
|
||||||
|
- drm_fb_helper_prepare(dev, helper, 32, &tegra_fb_helper_funcs);
|
||||||
|
+ return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
- ret = drm_client_init(dev, &helper->client, "fbdev", &tegra_fbdev_client_funcs);
|
||||||
|
- if (ret)
|
||||||
|
- goto err_drm_client_init;
|
||||||
|
+ drm_fb_helper_prepare(drm, helper, 32, &tegra_fb_helper_funcs);
|
||||||
|
|
||||||
|
- drm_client_register(&helper->client);
|
||||||
|
-
|
||||||
|
- return;
|
||||||
|
+ return helper;
|
||||||
|
+}
|
||||||
|
|
||||||
|
-err_drm_client_init:
|
||||||
|
+static void tegra_fbdev_free(struct drm_fb_helper *helper)
|
||||||
|
+{
|
||||||
|
drm_fb_helper_unprepare(helper);
|
||||||
|
kfree(helper);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+static int tegra_fbdev_init(struct drm_fb_helper *helper,
|
||||||
|
+ unsigned int num_crtc,
|
||||||
|
+ unsigned int max_connectors)
|
||||||
|
+{
|
||||||
|
+ struct drm_device *drm = helper->dev;
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ err = drm_client_init(dev, &helper->client, "fbdev", &tegra_fbdev_client_funcs);
|
||||||
|
+ if (err)
|
||||||
|
+ return err;
|
||||||
|
+
|
||||||
|
+ err = drm_fb_helper_init(drm, helper);
|
||||||
|
+ if (err < 0) {
|
||||||
|
+ dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n",
|
||||||
|
+ err);
|
||||||
|
+ goto err_drm_client_release;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ err = drm_fb_helper_initial_config(helper);
|
||||||
|
+ if (err < 0) {
|
||||||
|
+ dev_err(drm->dev, "failed to set initial configuration: %d\n",
|
||||||
|
+ err);
|
||||||
|
+ goto fini;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+fini:
|
||||||
|
+ drm_fb_helper_fini(helper);
|
||||||
|
+err_drm_client_release:
|
||||||
|
+ drm_client_release(&helper->client);
|
||||||
|
+ return err;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void tegra_fbdev_exit(struct drm_fb_helper *helper)
|
||||||
|
+{
|
||||||
|
+ struct drm_framebuffer *fb = helper->fb;
|
||||||
|
+
|
||||||
|
+ drm_fb_helper_unregister_info(helper);
|
||||||
|
+
|
||||||
|
+ if (fb) {
|
||||||
|
+ struct tegra_bo *bo = tegra_fb_get_plane(fb, 0);
|
||||||
|
+
|
||||||
|
+ /* Undo the special mapping we made in fbdev probe. */
|
||||||
|
+ if (bo && bo->pages) {
|
||||||
|
+ vunmap(bo->vaddr);
|
||||||
|
+ bo->vaddr = NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ drm_framebuffer_remove(fb);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ drm_fb_helper_fini(helper);
|
||||||
|
+ drm_client_release(&helper->client);
|
||||||
|
+ tegra_fbdev_free(helper);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int tegra_drm_fb_prepare(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ drm->fb_helper = tegra_fbdev_create(drm);
|
||||||
|
+ if (IS_ERR(drm->fb_helper))
|
||||||
|
+ return PTR_ERR(drm->fb_helper);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void tegra_drm_fb_free(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ tegra_fbdev_free(drm->fb_helper);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int tegra_drm_fb_init(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ err = tegra_fbdev_init(drm->fb_helper, drm->mode_config.num_crtc,
|
||||||
|
+ drm->mode_config.num_connector);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void tegra_drm_fb_exit(struct drm_device *drm)
|
||||||
|
+{
|
||||||
|
+ tegra_fbdev_exit(drm->fb_helper);
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
From eb6676dd69643cd476b61591a89ceadbf24d1ffd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anton Bambura <jenneron@protonmail.com>
|
||||||
|
Date: Mon, 19 Feb 2024 02:04:59 +0200
|
||||||
|
Subject: [PATCH 5/5] Revert "drm/tegra: Initialize fbdev DRM client"
|
||||||
|
|
||||||
|
This reverts commit 25dda38e0b07941f291a442ac470b0637b7b3e60.
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/tegra/fbdev.c | 33 +--------------------------------
|
||||||
|
1 file changed, 1 insertion(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
index 0892d9f36195..2bd13f2a2fc2 100644
|
||||||
|
--- a/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
+++ b/drivers/gpu/drm/tegra/fbdev.c
|
||||||
|
@@ -125,30 +125,6 @@ static const struct drm_fb_helper_funcs tegra_fb_helper_funcs = {
|
||||||
|
.fb_probe = tegra_fbdev_probe,
|
||||||
|
};
|
||||||
|
|
||||||
|
-/*
|
||||||
|
- * struct drm_client
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-static void tegra_fbdev_client_unregister(struct drm_client_dev *client)
|
||||||
|
-{ }
|
||||||
|
-
|
||||||
|
-static int tregra_fbdev_client_restore(struct drm_client_dev *client)
|
||||||
|
-{
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int tegra_fbdev_client_hotplug(struct drm_client_dev *client)
|
||||||
|
-{
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static const struct drm_client_funcs tegra_fbdev_client_funcs = {
|
||||||
|
- .owner = THIS_MODULE,
|
||||||
|
- .unregister = tegra_fbdev_client_unregister,
|
||||||
|
- .restore = tegra_fbdev_client_restore,
|
||||||
|
- .hotplug = tegra_fbdev_client_hotplug,
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
static struct drm_fb_helper *tegra_fbdev_create(struct drm_device *drm)
|
||||||
|
{
|
||||||
|
struct drm_fb_helper *helper;
|
||||||
|
@@ -175,15 +151,11 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper,
|
||||||
|
struct drm_device *drm = helper->dev;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
- err = drm_client_init(dev, &helper->client, "fbdev", &tegra_fbdev_client_funcs);
|
||||||
|
- if (err)
|
||||||
|
- return err;
|
||||||
|
-
|
||||||
|
err = drm_fb_helper_init(drm, helper);
|
||||||
|
if (err < 0) {
|
||||||
|
dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n",
|
||||||
|
err);
|
||||||
|
- goto err_drm_client_release;
|
||||||
|
+ return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = drm_fb_helper_initial_config(helper);
|
||||||
|
@@ -197,8 +169,6 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper,
|
||||||
|
|
||||||
|
fini:
|
||||||
|
drm_fb_helper_fini(helper);
|
||||||
|
-err_drm_client_release:
|
||||||
|
- drm_client_release(&helper->client);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -221,7 +191,6 @@ static void tegra_fbdev_exit(struct drm_fb_helper *helper)
|
||||||
|
}
|
||||||
|
|
||||||
|
drm_fb_helper_fini(helper);
|
||||||
|
- drm_client_release(&helper->client);
|
||||||
|
tegra_fbdev_free(helper);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||||
# Co-Maintainer: Segfault <awarnecke002@hotmail.com>
|
# Co-Maintainer: Segfault <awarnecke002@hotmail.com>
|
||||||
pkgname=linux-google-nyan
|
pkgname=linux-google-nyan
|
||||||
pkgver=6.1.27
|
pkgver=6.6.17
|
||||||
pkgrel=1
|
pkgrel=0
|
||||||
pkgdesc="Mainline kernel fork for Google Nyan Chromebooks"
|
pkgdesc="Mainline kernel fork for Google Nyan Chromebooks"
|
||||||
arch="armv7"
|
arch="armv7"
|
||||||
_carch="arm"
|
_carch="arm"
|
||||||
|
@ -37,6 +37,9 @@ source="
|
||||||
$_config
|
$_config
|
||||||
0001-ARM-dts-tegra-nyan-add-mmc-aliases.patch
|
0001-ARM-dts-tegra-nyan-add-mmc-aliases.patch
|
||||||
0002-ARM-tegra-nyan-fix-mic-jack-detection.patch
|
0002-ARM-tegra-nyan-fix-mic-jack-detection.patch
|
||||||
|
0003-Revert-spi-Reintroduce-spi_set_cs_timing.patch
|
||||||
|
0004-Revert-drm-tegra-Implement-fbdev-emulation-as-in-ker.patch
|
||||||
|
0005-Revert-drm-tegra-Initialize-fbdev-DRM-client.patch
|
||||||
"
|
"
|
||||||
builddir="$srcdir/linux-${_kernver//_/-}"
|
builddir="$srcdir/linux-${_kernver//_/-}"
|
||||||
|
|
||||||
|
@ -66,8 +69,11 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
657c241c8e4d62dabf7f1789c342352f757655129b8b21d92d3a90859d24f5f05f33aa39491851f690f7d9b0ba9234c47907ae05e1cb32a8d00fcf11ff71c61b linux-6.1.27.tar.xz
|
91a6ec0d1e371cad5703bc65016fd930a5da74ca4d862eecdab08846b455b42a6845531322af65d8805210d88dd74c327ca6de1166ed250aa546918e5412c470 linux-6.6.17.tar.xz
|
||||||
af051de016dab75d91aad84bf02a0f877018330728b2afd50166da8c076c33fbb2d9ecc0b25fa787305713277e3a82560052db8947a32e75d1810327acebf817 config-google-nyan.armv7
|
729e7b32d9c51a37ee5e5bb0dafbfef6e2c9483f79e7f836ff8ec8d8bffda04cb987f5a1701c513b7193d445676027d58450518f4dc71a903c454c4641578b61 config-google-nyan.armv7
|
||||||
be21d145f39d334e37f8dd79b78474c072e54502ba5c9ae63163f0ce30ffaa3a3448b05d153205ba8af7a761952ecddb3ae1a5b348902b4ce5f4f72138937fdb 0001-ARM-dts-tegra-nyan-add-mmc-aliases.patch
|
4e46d412d6a342044ad348e19cb75b8b90d57fe345eaa341e1c960f73f0c1ef3dd09196eccc3c413e199ac366eb512770e96b60d6a3ad44ec80a930d732d0fd4 0001-ARM-dts-tegra-nyan-add-mmc-aliases.patch
|
||||||
4ec3bc3bce229ba664ad98251dbcad9d224a3792d3149cc64b5a1eee0801f1a366b83447b55a02cb0915bd3ef63f42260dd55a286f68c727fcfc4d46bba4363a 0002-ARM-tegra-nyan-fix-mic-jack-detection.patch
|
f62ce358aed7273320f0163fbaf7425b4800945ac3cdb6a57062b0087c5b2799131d0a48fa1580bff33a4ae33c1ee9ae2c5771887b8b460be2596c7605234a0f 0002-ARM-tegra-nyan-fix-mic-jack-detection.patch
|
||||||
|
a43ecb9f410d2c3168ada6c4788174154627fe6568e9048def2b6ea827b0c7b676f148352e39f6985172bcb85b4d0f77376ec7f94ba33716671f99fe20923504 0003-Revert-spi-Reintroduce-spi_set_cs_timing.patch
|
||||||
|
5bc98d414a3e02f62f3b3ccd32d6d27f8e6e0706efb4eef1496b616a47dda866411072a27da1eb713d249cf0c0934b519d0b68ac9b594b34edf49fc2e26945c8 0004-Revert-drm-tegra-Implement-fbdev-emulation-as-in-ker.patch
|
||||||
|
010c9094706cbac87200dc940b52e8c8b2a53a44fed1b361e828d19f65ea98eda7b8840678349b9fba7ac72d15e2095ff8f674d2ffede7594f7b35d850635b58 0005-Revert-drm-tegra-Initialize-fbdev-DRM-client.patch
|
||||||
"
|
"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue