mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
99545b4bb1
This target adds support for the Allwinner D1 RISC-V based SoCs. - RISC-V single-core T-Head C906 (RV64GCV) - Tensilica HiFi4 DSP - DDR2/DDR3 support - 10/100/1000M ethernet - usual peripherals like USB2, SPI, I2C, PWM, etc. Four boards are supported: - Dongshan Nezha STU - 512Mb RAM - ethernet - LicheePi RV Dock - 512Mb RAM - wireless-only (RTL8723DS) - MangoPi MQ-Pro - 512Mb RAM - there are pads available for an SPI flash - wireless-only (RTL8723DS) - Nezha D1 - 512Mb/1Gb/2Gb RAM - 256Mb NAND flash - ethernet, wireless Installation: Standard SD-card installation via dd-ing the generated image to an SD-card of at least 256Mb. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
58 lines
1.6 KiB
Diff
58 lines
1.6 KiB
Diff
From 9ea0c216d4f85a8ea888a38853e9573bbd9e995a Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Sun, 7 Aug 2022 21:09:39 -0500
|
|
Subject: [PATCH 087/117] drm/sun4i: tcon: Always protect the LCD dotclock rate
|
|
|
|
This handles the case where multiple CRTCs get their .mode_set function
|
|
called during the same atomic commit, before rate protection is applied
|
|
by enabling the CRTC.
|
|
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
---
|
|
drivers/gpu/drm/sun4i/sun4i_dotclock.c | 4 ++++
|
|
drivers/gpu/drm/sun4i/sun4i_tcon.c | 6 ++++--
|
|
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c
|
|
@@ -6,6 +6,7 @@
|
|
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
|
*/
|
|
|
|
+#include <linux/clk.h>
|
|
#include <linux/clk-provider.h>
|
|
#include <linux/regmap.h>
|
|
|
|
@@ -194,12 +195,15 @@ int sun4i_dclk_create(struct device *dev
|
|
if (IS_ERR(tcon->dclk))
|
|
return PTR_ERR(tcon->dclk);
|
|
|
|
+ clk_rate_exclusive_get(tcon->dclk);
|
|
+
|
|
return 0;
|
|
}
|
|
EXPORT_SYMBOL(sun4i_dclk_create);
|
|
|
|
int sun4i_dclk_free(struct sun4i_tcon *tcon)
|
|
{
|
|
+ clk_rate_exclusive_put(tcon->dclk);
|
|
clk_unregister(tcon->dclk);
|
|
return 0;
|
|
}
|
|
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
|
|
@@ -108,9 +108,11 @@ static void sun4i_tcon_channel_set_statu
|
|
|
|
if (enabled) {
|
|
clk_prepare_enable(clk);
|
|
- clk_rate_exclusive_get(clk);
|
|
+ if (clk != tcon->dclk)
|
|
+ clk_rate_exclusive_get(clk);
|
|
} else {
|
|
- clk_rate_exclusive_put(clk);
|
|
+ if (clk != tcon->dclk)
|
|
+ clk_rate_exclusive_put(clk);
|
|
clk_disable_unprepare(clk);
|
|
}
|
|
}
|