From: Mark Hatle <[email protected]> Signed-off-by: Mark Hatle <[email protected]> --- ...t-both-pre-6.1.0-and-current-kernels.patch | 69 +++++++++++++++++++ .../hdmi/kernel-module-hdmi_6.1.60.bb | 2 + 2 files changed, 71 insertions(+) create mode 100644 meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch
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 @@ +From e1352e6872edc2b521ad44eb776ce093553192e3 Mon Sep 17 00:00:00 2001 +From: Mark Hatle <[email protected]> +Date: Fri, 17 May 2024 10:44:37 -0600 +Subject: [PATCH] Support both pre 6.4.0 and current kernels + +Signed-off-by: Mark Hatle <[email protected]> +--- + hdmi/xilinx_drm_hdmi.c | 3 +++ + misc/dp159.c | 9 +++++++++ + 2 files changed, 12 insertions(+) + +diff --git a/hdmi/xilinx_drm_hdmi.c b/hdmi/xilinx_drm_hdmi.c +index 104fc3d..6ebbdca 100644 +--- a/hdmi/xilinx_drm_hdmi.c ++++ b/hdmi/xilinx_drm_hdmi.c +@@ -17,6 +17,7 @@ + * GNU General Public License for more details. + */ + ++#include <linux/version.h> + #include <drm/drm_atomic_helper.h> + #include <drm/drm_connector.h> + #include <drm/drm_crtc.h> +@@ -27,7 +28,9 @@ + #include <drm/drm_of.h> + #include <drm/drm_probe_helper.h> + #include <drm/drm_sysfs.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + #include <drm/display/drm_hdmi_helper.h> ++#endif + + #include <linux/clk.h> + #include <linux/delay.h> +diff --git a/misc/dp159.c b/misc/dp159.c +index 0a923d6..23a92e6 100644 +--- a/misc/dp159.c ++++ b/misc/dp159.c +@@ -28,6 +28,7 @@ + #include <linux/of.h> + #include <linux/of.h> + #include <linux/clk-provider.h> ++#include <linux/version.h> + + MODULE_DESCRIPTION("i2c device driver for dp159 redriver and retimer"); + MODULE_AUTHOR("Leon Woestenberg"); +@@ -192,12 +193,20 @@ static int dp159_probe(struct i2c_client *client, + return 0; + } + ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + static void dp159_remove(struct i2c_client *client) ++#else ++static int dp159_remove(struct i2c_client *client) ++#endif + { + struct clk_tx_linerate *clk_tx; + clk_tx = (struct clk_tx_linerate *)i2c_get_clientdata(client); + if (clk_tx) + clk_unregister(clk_tx->clk); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) ++ return 0; ++#endif + } + + static const struct i2c_device_id dp159_id[] = { +-- +2.34.1 + 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" BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" SRC_URI = "${REPO};${BRANCHARG}" +SRC_URI += "file://0001-Support-both-pre-6.1.0-and-current-kernels.patch" + inherit module EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5335): https://lists.yoctoproject.org/g/meta-xilinx/message/5335 Mute This Topic: https://lists.yoctoproject.org/mt/106179152/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
