Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: patch: support for d421 #13117

Merged
merged 6 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/99-realsense-libusb.rules
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b64", MODE:="066
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b68", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6a", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="1155", MODE:="0666", GROUP:="plugdev"

# Intel RealSense recovery devices (DFU)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ab3", MODE:="0666", GROUP:="plugdev"
Expand Down
3 changes: 2 additions & 1 deletion scripts/patch-realsense-ubuntu-lts-hwe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ k_tick=$(echo ${kernel_version[2]} | awk -F'-' '{print $2}')
[ $k_maj_min -eq 504 ] && [ $k_tick -ge 156 ] && apply_hid_gyro_patch=1 && skip_hid_patch=1
# For kernel versions 6+ powerline frequency already applied
[ $k_maj_min -ge 600 ] && skip_plf_patch=1
[ $k_maj_min -ge 605 ] && skip_md_patch=1
# do not skip md patch - new d421.
#[ $k_maj_min -ge 605 ] && skip_md_patch=1

# Construct branch name from distribution codename {xenial,bionic,..} and kernel version
# ubuntu_codename=`. /etc/os-release; echo ${UBUNTU_CODENAME/*, /}`
Expand Down
25 changes: 17 additions & 8 deletions scripts/realsense-metadata-focal-hwe-5.13.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 7f1476ad8a599649a1067576d1efc4b28bb27e11 Mon Sep 17 00:00:00 2001
From 7480bd53bd1af5a11fc890e6b9a1a2991bfa6a28 Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Sun, 22 Jan 2023 13:46:16 +0200
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 20.04. Kernel
Expand All @@ -8,15 +8,15 @@ Co-developed-by: Yu MENG <yu1.meng@intel.com>
Co-developed-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 288 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 280 insertions(+), 1 deletion(-)
2 files changed, 289 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 9a791d8ef..6d875181a 100644
index 205d52412..e167ec854 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,285 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3221,6 +3221,294 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -298,15 +298,24 @@ index 9a791d8ef..6d875181a 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D421 Depth Module */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x1155,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index c3ea6a538..99f9041f8 100644
index 3a551e3fa..82f60e855 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -187,7 +187,7 @@
@@ -221,7 +221,7 @@
/* Maximum number of packets per URB. */
#define UVC_MAX_PACKETS 32
/* Maximum status buffer size in bytes of interrupt URB. */
Expand All @@ -316,5 +325,5 @@ index c3ea6a538..99f9041f8 100644
#define UVC_CTRL_CONTROL_TIMEOUT 5000
#define UVC_CTRL_STREAMING_TIMEOUT 5000
--
2.34.1
2.25.1

25 changes: 17 additions & 8 deletions scripts/realsense-metadata-focal-hwe-5.15.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 152daea37c2e6e3be4f2ae9d70441e2d381a0705 Mon Sep 17 00:00:00 2001
From 1d10a22a198d8b54c252de46efd4b05396bc0aed Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Sun, 22 Jan 2023 13:46:16 +0200
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 20.04. Kernel
Expand All @@ -8,15 +8,15 @@ Co-developed-by: Yu MENG <yu1.meng@intel.com>
Co-developed-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 288 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 280 insertions(+), 1 deletion(-)
2 files changed, 289 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 72fff7264..4d46d06f7 100644
index 2816f79ef..81b86da7c 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,285 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3221,6 +3221,294 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -298,15 +298,24 @@ index 72fff7264..4d46d06f7 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D421 Depth Module */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x1155,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index c3ea6a538..99f9041f8 100644
index 098cc8fa4..5d252335c 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -187,7 +187,7 @@
@@ -221,7 +221,7 @@
/* Maximum number of packets per URB. */
#define UVC_MAX_PACKETS 32
/* Maximum status buffer size in bytes of interrupt URB. */
Expand All @@ -316,5 +325,5 @@ index c3ea6a538..99f9041f8 100644
#define UVC_CTRL_CONTROL_TIMEOUT 5000
#define UVC_CTRL_STREAMING_TIMEOUT 5000
--
2.34.1
2.25.1

19 changes: 14 additions & 5 deletions scripts/realsense-metadata-jammy-hwe-6.2.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 04128af65169760ec4c8fba681ef278fc22b7ec1 Mon Sep 17 00:00:00 2001
From 3df5a4700229bd76b6c460e0b26529637f3ed172 Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Sun, 13 Aug 2023 12:13:21 +0300
Subject: [PATCH] Enabling UVC Metadata attributes, Ubuntu jammy 22.04. Kernel
6.2

Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 90 ++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 99 ++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 91 insertions(+), 1 deletion(-)
2 files changed, 100 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 362df9dd3..8f65b969b 100644
index 362df9dd3..3fedf65ab 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2963,6 +2963,33 @@ static const struct usb_device_id uvc_ids[] = {
Expand Down Expand Up @@ -48,7 +48,7 @@ index 362df9dd3..8f65b969b 100644
/* Intel RealSense D4M */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
@@ -2972,6 +2999,69 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2972,6 +2999,78 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -114,6 +114,15 @@ index 362df9dd3..8f65b969b 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D421 Depth Module */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x1155,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
33 changes: 33 additions & 0 deletions scripts/realsense-metadata-jammy-hwe-6.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From cd69befded13738c855bb40b99dbee24676f0a41 Mon Sep 17 00:00:00 2001
From: Dmitry <dmitry.perchanov@intel.com>
Date: Sun, 7 Jul 2024 04:56:36 -0400
Subject: [PATCH] RealSense UVC Metadata, jammy kernel 6.5

Signed-off-by: Dmitry <dmitry.perchanov@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index fb3e43dde..b04271d30 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3147,6 +3147,15 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = UVC_PC_PROTOCOL_15,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D421 Depth Module */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x1155,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
--
2.34.1

23 changes: 16 additions & 7 deletions scripts/realsense-metadata-jammy-master.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 68ebc4e3fb3729f2b6804ea4d72d5dfda356512f Mon Sep 17 00:00:00 2001
From f8c4dca6a001d42a79a2a7a5d9fc4748bb5df25c Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Sun, 22 Jan 2023 12:58:19 +0200
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 22.04. Kernel
Expand All @@ -8,15 +8,15 @@ Co-developed-by: Yu MENG <yu1.meng@intel.com>
Co-developed-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 288 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 280 insertions(+), 1 deletion(-)
2 files changed, 289 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 2e7df1de0..848417912 100644
index caed9a2ab..c6763420b 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3152,6 +3152,285 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3234,6 +3234,294 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -298,15 +298,24 @@ index 2e7df1de0..848417912 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D421 Depth Module */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x1155,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 1aa2cc985..2772a4640 100644
index 20782860d..f469327d9 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -187,7 +187,7 @@
@@ -224,7 +224,7 @@
/* Maximum number of packets per URB. */
#define UVC_MAX_PACKETS 32
/* Maximum status buffer size in bytes of interrupt URB. */
Expand Down
Loading