Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.75 Removed upstream: bcm27xx/patches-6.12/950-0225-media-i2c-ov5647-Correct-pixel-array-offset.patch[1] bcm27xx/patches-6.12/950-0226-media-i2c-ov5647-Correct-minimum-VBLANK-value.patch[2] bcm27xx/patches-6.12/950-0248-media-i2c-ov5647-Sensor-should-report-RAW-color-spac.patch[3] qualcommax/patches-6.12/0074-v6.20-clk-qcom-gcc-ipq5018-flag-sleep-clock-as-critical.patch[4] Manually rebased: bcm27xx/patches-6.12/950-0262-mfd-simple-mfd-i2c-Add-configuration-for-RPi-POE-HAT.patch bcm27xx/patches-6.12/950-0071-drivers-mfd-sensehat-Add-Raspberry-Pi-Sense-HAT-to-s.patch bcm27xx/patches-6.12/950-0516-media-i2c-ov5647-Add-V4L2_CID_LINK_FREQUENCY-control.patch lantiq/patches-6.12/101-find_active_root.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=58f1767ad5c9eda3dd0befddc1843259d46d64fa 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=ff65571ffae52b65577121e7696bf22156e1928a 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=fbf2a108ed5eb1c896d3f354bd05314c2e22e78f 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=b109dd4970a0fc89d54b1198b163f86125dd2977 Build system: x86/64 Build-tested: flogic/glinet_gl-mt6000 Run-tested: flogic/glinet_gl-mt6000 Co-authored-by: Shiji Yang <yangshiji66@outlook.com> Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/22276 Signed-off-by: Robert Marko <robimarko@gmail.com>
75 lines
2.2 KiB
Diff
75 lines
2.2 KiB
Diff
From 371cc25966194e8fd47d36e089b5390ccc9e4df7 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Wed, 20 Apr 2022 18:08:38 +0100
|
|
Subject: [PATCH] drm/v3d: Switch clock setting to new api
|
|
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
|
|
drm/v3d: Convert to new clock range API
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/v3d/v3d_drv.c | 23 +++++++++++++++++++++--
|
|
1 file changed, 21 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/v3d/v3d_drv.c
|
|
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
|
|
@@ -17,6 +17,7 @@
|
|
#include <linux/dma-mapping.h>
|
|
#include <linux/io.h>
|
|
#include <linux/module.h>
|
|
+#include <linux/of.h>
|
|
#include <linux/of_platform.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/sched/clock.h>
|
|
@@ -24,6 +25,9 @@
|
|
|
|
#include <drm/drm_drv.h>
|
|
#include <drm/drm_managed.h>
|
|
+
|
|
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
|
+
|
|
#include <uapi/drm/v3d_drm.h>
|
|
|
|
#include "v3d_drv.h"
|
|
@@ -263,6 +267,8 @@ map_regs(struct v3d_dev *v3d, void __iom
|
|
static int v3d_platform_drm_probe(struct platform_device *pdev)
|
|
{
|
|
struct device *dev = &pdev->dev;
|
|
+ struct rpi_firmware *firmware;
|
|
+ struct device_node *node;
|
|
struct drm_device *drm;
|
|
struct v3d_dev *v3d;
|
|
int ret;
|
|
@@ -339,7 +345,20 @@ static int v3d_platform_drm_probe(struct
|
|
dev_err(dev, "Failed to get clock (%ld)\n", PTR_ERR(v3d->clk));
|
|
return PTR_ERR(v3d->clk);
|
|
}
|
|
- v3d->clk_up_rate = clk_get_rate(v3d->clk);
|
|
+
|
|
+ node = rpi_firmware_find_node();
|
|
+ if (!node)
|
|
+ return -EINVAL;
|
|
+
|
|
+ firmware = rpi_firmware_get(node);
|
|
+ of_node_put(node);
|
|
+ if (!firmware)
|
|
+ return -EPROBE_DEFER;
|
|
+
|
|
+ v3d->clk_up_rate = rpi_firmware_clk_get_max_rate(firmware,
|
|
+ RPI_FIRMWARE_V3D_CLK_ID);
|
|
+ rpi_firmware_put(firmware);
|
|
+
|
|
/* For downclocking, drop it to the minimum frequency we can get from
|
|
* the CPRMAN clock generator dividing off our parent. The divider is
|
|
* 4 bits, but ask for just higher than that so that rounding doesn't
|
|
@@ -377,7 +396,7 @@ static int v3d_platform_drm_probe(struct
|
|
ret = v3d_sysfs_init(dev);
|
|
if (ret)
|
|
goto drm_unregister;
|
|
- ret = clk_set_rate(v3d->clk, v3d->clk_down_rate);
|
|
+ ret = clk_set_min_rate(v3d->clk, v3d->clk_down_rate);
|
|
WARN_ON_ONCE(ret != 0);
|
|
|
|
return 0;
|