mirror of
https://github.com/Fishwaldo/build.git
synced 2025-04-01 11:41:42 +00:00
- Boots, Bluetooth, Reboot OK - Audio missing - spidev error (I think it's been here a while) - disabled both DWC2 patches, added 1008-rockchip-dwc2-usb-partial-power-down.patch from @Miouyouyou - Review/test, boards USB hotplug works on boot for Tinker - If other circumstances (if any) aren't addressed this way, obviously re-enable. @paolosabatino - Plugging in an old U3 USB stick made the scsi CD-ROM driver go insane. Not a modern problem. - Strange error on IRQ 56/57: [ 1.477928] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:559 __enable_irq+0x54/0x7c [ 1.477935] Unbalanced enable for IRQ 57 [ 1.477940] Modules linked in: [ 1.477958] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.4-rockchip #25 [ 1.477965] Hardware name: Rockchip (Device Tree) [ 1.477995] [<c0112c64>] (unwind_backtrace) from [<c010e1d8>] (show_stack+0x20/0x24) [ 1.478016] [<c010e1d8>] (show_stack) from [<c0e40674>] (dump_stack+0x80/0x94) [ 1.478037] [<c0e40674>] (dump_stack) from [<c0125400>] (__warn+0xf0/0x108) [ 1.478055] [<c0125400>] (__warn) from [<c0125470>] (warn_slowpath_fmt+0x58/0x74) [ 1.478075] [<c0125470>] (warn_slowpath_fmt) from [<c018fb50>] (__enable_irq+0x54/0x7c) [ 1.478094] [<c018fb50>] (__enable_irq) from [<c018fbcc>] (enable_irq+0x54/0xa0) [ 1.478113] [<c018fbcc>] (enable_irq) from [<c07d59c4>] (vop_unbind+0x24/0x54) [ 1.478130] [<c07d59c4>] (vop_unbind) from [<c07e3344>] (component_unbind+0x40/0x78) [ 1.478145] [<c07e3344>] (component_unbind) from [<c07e3764>] (component_bind_all+0x1f0/0x238) [ 1.478158] [<c07e3764>] (component_bind_all) from [<c07d3628>] (rockchip_drm_bind+0xac/0x1e4) [ 1.478173] [<c07d3628>] (rockchip_drm_bind) from [<c07e3ab0>] (try_to_bring_up_master+0x15c/0x198) [ 1.478187] [<c07e3ab0>] (try_to_bring_up_master) from [<c07e3d18>] (component_master_add_with_match+0xdc/0x110) [ 1.478201] [<c07e3d18>] (component_master_add_with_match) from [<c07d39c8>] (rockchip_drm_platform_probe+0x1f4/0x2ec) [ 1.478217] [<c07d39c8>] (rockchip_drm_platform_probe) from [<c07ec708>] (platform_drv_probe+0x58/0xa8) [ 1.478234] [<c07ec708>] (platform_drv_probe) from [<c07ea2a4>] (really_probe+0x1e0/0x2cc) [ 1.478253] [<c07ea2a4>] (really_probe) from [<c07ea564>] (driver_probe_device+0x70/0x18c) [ 1.478270] [<c07ea564>] (driver_probe_device) from [<c07ea760>] (__driver_attach+0xe0/0xe4) [ 1.478286] [<c07ea760>] (__driver_attach) from [<c07e81f0>] (bus_for_each_dev+0x84/0xc4) [ 1.478303] [<c07e81f0>] (bus_for_each_dev) from [<c07e9ba8>] (driver_attach+0x2c/0x30) [ 1.478320] [<c07e9ba8>] (driver_attach) from [<c07e95ac>] (bus_add_driver+0x19c/0x220) [ 1.478336] [<c07e95ac>] (bus_add_driver) from [<c07eb4f4>] (driver_register+0x8c/0x124) [ 1.478352] [<c07eb4f4>] (driver_register) from [<c07ec658>] (__platform_driver_register+0x50/0x58) [ 1.478369] [<c07ec658>] (__platform_driver_register) from [<c1346fd8>] (rockchip_drm_init+0x74/0x90) [ 1.478388] [<c1346fd8>] (rockchip_drm_init) from [<c0103200>] (do_one_initcall+0x64/0x288) [ 1.478410] [<c0103200>] (do_one_initcall) from [<c1301370>] (kernel_init_freeable+0x360/0x3fc) [ 1.478428] [<c1301370>] (kernel_init_freeable) from [<c0e55a38>] (kernel_init+0x18/0x120) [ 1.478442] [<c0e55a38>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 1.478450] Exception stack(0xee975fb0 to 0xee975ff8) [ 1.478461] 5fa0: 00000000 00000000 00000000 00000000 [ 1.478475] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.478486] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.478502] ---[ end trace 390e2ce79ed4d5fa ]--- [ 1.478567] ------------[ cut here ]------------ [ 1.478585] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:559 __enable_irq+0x54/0x7c [ 1.478592] Unbalanced enable for IRQ 56 [ 1.478596] Modules linked in: [ 1.478614] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.19.4-rockchip #25 [ 1.478620] Hardware name: Rockchip (Device Tree) [ 1.478640] [<c0112c64>] (unwind_backtrace) from [<c010e1d8>] (show_stack+0x20/0x24) [ 1.478656] [<c010e1d8>] (show_stack) from [<c0e40674>] (dump_stack+0x80/0x94) [ 1.478674] [<c0e40674>] (dump_stack) from [<c0125400>] (__warn+0xf0/0x108) [ 1.478691] [<c0125400>] (__warn) from [<c0125470>] (warn_slowpath_fmt+0x58/0x74) [ 1.478710] [<c0125470>] (warn_slowpath_fmt) from [<c018fb50>] (__enable_irq+0x54/0x7c) [ 1.478728] [<c018fb50>] (__enable_irq) from [<c018fbcc>] (enable_irq+0x54/0xa0) [ 1.478745] [<c018fbcc>] (enable_irq) from [<c07d59c4>] (vop_unbind+0x24/0x54) [ 1.478760] [<c07d59c4>] (vop_unbind) from [<c07e3344>] (component_unbind+0x40/0x78) [ 1.478774] [<c07e3344>] (component_unbind) from [<c07e3764>] (component_bind_all+0x1f0/0x238) [ 1.478788] [<c07e3764>] (component_bind_all) from [<c07d3628>] (rockchip_drm_bind+0xac/0x1e4) [ 1.478802] [<c07d3628>] (rockchip_drm_bind) from [<c07e3ab0>] (try_to_bring_up_master+0x15c/0x198) [ 1.478817] [<c07e3ab0>] (try_to_bring_up_master) from [<c07e3d18>] (component_master_add_with_match+0xdc/0x110) [ 1.478831] [<c07e3d18>] (component_master_add_with_match) from [<c07d39c8>] (rockchip_drm_platform_probe+0x1f4/0x2ec) [ 1.478845] [<c07d39c8>] (rockchip_drm_platform_probe) from [<c07ec708>] (platform_drv_probe+0x58/0xa8) [ 1.478862] [<c07ec708>] (platform_drv_probe) from [<c07ea2a4>] (really_probe+0x1e0/0x2cc) [ 1.478880] [<c07ea2a4>] (really_probe) from [<c07ea564>] (driver_probe_device+0x70/0x18c) [ 1.478897] [<c07ea564>] (driver_probe_device) from [<c07ea760>] (__driver_attach+0xe0/0xe4) [ 1.478913] [<c07ea760>] (__driver_attach) from [<c07e81f0>] (bus_for_each_dev+0x84/0xc4) [ 1.478929] [<c07e81f0>] (bus_for_each_dev) from [<c07e9ba8>] (driver_attach+0x2c/0x30) [ 1.478946] [<c07e9ba8>] (driver_attach) from [<c07e95ac>] (bus_add_driver+0x19c/0x220) [ 1.478962] [<c07e95ac>] (bus_add_driver) from [<c07eb4f4>] (driver_register+0x8c/0x124) [ 1.478978] [<c07eb4f4>] (driver_register) from [<c07ec658>] (__platform_driver_register+0x50/0x58) [ 1.478993] [<c07ec658>] (__platform_driver_register) from [<c1346fd8>] (rockchip_drm_init+0x74/0x90) [ 1.479010] [<c1346fd8>] (rockchip_drm_init) from [<c0103200>] (do_one_initcall+0x64/0x288) [ 1.479028] [<c0103200>] (do_one_initcall) from [<c1301370>] (kernel_init_freeable+0x360/0x3fc) [ 1.479045] [<c1301370>] (kernel_init_freeable) from [<c0e55a38>] (kernel_init+0x18/0x120) [ 1.479059] [<c0e55a38>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 1.479066] Exception stack(0xee975fb0 to 0xee975ff8) [ 1.479077] 5fa0: 00000000 00000000 00000000 00000000 [ 1.479090] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.479101] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.479109] ---[ end trace 390e2ce79ed4d5fb ]---
153 lines
5.7 KiB
Diff
153 lines
5.7 KiB
Diff
From 82da876c36ccc7791d5b20e7ee8b50379f7b19aa Mon Sep 17 00:00:00 2001
|
|
From: Shunqian Zheng <zhengsq@rock-chips.com>
|
|
Date: Wed, 5 Sep 2018 19:00:10 -0300
|
|
Subject: [PATCH 4/6] media: Add controls for JPEG quantization tables
|
|
|
|
Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace
|
|
configure the JPEG quantization tables.
|
|
|
|
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
|
|
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
|
---
|
|
Documentation/media/uapi/v4l/extended-controls.rst | 31 ++++++++++++++++++++++
|
|
Documentation/media/videodev2.h.rst.exceptions | 1 +
|
|
drivers/media/v4l2-core/v4l2-ctrls.c | 10 +++++++
|
|
include/uapi/linux/v4l2-controls.h | 12 +++++++++
|
|
include/uapi/linux/videodev2.h | 1 +
|
|
5 files changed, 55 insertions(+)
|
|
|
|
diff --git a/Documentation/media/uapi/v4l/extended-controls.rst b/Documentation/media/uapi/v4l/extended-controls.rst
|
|
index 9f7312bf..1335d27d 100644
|
|
--- a/Documentation/media/uapi/v4l/extended-controls.rst
|
|
+++ b/Documentation/media/uapi/v4l/extended-controls.rst
|
|
@@ -3354,7 +3354,38 @@ JPEG Control IDs
|
|
Specify which JPEG markers are included in compressed stream. This
|
|
control is valid only for encoders.
|
|
|
|
+.. _jpeg-quant-tables-control:
|
|
|
|
+``V4L2_CID_JPEG_QUANTIZATION (struct)``
|
|
+ Specifies the luma and chroma quantization matrices for encoding
|
|
+ or decoding a V4L2_PIX_FMT_JPEG_RAW format buffer. The :ref:`itu-t81`
|
|
+ specification allows 8-bit quantization coefficients for
|
|
+ baseline profile images, and 8-bit or 16-bit for extended profile
|
|
+ images. Supporting or not 16-bit precision coefficients is driver-specific.
|
|
+ Coefficients must be set in JPEG zigzag scan order.
|
|
+
|
|
+
|
|
+.. c:type:: struct v4l2_ctrl_jpeg_quantization
|
|
+
|
|
+.. cssclass:: longtable
|
|
+
|
|
+.. flat-table:: struct v4l2_ctrl_jpeg_quantization
|
|
+ :header-rows: 0
|
|
+ :stub-columns: 0
|
|
+ :widths: 1 1 2
|
|
+
|
|
+ * - __u8
|
|
+ - ``precision``
|
|
+ - Specifies the coefficient precision. User shall set 0
|
|
+ for 8-bit, and 1 for 16-bit.
|
|
+
|
|
+ * - __u16
|
|
+ - ``luma_quantization_matrix[64]``
|
|
+ - Sets the luma quantization table.
|
|
+
|
|
+ * - __u16
|
|
+ - ``chroma_quantization_matrix[64]``
|
|
+ - Sets the chroma quantization table.
|
|
|
|
.. flat-table::
|
|
:header-rows: 0
|
|
diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
|
|
index ca9f0edc..a0a38e92 100644
|
|
--- a/Documentation/media/videodev2.h.rst.exceptions
|
|
+++ b/Documentation/media/videodev2.h.rst.exceptions
|
|
@@ -129,6 +129,7 @@ replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type`
|
|
replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type`
|
|
replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type`
|
|
replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type`
|
|
+replace symbol V4L2_CTRL_TYPE_JPEG_QUANTIZATION :c:type:`v4l2_ctrl_type`
|
|
|
|
# V4L2 capability defines
|
|
replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities
|
|
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
|
|
index 599c1cbf..305bd7a9 100644
|
|
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
|
|
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
|
|
@@ -999,6 +999,7 @@ const char *v4l2_ctrl_get_name(u32 id)
|
|
case V4L2_CID_JPEG_RESTART_INTERVAL: return "Restart Interval";
|
|
case V4L2_CID_JPEG_COMPRESSION_QUALITY: return "Compression Quality";
|
|
case V4L2_CID_JPEG_ACTIVE_MARKER: return "Active Markers";
|
|
+ case V4L2_CID_JPEG_QUANTIZATION: return "JPEG Quantization Tables";
|
|
|
|
/* Image source controls */
|
|
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
|
|
@@ -1286,6 +1287,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
|
case V4L2_CID_DETECT_MD_REGION_GRID:
|
|
*type = V4L2_CTRL_TYPE_U8;
|
|
break;
|
|
+ case V4L2_CID_JPEG_QUANTIZATION:
|
|
+ *type = V4L2_CTRL_TYPE_JPEG_QUANTIZATION;
|
|
+ break;
|
|
case V4L2_CID_DETECT_MD_THRESHOLD_GRID:
|
|
*type = V4L2_CTRL_TYPE_U16;
|
|
break;
|
|
@@ -1612,6 +1616,9 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
|
|
return -ERANGE;
|
|
return 0;
|
|
|
|
+ case V4L2_CTRL_TYPE_JPEG_QUANTIZATION:
|
|
+ return 0;
|
|
+
|
|
default:
|
|
return -EINVAL;
|
|
}
|
|
@@ -2133,6 +2140,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
|
|
case V4L2_CTRL_TYPE_U32:
|
|
elem_size = sizeof(u32);
|
|
break;
|
|
+ case V4L2_CTRL_TYPE_JPEG_QUANTIZATION:
|
|
+ elem_size = sizeof(struct v4l2_ctrl_jpeg_quantization);
|
|
+ break;
|
|
default:
|
|
if (type < V4L2_CTRL_COMPOUND_TYPES)
|
|
elem_size = sizeof(s32);
|
|
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
|
|
index e4ee10ee..856b3325 100644
|
|
--- a/include/uapi/linux/v4l2-controls.h
|
|
+++ b/include/uapi/linux/v4l2-controls.h
|
|
@@ -987,6 +987,18 @@ enum v4l2_jpeg_chroma_subsampling {
|
|
#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
|
|
#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
|
|
|
|
+#define V4L2_CID_JPEG_QUANTIZATION (V4L2_CID_JPEG_CLASS_BASE + 5)
|
|
+struct v4l2_ctrl_jpeg_quantization {
|
|
+ /* ITU-T.81 specifies two quantization coefficient precisions:
|
|
+ * 8-bit for baseline profile,
|
|
+ * 8-bit or 16-bit for extended profile.
|
|
+ *
|
|
+ * User shall set "precision" to 0 for 8-bit and 1 for 16-bit.
|
|
+ */
|
|
+ __u8 precision;
|
|
+ __u16 luma_quantization_matrix[64];
|
|
+ __u16 chroma_quantization_matrix[64];
|
|
+};
|
|
|
|
/* Image source controls */
|
|
#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
|
|
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
|
|
index f271048c..e998d074 100644
|
|
--- a/include/uapi/linux/videodev2.h
|
|
+++ b/include/uapi/linux/videodev2.h
|
|
@@ -1630,6 +1630,7 @@ enum v4l2_ctrl_type {
|
|
V4L2_CTRL_TYPE_U8 = 0x0100,
|
|
V4L2_CTRL_TYPE_U16 = 0x0101,
|
|
V4L2_CTRL_TYPE_U32 = 0x0102,
|
|
+ V4L2_CTRL_TYPE_JPEG_QUANTIZATION = 0x0103,
|
|
};
|
|
|
|
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
|
|
--
|
|
2.16.4
|
|
|