diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-05-17 10:47:58 -0600 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2024-05-18 14:06:54 -0600 |
commit | 514da58eaf06d46aaa8499b90e7df6984363f15c (patch) | |
tree | 8b6121e4f9be0351ad8bd22ec65e04143d00276d | |
parent | bed1dbac3ac19de4db781420bd8c9f529b9666de (diff) | |
download | meta-xilinx-514da58eaf06d46aaa8499b90e7df6984363f15c.tar.gz |
kernel-module-hdmi: Fix 6.1.0 and prior kernel compatibility
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r-- | meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch | 69 | ||||
-rw-r--r-- | meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb | 2 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch new file mode 100644 index 00000000..1321a0a4 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From e1352e6872edc2b521ad44eb776ce093553192e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 17 May 2024 10:44:37 -0600 | ||
4 | Subject: [PATCH] Support both pre 6.4.0 and current kernels | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | --- | ||
8 | hdmi/xilinx_drm_hdmi.c | 3 +++ | ||
9 | misc/dp159.c | 9 +++++++++ | ||
10 | 2 files changed, 12 insertions(+) | ||
11 | |||
12 | diff --git a/hdmi/xilinx_drm_hdmi.c b/hdmi/xilinx_drm_hdmi.c | ||
13 | index 104fc3d..6ebbdca 100644 | ||
14 | --- a/hdmi/xilinx_drm_hdmi.c | ||
15 | +++ b/hdmi/xilinx_drm_hdmi.c | ||
16 | @@ -17,6 +17,7 @@ | ||
17 | * GNU General Public License for more details. | ||
18 | */ | ||
19 | |||
20 | +#include <linux/version.h> | ||
21 | #include <drm/drm_atomic_helper.h> | ||
22 | #include <drm/drm_connector.h> | ||
23 | #include <drm/drm_crtc.h> | ||
24 | @@ -27,7 +28,9 @@ | ||
25 | #include <drm/drm_of.h> | ||
26 | #include <drm/drm_probe_helper.h> | ||
27 | #include <drm/drm_sysfs.h> | ||
28 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
29 | #include <drm/display/drm_hdmi_helper.h> | ||
30 | +#endif | ||
31 | |||
32 | #include <linux/clk.h> | ||
33 | #include <linux/delay.h> | ||
34 | diff --git a/misc/dp159.c b/misc/dp159.c | ||
35 | index 0a923d6..23a92e6 100644 | ||
36 | --- a/misc/dp159.c | ||
37 | +++ b/misc/dp159.c | ||
38 | @@ -28,6 +28,7 @@ | ||
39 | #include <linux/of.h> | ||
40 | #include <linux/of.h> | ||
41 | #include <linux/clk-provider.h> | ||
42 | +#include <linux/version.h> | ||
43 | |||
44 | MODULE_DESCRIPTION("i2c device driver for dp159 redriver and retimer"); | ||
45 | MODULE_AUTHOR("Leon Woestenberg"); | ||
46 | @@ -192,12 +193,20 @@ static int dp159_probe(struct i2c_client *client, | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | + | ||
51 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
52 | static void dp159_remove(struct i2c_client *client) | ||
53 | +#else | ||
54 | +static int dp159_remove(struct i2c_client *client) | ||
55 | +#endif | ||
56 | { | ||
57 | struct clk_tx_linerate *clk_tx; | ||
58 | clk_tx = (struct clk_tx_linerate *)i2c_get_clientdata(client); | ||
59 | if (clk_tx) | ||
60 | clk_unregister(clk_tx->clk); | ||
61 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) | ||
62 | + return 0; | ||
63 | +#endif | ||
64 | } | ||
65 | |||
66 | static const struct i2c_device_id dp159_id[] = { | ||
67 | -- | ||
68 | 2.34.1 | ||
69 | |||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb index c9f20e30..cb33380b 100644 --- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb +++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb | |||
@@ -15,6 +15,8 @@ SRCREV = "82209b0021a7b5d7ef71a859eed4bafeb541ed08" | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
16 | SRC_URI = "${REPO};${BRANCHARG}" | 16 | SRC_URI = "${REPO};${BRANCHARG}" |
17 | 17 | ||
18 | SRC_URI += "file://0001-Support-both-pre-6.1.0-and-current-kernels.patch" | ||
19 | |||
18 | inherit module | 20 | inherit module |
19 | 21 | ||
20 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | 22 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" |