Update support of Baikal-M from kernel-image-std-def-5.10.46-alt1

This commit is contained in:
Mikhail Novosyolov 2021-06-26 13:21:23 +03:00
parent 6826d76d17
commit 61bd00ad80
4 changed files with 111 additions and 1 deletions

View file

@ -0,0 +1,25 @@
From ed685cdc61fe5da518b096a848bf9846df44fa9a Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
Date: Thu, 22 Apr 2021 15:03:04 +0400
Subject: [PATCH] baikal_vdu_drm: _plane_atomic_check: actually re-enable
clocking
---
drivers/gpu/drm/baikal/baikal_vdu_plane.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/baikal/baikal_vdu_plane.c b/drivers/gpu/drm/baikal/baikal_vdu_plane.c
index 5a047835e154..3cf04f5b97cf 100644
--- a/drivers/gpu/drm/baikal/baikal_vdu_plane.c
+++ b/drivers/gpu/drm/baikal/baikal_vdu_plane.c
@@ -76,6 +76,7 @@ static int baikal_vdu_primary_plane_atomic_check(struct drm_plane *plane,
/* release clock domain reset; enable clocking */
cntl = readl(priv->regs + PCTR);
cntl |= PCTR_PCR + PCTR_PCI;
+ writel(cntl, priv->regs + PCTR);
return ret;
}
--
2.31.1

View file

@ -0,0 +1,48 @@
From 92c85bac95a139c996ef1c9a8047c717e4455d3f Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
Date: Wed, 26 May 2021 15:23:52 +0400
Subject: [PATCH] baikal_vdu: figure out (LVDS) endpoint count
So the driver works correctly even when 'num-lanes' property is missing
in the device tree.
---
drivers/gpu/drm/baikal/baikal_vdu_drv.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/baikal/baikal_vdu_drv.c b/drivers/gpu/drm/baikal/baikal_vdu_drv.c
index 8eb9dda7fa01..f7fb3b81a9f1 100644
--- a/drivers/gpu/drm/baikal/baikal_vdu_drv.c
+++ b/drivers/gpu/drm/baikal/baikal_vdu_drv.c
@@ -71,7 +71,7 @@ static int vdu_modeset_init(struct drm_device *dev)
struct drm_mode_config *mode_config;
struct baikal_vdu_private *priv = dev->dev_private;
struct arm_smccc_res res;
- int ret = 0;
+ int ret = 0, ep_count = 0;
if (priv == NULL)
return -EINVAL;
@@ -103,6 +103,12 @@ static int vdu_modeset_init(struct drm_device *dev)
dev_info(dev->dev, "Bridge probe deferred\n");
goto out_config;
}
+ ep_count = of_graph_get_endpoint_count(dev->dev->of_node);
+ if (ep_count <= 0) {
+ dev_err(dev->dev, "no endpoints connected to panel/bridge\n");
+ goto out_config;
+ }
+ priv->ep_count = ep_count;
if (priv->bridge) {
struct drm_encoder *encoder = &priv->encoder;
@@ -121,6 +127,7 @@ static int vdu_modeset_init(struct drm_device *dev)
goto out_config;
}
} else if (priv->panel) {
+ dev_dbg(dev->dev, "panel has %d endpoints\n", priv->ep_count);
ret = baikal_vdu_lvds_connector_create(dev);
if (ret) {
dev_err(dev->dev, "Failed to create DRM connector\n");
--
2.31.1

View file

@ -0,0 +1,35 @@
From 5f6a25cbd373aa72738189356a0f606daa7bba59 Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
Date: Mon, 21 Jun 2021 15:42:47 +0400
Subject: [PATCH] panfrost: disable devfreq on BE-M1000 SoC
Enabling GPU frequency scaling on BE-M1000 cases GPU MMU lockup:
[ 38.108633] panfrost 2a200000.gpu: AS_ACTIVE bit stuck
Since GPU and CPU share the memory this locks up the whole system.
Therefore disable devfreq on BE-M1000.
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 8ab025d0035f..c2f46665cf33 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -97,6 +97,12 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
struct thermal_cooling_device *cooling;
struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq;
+ if (of_device_is_compatible(of_root, "baikal,baikal-m")) {
+ dev_info(pfdev->dev, "disabling GPU devfreq on BE-M1000\n");
+ ret = 0;
+ goto err_fini;
+ }
+
opp_table = dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names,
pfdev->comp->num_supplies);
if (IS_ERR(opp_table)) {
--
2.31.1

View file

@ -374,7 +374,9 @@ Patch0625: 0625-baikal_vdu_drm-LVDS-panel-support.patch
Patch0626: 0626-Serial-82550_dw-Fix-clock-rate-setting-in-dw8250_set.patch
Patch0627: 0627-drm-panfrost-Fix-memory-attributes-for-Mali-T620.patch
Patch0628: 0628-drm-panfrost-Trim-affinity-for-Mali-T620.patch
Patch0629: 0629-baikal_vdu_drm-_plane_atomic_check-actually-re-enabl.patch
Patch0630: 0630-baikal_vdu-figure-out-LVDS-endpoint-count.patch
Patch0631: 0631-panfrost-disable-devfreq-on-BE-M1000-SoC.patch
# Disable AutoReq
AutoReq: 0