diff options
| author | Parth Gajjar <parth.gajjar@amd.com> | 2023-03-22 07:07:50 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-10 09:03:22 -0700 |
| commit | 4a8c409f721c036661e4b217ad666b3857076475 (patch) | |
| tree | c2dac0c9b058b145060e3205189518ff8f626720 | |
| parent | ca731fec858e7368a1cc85e6dcca90da08cfe921 (diff) | |
| download | meta-xilinx-4a8c409f721c036661e4b217ad666b3857076475.tar.gz | |
kernel-module-mali: Updated clock name to match LIMA driver
Added 0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch
Updated clock name and structure to match LIMA driver
Signed-off-by: Parth Gajjar <parth.gajjar@amd.com>
Fixup patch path to match recipe S value.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
2 files changed, 96 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb index 047c0d7a..268759c2 100644 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb | |||
| @@ -33,6 +33,7 @@ SRC_URI = " \ | |||
| 33 | file://0024-Use-community-device-tree-names.patch \ | 33 | file://0024-Use-community-device-tree-names.patch \ |
| 34 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ | 34 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ |
| 35 | file://0026-Fix-gpu-driver-probe-failure.patch \ | 35 | file://0026-Fix-gpu-driver-probe-failure.patch \ |
| 36 | file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ | ||
| 36 | " | 37 | " |
| 37 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" | 38 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" |
| 38 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" | 39 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" |
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch new file mode 100644 index 00000000..18081dc3 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | From a64707b7fea40d326c5b18636a41a5994f60048d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Parth Gajjar <parth.gajjar@amd.com> | ||
| 3 | Date: Fri, 24 Feb 2023 05:11:38 -0800 | ||
| 4 | Subject: [PATCH] Updated clock name and structure to match LIMA driver | ||
| 5 | |||
| 6 | Clock-names: | ||
| 7 | gpu -> bus | ||
| 8 | gpu_pp0,gpu_pp1 -> core | ||
| 9 | |||
| 10 | This will allow us to have a single device tree that works with both the | ||
| 11 | mali driver, as well as the lima driver. | ||
| 12 | |||
| 13 | Signed-off-by: Parth Gajjar <parth.gajjar@amd.com> | ||
| 14 | --- | ||
| 15 | linux/mali_kernel_linux.c | 37 +++++++------------ | ||
| 16 | 1 file changed, 13 insertions(+), 24 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/linux/mali_kernel_linux.c b/linux/mali_kernel_linux.c | ||
| 19 | index ad450b4..050af67 100644 | ||
| 20 | --- a/linux/mali_kernel_linux.c | ||
| 21 | +++ b/linux/mali_kernel_linux.c | ||
| 22 | @@ -48,9 +48,8 @@ | ||
| 23 | |||
| 24 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
| 25 | /* Initialize variables for clocks */ | ||
| 26 | -struct clk *clk_gpu; | ||
| 27 | -struct clk *clk_gpu_pp0; | ||
| 28 | -struct clk *clk_gpu_pp1; | ||
| 29 | +struct clk *clk_bus; | ||
| 30 | +struct clk *clk_core; | ||
| 31 | mali_bool clk_enabled; | ||
| 32 | #endif | ||
| 33 | |||
| 34 | @@ -291,19 +290,14 @@ static int mali_enable_clk(void) | ||
| 35 | return 0; | ||
| 36 | |||
| 37 | clk_enabled = MALI_TRUE; | ||
| 38 | - err = clk_prepare_enable(clk_gpu); | ||
| 39 | + err = clk_prepare_enable(clk_bus); | ||
| 40 | if (err) { | ||
| 41 | MALI_PRINT_ERROR(("Could not enable clock for GP\n\r")); | ||
| 42 | return err; | ||
| 43 | } | ||
| 44 | - err = clk_prepare_enable(clk_gpu_pp0); | ||
| 45 | + err = clk_prepare_enable(clk_core); | ||
| 46 | if (err) { | ||
| 47 | - MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r")); | ||
| 48 | - return err; | ||
| 49 | - } | ||
| 50 | - err = clk_prepare_enable(clk_gpu_pp1); | ||
| 51 | - if (err) { | ||
| 52 | - MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r")); | ||
| 53 | + MALI_PRINT_ERROR(("Could not enable clock for PP\n\r")); | ||
| 54 | return err; | ||
| 55 | } | ||
| 56 | #endif | ||
| 57 | @@ -315,9 +309,8 @@ static void mali_disable_clk(void) | ||
| 58 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
| 59 | if (clk_enabled) { | ||
| 60 | clk_enabled = MALI_FALSE; | ||
| 61 | - clk_disable_unprepare(clk_gpu); | ||
| 62 | - clk_disable_unprepare(clk_gpu_pp0); | ||
| 63 | - clk_disable_unprepare(clk_gpu_pp1); | ||
| 64 | + clk_disable_unprepare(clk_bus); | ||
| 65 | + clk_disable_unprepare(clk_core); | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | } | ||
| 69 | @@ -631,17 +624,13 @@ static int mali_probe(struct platform_device *pdev) | ||
| 70 | |||
| 71 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
| 72 | /* Initialize clocks for GPU and PP */ | ||
| 73 | - clk_gpu = devm_clk_get(&pdev->dev, "gpu"); | ||
| 74 | - if (IS_ERR(clk_gpu)) | ||
| 75 | - return PTR_ERR(clk_gpu); | ||
| 76 | - | ||
| 77 | - clk_gpu_pp0 = devm_clk_get(&pdev->dev, "core"); | ||
| 78 | - if (IS_ERR(clk_gpu_pp0)) | ||
| 79 | - return PTR_ERR(clk_gpu_pp0); | ||
| 80 | + clk_bus = devm_clk_get(&pdev->dev, "bus"); | ||
| 81 | + if (IS_ERR(clk_bus)) | ||
| 82 | + return PTR_ERR(clk_bus); | ||
| 83 | |||
| 84 | - clk_gpu_pp1 = devm_clk_get(&pdev->dev, "bus"); | ||
| 85 | - if (IS_ERR(clk_gpu_pp1)) | ||
| 86 | - return PTR_ERR(clk_gpu_pp1); | ||
| 87 | + clk_core = devm_clk_get(&pdev->dev, "core"); | ||
| 88 | + if (IS_ERR(clk_core)) | ||
| 89 | + return PTR_ERR(clk_core); | ||
| 90 | #endif | ||
| 91 | |||
| 92 | err = mali_enable_clk(); | ||
| 93 | -- | ||
| 94 | 2.25.1 | ||
| 95 | |||
