Skip to content

Commit

Permalink
kernel patches for mainline 6.5
Browse files Browse the repository at this point in the history
Signed-off-by: zouxiaoh <[email protected]>
  • Loading branch information
zouxiaoh committed Sep 7, 2023
1 parent be97ad3 commit 6dbaacc
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
From 69479e6c67724d17953ce406c7b92f644b8c5310 Mon Sep 17 00:00:00 2001
From: zouxiaoh <[email protected]>
Date: Mon, 21 Aug 2023 17:28:39 +0800
Subject: [PATCH 1/5] media: intel: Enable LT6911UXC, LT6911UXE and Intel IPU6

Change Description:
Message for Open Source:
Enable LT6911UXC, LT6911UXE and Intel IPU6

Message for Internal:
Enable LT6911UXC, LT6911UXE and Intel IPU6

Test Platform:
ADL-N CRB

Signed-off-by: zouxiaoh <[email protected]>
---
drivers/media/i2c/Kconfig | 22 ++++++++++++++++++++++
drivers/media/i2c/Makefile | 2 ++
drivers/media/pci/Kconfig | 2 +-
3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 226454b6a90d..fee6b96c4517 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -1623,6 +1623,28 @@ config VIDEO_THS7303
To compile this driver as a module, choose M here: the
module will be called ths7303.

+config VIDEO_LT6911UXC
+ tristate "Lontium LT6911UXC decoder"
+ depends on VIDEO_DEV && I2C
+ select VIDEO_V4L2_SUBDEV_API
+ help
+ This is a Video4Linux2 sensor-level driver for the Lontium
+ LT6911UXC HDMI to MIPI CSI-2 bridge.
+
+ To compile this driver as a module, choose M here: the
+ module will be called lt6911uxc.
+
+config VIDEO_LT6911UXE
+ tristate "Lontium LT6911UXE decoder"
+ depends on VIDEO_DEV && I2C
+ select VIDEO_V4L2_SUBDEV_API
+ help
+ This is a Video4Linux2 sensor-level driver for the Lontium
+ LT6911UXE HDMI to MIPI CSI-2 bridge.
+
+ To compile this driver as a module, choose M here: the
+ module will be called lt6911uxe.
+
endmenu

endif # VIDEO_DEV
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index c743aeb5d1ad..8fdf95b90763 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -141,3 +141,5 @@ obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
+obj-$(CONFIG_VIDEO_LT6911UXC) += lt6911uxc.o
+obj-$(CONFIG_VIDEO_LT6911UXE) += lt6911uxe.o
diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index 480194543d05..ee095bde0b68 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -73,7 +73,7 @@ config VIDEO_PCI_SKELETON
Enable build of the skeleton PCI driver, used as a reference
when developing new drivers.

-source "drivers/media/pci/intel/ipu3/Kconfig"
+source "drivers/media/pci/intel/Kconfig"

endif #MEDIA_PCI_SUPPORT
endif #PCI
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From 2d581cf87ce402efc0367201a172d5e6696fa8e2 Mon Sep 17 00:00:00 2001
From: Ng Khai Wen <[email protected]>
Date: Wed, 11 Jan 2023 15:27:18 +0800
Subject: [PATCH 2/5] INT3472: Support LT6911UXC&LT6911UXE

Signed-off-by: Ng Khai Wen <[email protected]>
Signed-off-by: zouxiaoh <[email protected]>
Signed-off-by: Sun Jia <[email protected]>
---
drivers/platform/x86/intel/int3472/common.h | 4 +++-
drivers/platform/x86/intel/int3472/discrete.c | 16 +++++++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
index 9f29baa13860..5bd708409efd 100644
--- a/drivers/platform/x86/intel/int3472/common.h
+++ b/drivers/platform/x86/intel/int3472/common.h
@@ -22,9 +22,11 @@
#define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b
#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c
#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d
+#define INT3472_GPIO_TYPE_READY_STAT 0x13
+#define INT3472_GPIO_TYPE_HDMI_DETECT 0x14

#define INT3472_PDEV_MAX_NAME_LEN 23
-#define INT3472_MAX_SENSOR_GPIOS 3
+#define INT3472_MAX_SENSOR_GPIOS 4

#define GPIO_REGULATOR_NAME_LENGTH 21
#define GPIO_REGULATOR_SUPPLY_NAME_LENGTH 9
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index e33c2d75975c..8218f0d668d0 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -110,6 +110,14 @@ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polar
*func = "power-enable";
*polarity = GPIO_ACTIVE_HIGH;
break;
+ case INT3472_GPIO_TYPE_READY_STAT:
+ *func = "readystat";
+ *polarity = GPIO_LOOKUP_FLAGS_DEFAULT;
+ break;
+ case INT3472_GPIO_TYPE_HDMI_DETECT:
+ *func = "hdmidetect";
+ *polarity = GPIO_LOOKUP_FLAGS_DEFAULT;
+ break;
default:
*func = "unknown";
*polarity = GPIO_ACTIVE_HIGH;
@@ -200,9 +208,15 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
switch (type) {
case INT3472_GPIO_TYPE_RESET:
case INT3472_GPIO_TYPE_POWERDOWN:
+ case INT3472_GPIO_TYPE_READY_STAT:
+ case INT3472_GPIO_TYPE_HDMI_DETECT:
ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, func, polarity);
- if (ret)
+ if (ret) {
err_msg = "Failed to map GPIO pin to sensor\n";
+ dev_warn(int3472->dev,
+ "Failed to map GPIO pin to sensor, type %02x, func %s, polarity %u\n",
+ type, func, polarity);
+ }

break;
case INT3472_GPIO_TYPE_CLK_ENABLE:
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 52b609d80de785dca7823b5fe5610bb26170c588 Mon Sep 17 00:00:00 2001
From: zouxiaoh <[email protected]>
Date: Tue, 23 Aug 2022 13:33:47 +0800
Subject: [PATCH 3/5] platform: x86: intel: Support LT6911UXC by INT3472

Change Description:
Message for Open Source:
Support LT6911UXC by INT3472

Message for Internal:
Support LT6911UXC by INT3472

Test Platform:
RPL-P RVP

Signed-off-by: zouxiaoh <[email protected]>
Signed-off-by: khaiwenn <[email protected]>
---
drivers/platform/x86/intel/int3472/discrete.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 8218f0d668d0..06ab2a7cfb7f 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -304,7 +304,7 @@ static int skl_int3472_discrete_probe(struct platform_device *pdev)
return ret;
}

- if (cldb.control_logic_type != 1) {
+ if (cldb.control_logic_type != 1 && cldb.control_logic_type != 5) {
dev_err(&pdev->dev, "Unsupported control logic type %u\n",
cldb.control_logic_type);
return -EINVAL;
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From b4c0409613bc9cc0c14ab0c4ac13466bbc857a5a Mon Sep 17 00:00:00 2001
From: Hongju Wang <[email protected]>
Date: Wed, 19 Apr 2023 15:35:29 +0800
Subject: [PATCH 4/5] media: v4l2: Support line-based metadata capture

Test Platform:
ADL-P

Signed-off-by: Hongju Wang <[email protected]>
Signed-off-by: zouxiaoh <[email protected]>
---
include/uapi/linux/videodev2.h | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 3af6a82d0cad..1659b56b21a0 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -866,6 +866,7 @@ struct v4l2_fmtdesc {
#define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080
#define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC
#define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100
+#define V4L2_FMT_FLAG_META_LINE_BASED 0x0200

/* Frame Size and frame rate enumeration */
/*
@@ -2409,10 +2410,19 @@ struct v4l2_sdr_format {
* struct v4l2_meta_format - metadata format definition
* @dataformat: little endian four character code (fourcc)
* @buffersize: maximum size in bytes required for data
+ * @width: number of bytes of data per line (valid for line based
+ * formats only, see format documentation)
+ * @height: number of lines of data per buffer (valid for line based
+ * formats only)
+ * @bytesperline: offset between the beginnings of two adjacent lines in
+ * bytes (valid for line based formats only)
*/
struct v4l2_meta_format {
__u32 dataformat;
__u32 buffersize;
+ __u32 width;
+ __u32 height;
+ __u32 bytesperline;
} __attribute__ ((packed));

/**
--
2.34.1

0 comments on commit 6dbaacc

Please sign in to comment.