mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
parent
d52eb58fca
commit
eeac3fd81e
@ -39,7 +39,7 @@ Changes from v1:
|
||||
|
||||
--- a/drivers/gpu/drm/drm_probe_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_probe_helper.c
|
||||
@@ -795,6 +795,86 @@ void drm_kms_helper_poll_fini(struct drm
|
||||
@@ -796,6 +796,86 @@ void drm_kms_helper_poll_fini(struct drm
|
||||
}
|
||||
EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
|
||||
@ -126,7 +126,7 @@ Changes from v1:
|
||||
/**
|
||||
* drm_helper_hpd_irq_event - hotplug processing
|
||||
* @dev: drm_device
|
||||
@@ -808,9 +888,10 @@ EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
@@ -809,9 +889,10 @@ EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
* interrupts for each connector.
|
||||
*
|
||||
* Drivers which support hotplug interrupts for each connector individually and
|
||||
@ -140,7 +140,7 @@ Changes from v1:
|
||||
*
|
||||
* This function must be called from process context with no mode
|
||||
* setting locks held.
|
||||
@@ -822,9 +903,7 @@ bool drm_helper_hpd_irq_event(struct drm
|
||||
@@ -823,9 +904,7 @@ bool drm_helper_hpd_irq_event(struct drm
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_list_iter conn_iter;
|
||||
@ -150,7 +150,7 @@ Changes from v1:
|
||||
|
||||
if (!dev->mode_config.poll_enabled)
|
||||
return false;
|
||||
@@ -832,37 +911,8 @@ bool drm_helper_hpd_irq_event(struct drm
|
||||
@@ -833,37 +912,8 @@ bool drm_helper_hpd_irq_event(struct drm
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
drm_connector_list_iter_begin(dev, &conn_iter);
|
||||
drm_for_each_connector_iter(connector, &conn_iter) {
|
||||
|
@ -283,7 +283,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
void __user *argp = (void __user *)arg;
|
||||
long ret = 0;
|
||||
|
||||
@@ -1182,6 +1207,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1184,6 +1209,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
unlock_fb_info(info);
|
||||
console_unlock();
|
||||
break;
|
||||
@ -299,7 +299,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
default:
|
||||
lock_fb_info(info);
|
||||
fb = info->fbops;
|
||||
@@ -1321,6 +1355,7 @@ static long fb_compat_ioctl(struct file
|
||||
@@ -1323,6 +1357,7 @@ static long fb_compat_ioctl(struct file
|
||||
case FBIOPAN_DISPLAY:
|
||||
case FBIOGET_CON2FBMAP:
|
||||
case FBIOPUT_CON2FBMAP:
|
||||
|
@ -30043,7 +30043,7 @@ index 11eae3e3a944..5a90727064ee 100644
|
||||
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
|
||||
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
|
||||
|
||||
subdir-y += bcm4908
|
||||
subdir-y += bcmbca
|
||||
subdir-y += northstar2
|
||||
subdir-y += stingray
|
||||
+
|
||||
|
@ -106,7 +106,7 @@ configfs: New of_overlay API
|
||||
+++ b/drivers/of/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-y = base.o device.o platform.o property.o
|
||||
obj-y = base.o device.o module.o platform.o property.o
|
||||
obj-$(CONFIG_OF_KOBJ) += kobj.o
|
||||
+obj-$(CONFIG_OF_CONFIGFS) += configfs.o
|
||||
obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -1618,6 +1618,109 @@ command_cleanup:
|
||||
@@ -1622,6 +1622,109 @@ command_cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5457,6 +5560,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5461,6 +5564,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17522,6 +17522,14 @@ T: git git://linuxtv.org/media_tree.git
|
||||
@@ -17541,6 +17541,14 @@ T: git git://linuxtv.org/media_tree.git
|
||||
F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
|
||||
F: drivers/media/i2c/imx412.c
|
||||
|
||||
|
@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
|
||||
+...
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17536,6 +17536,7 @@ M: Raspberry Pi Kernel Maintenance <kern
|
||||
@@ -17555,6 +17555,7 @@ M: Raspberry Pi Kernel Maintenance <kern
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://linuxtv.org/media_tree.git
|
||||
|
@ -0,0 +1,214 @@
|
||||
From a08e51a8b93f857cde93ddd7730c1cdedb6ccdd1 Mon Sep 17 00:00:00 2001
|
||||
From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
|
||||
Date: Fri, 18 Jun 2021 13:02:29 +0200
|
||||
Subject: [PATCH] Support RPi DPI interface in mode6 for 18-bit color
|
||||
|
||||
A matching media bus format was added and an overlay for using it,
|
||||
both with FB and VC4 was added as well.
|
||||
|
||||
Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
|
||||
---
|
||||
.../bindings/display/panel/panel-simple.yaml | 2 +
|
||||
.../media/v4l/subdev-formats.rst | 74 +++++++++++++++++++
|
||||
drivers/gpu/drm/panel/panel-simple.c | 35 +++++++++
|
||||
drivers/gpu/drm/vc4/vc4_dpi.c | 10 +++
|
||||
include/uapi/linux/media-bus-format.h | 4 +-
|
||||
5 files changed, 124 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
|
||||
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
|
||||
@@ -162,6 +162,8 @@ properties:
|
||||
- ivo,m133nwf4-r0
|
||||
# Innolux AT043TN24 4.3" WQVGA TFT LCD panel
|
||||
- innolux,at043tn24
|
||||
+ # Innolux AT056tN53V1 5.6" VGA (640x480) TFT LCD panel
|
||||
+ - innolux,at056tn53v1
|
||||
# Innolux AT070TN92 7.0" WQVGA TFT LCD panel
|
||||
- innolux,at070tn92
|
||||
# Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD panel
|
||||
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
|
||||
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
|
||||
@@ -912,6 +912,43 @@ The following tables list existing packe
|
||||
- g\ :sub:`5`
|
||||
- g\ :sub:`4`
|
||||
- g\ :sub:`3`
|
||||
+ * .. _MEDIA-BUS-FMT-BGR666-1X18:
|
||||
+
|
||||
+ - MEDIA_BUS_FMT_RGB666_1X18
|
||||
+ - 0x101f
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ - b\ :sub:`5`
|
||||
+ - b\ :sub:`4`
|
||||
+ - b\ :sub:`3`
|
||||
+ - b\ :sub:`2`
|
||||
+ - b\ :sub:`1`
|
||||
+ - b\ :sub:`0`
|
||||
+ - g\ :sub:`5`
|
||||
+ - g\ :sub:`4`
|
||||
+ - g\ :sub:`3`
|
||||
+ - g\ :sub:`2`
|
||||
+ - g\ :sub:`1`
|
||||
+ - g\ :sub:`0`
|
||||
+ - r\ :sub:`5`
|
||||
+ - r\ :sub:`4`
|
||||
+ - r\ :sub:`3`
|
||||
+ - r\ :sub:`2`
|
||||
+ - r\ :sub:`1`
|
||||
+ - r\ :sub:`0`
|
||||
* .. _MEDIA-BUS-FMT-RGB666-1X18:
|
||||
|
||||
- MEDIA_BUS_FMT_RGB666_1X18
|
||||
@@ -986,6 +1023,43 @@ The following tables list existing packe
|
||||
- g\ :sub:`2`
|
||||
- g\ :sub:`1`
|
||||
- g\ :sub:`0`
|
||||
+ * .. _MEDIA-BUS-FMT-BGR666-1X24_CPADHI:
|
||||
+
|
||||
+ - MEDIA_BUS_FMT_BGR666_1X24_CPADHI
|
||||
+ - 0x101e
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ -
|
||||
+ - 0
|
||||
+ - 0
|
||||
+ - b\ :sub:`5`
|
||||
+ - b\ :sub:`4`
|
||||
+ - b\ :sub:`3`
|
||||
+ - b\ :sub:`2`
|
||||
+ - b\ :sub:`1`
|
||||
+ - b\ :sub:`0`
|
||||
+ - 0
|
||||
+ - 0
|
||||
+ - g\ :sub:`5`
|
||||
+ - g\ :sub:`4`
|
||||
+ - g\ :sub:`3`
|
||||
+ - g\ :sub:`2`
|
||||
+ - g\ :sub:`1`
|
||||
+ - g\ :sub:`0`
|
||||
+ - 0
|
||||
+ - 0
|
||||
+ - r\ :sub:`5`
|
||||
+ - r\ :sub:`4`
|
||||
+ - r\ :sub:`3`
|
||||
+ - r\ :sub:`2`
|
||||
+ - r\ :sub:`1`
|
||||
+ - r\ :sub:`0`
|
||||
* .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI:
|
||||
|
||||
- MEDIA_BUS_FMT_RGB666_1X24_CPADHI
|
||||
--- a/drivers/gpu/drm/panel/panel-simple.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-simple.c
|
||||
@@ -2472,6 +2472,38 @@ static const struct panel_desc innolux_a
|
||||
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
|
||||
};
|
||||
|
||||
+static const struct display_timing innolux_at056tn53v1_timing = {
|
||||
+ .pixelclock = { 39700000, 39700000, 39700000},
|
||||
+ .hactive = { 640, 640, 640 },
|
||||
+ .hfront_porch = { 16, 16, 16 },
|
||||
+ .hback_porch = { 134, 134, 134 },
|
||||
+ .hsync_len = { 10, 10, 10},
|
||||
+ .vactive = { 480, 480, 480 },
|
||||
+ .vfront_porch = { 32, 32, 32},
|
||||
+ .vback_porch = { 11, 11, 11 },
|
||||
+ .vsync_len = { 2, 2, 2 },
|
||||
+ .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_PHSYNC,
|
||||
+};
|
||||
+
|
||||
+static const struct panel_desc innolux_at056tn53v1 = {
|
||||
+ .timings = &innolux_at056tn53v1_timing,
|
||||
+ .num_timings = 1,
|
||||
+ .bpc = 6,
|
||||
+ .size = {
|
||||
+ .width = 112,
|
||||
+ .height = 84,
|
||||
+ },
|
||||
+ .delay = {
|
||||
+ .prepare = 50,
|
||||
+ .enable = 200,
|
||||
+ .disable = 110,
|
||||
+ .unprepare = 200,
|
||||
+ },
|
||||
+ .bus_format = MEDIA_BUS_FMT_BGR666_1X24_CPADHI,
|
||||
+ .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
|
||||
+ .connector_type = DRM_MODE_CONNECTOR_DPI,
|
||||
+};
|
||||
+
|
||||
static const struct drm_display_mode innolux_at070tn92_mode = {
|
||||
.clock = 33333,
|
||||
.hdisplay = 800,
|
||||
@@ -4662,6 +4694,9 @@ static const struct of_device_id platfor
|
||||
.compatible = "innolux,at043tn24",
|
||||
.data = &innolux_at043tn24,
|
||||
}, {
|
||||
+ .compatible = "innolux,at056tn53v1",
|
||||
+ .data = &innolux_at056tn53v1,
|
||||
+ }, {
|
||||
.compatible = "innolux,at070tn92",
|
||||
.data = &innolux_at070tn92,
|
||||
}, {
|
||||
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
@@ -167,10 +167,20 @@ static void vc4_dpi_encoder_enable(struc
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2,
|
||||
DPI_FORMAT);
|
||||
break;
|
||||
+ case MEDIA_BUS_FMT_BGR666_1X24_CPADHI:
|
||||
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2,
|
||||
+ DPI_FORMAT);
|
||||
+ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER);
|
||||
+ break;
|
||||
case MEDIA_BUS_FMT_RGB666_1X18:
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
|
||||
DPI_FORMAT);
|
||||
break;
|
||||
+ case MEDIA_BUS_FMT_BGR666_1X18:
|
||||
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
|
||||
+ DPI_FORMAT);
|
||||
+ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER);
|
||||
+ break;
|
||||
case MEDIA_BUS_FMT_RGB565_1X16:
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1,
|
||||
DPI_FORMAT);
|
||||
--- a/include/uapi/linux/media-bus-format.h
|
||||
+++ b/include/uapi/linux/media-bus-format.h
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#define MEDIA_BUS_FMT_FIXED 0x0001
|
||||
|
||||
-/* RGB - next is 0x101e */
|
||||
+/* RGB - next is 0x1020 */
|
||||
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
|
||||
@@ -45,8 +45,10 @@
|
||||
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
|
||||
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
|
||||
#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
|
||||
+#define MEDIA_BUS_FMT_BGR666_1X18 0x101f
|
||||
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
|
||||
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
|
||||
+#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI 0x101e
|
||||
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
|
||||
#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
|
||||
#define MEDIA_BUS_FMT_BGR888_1X24 0x1013
|
@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
@@ -188,8 +188,8 @@ static void vc4_dpi_encoder_enable(struc
|
||||
@@ -198,8 +198,8 @@ static void vc4_dpi_encoder_enable(struc
|
||||
if (connector->display_info.bus_flags & DRM_BUS_FLAG_DE_LOW)
|
||||
dpi_c |= DPI_OUTPUT_ENABLE_INVERT;
|
||||
} else {
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpu/drm/panel/panel-simple.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-simple.c
|
||||
@@ -3729,6 +3729,31 @@ static const struct panel_desc qishenglo
|
||||
@@ -3761,6 +3761,31 @@ static const struct panel_desc qishenglo
|
||||
.connector_type = DRM_MODE_CONNECTOR_DPI,
|
||||
};
|
||||
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
static const struct display_timing rocktech_rk070er9427_timing = {
|
||||
.pixelclock = { 26400000, 33300000, 46800000 },
|
||||
.hactive = { 800, 800, 800 },
|
||||
@@ -4806,6 +4831,9 @@ static const struct of_device_id platfor
|
||||
@@ -4841,6 +4866,9 @@ static const struct of_device_id platfor
|
||||
.compatible = "qishenglong,gopher2b-lcd",
|
||||
.data = &qishenglong_gopher2b_lcd,
|
||||
}, {
|
||||
|
@ -132,7 +132,7 @@ Signed-off-by: Lee Jackson <info@arducam.com>
|
||||
+...
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -17540,6 +17540,14 @@ F: Documentation/devicetree/bindings/med
|
||||
@@ -17559,6 +17559,14 @@ F: Documentation/devicetree/bindings/med
|
||||
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
|
||||
F: drivers/media/i2c/imx477.c
|
||||
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
int ret;
|
||||
|
||||
/* Look up the connector attached to DPI so we can get the
|
||||
@@ -192,15 +192,22 @@ static void vc4_dpi_encoder_enable(struc
|
||||
@@ -202,15 +202,22 @@ static void vc4_dpi_encoder_enable(struc
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, DPI_FORMAT);
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,9 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
@@ -167,6 +167,10 @@ static void vc4_dpi_encoder_enable(struc
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2,
|
||||
@@ -172,6 +172,10 @@ static void vc4_dpi_encoder_enable(struc
|
||||
DPI_FORMAT);
|
||||
dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER);
|
||||
break;
|
||||
+ default:
|
||||
+ DRM_ERROR("Unknown media bus format %d\n",
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
case MEDIA_BUS_FMT_RGB666_1X18:
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
|
||||
DPI_FORMAT);
|
||||
@@ -175,11 +179,12 @@ static void vc4_dpi_encoder_enable(struc
|
||||
@@ -185,11 +189,12 @@ static void vc4_dpi_encoder_enable(struc
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1,
|
||||
DPI_FORMAT);
|
||||
break;
|
||||
|
@ -226,7 +226,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
}
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -876,8 +876,8 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -880,8 +880,8 @@ static void xhci_clear_command_ring(stru
|
||||
seg = ring->deq_seg;
|
||||
do {
|
||||
memset(seg->trbs, 0,
|
||||
@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
cpu_to_le32(~TRB_CYCLE);
|
||||
seg = seg->next;
|
||||
} while (seg != ring->deq_seg);
|
||||
@@ -888,7 +888,7 @@ static void xhci_clear_command_ring(stru
|
||||
@@ -892,7 +892,7 @@ static void xhci_clear_command_ring(stru
|
||||
ring->enq_seg = ring->deq_seg;
|
||||
ring->enqueue = ring->dequeue;
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
From b27bc74f47f9e3ef6fce066b3430a6cb59c10909 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Morgan <macromorgan@hotmail.com>
|
||||
Date: Fri, 28 Jan 2022 17:38:40 -0600
|
||||
Subject: [PATCH] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
|
||||
|
||||
Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
|
||||
MZP280 panel for the Raspberry Pi.
|
||||
|
||||
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
|
||||
---
|
||||
include/uapi/linux/media-bus-format.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/include/uapi/linux/media-bus-format.h
|
||||
+++ b/include/uapi/linux/media-bus-format.h
|
||||
@@ -34,13 +34,14 @@
|
||||
|
||||
#define MEDIA_BUS_FMT_FIXED 0x0001
|
||||
|
||||
-/* RGB - next is 0x1020 */
|
||||
+/* RGB - next is 0x1021 */
|
||||
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
|
||||
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
|
||||
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
|
||||
#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
|
||||
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1020
|
||||
#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
|
||||
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
|
||||
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
|
@ -18,7 +18,7 @@ Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
|
||||
@@ -179,6 +179,10 @@ static void vc4_dpi_encoder_enable(struc
|
||||
@@ -189,6 +189,10 @@ static void vc4_dpi_encoder_enable(struc
|
||||
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1,
|
||||
DPI_FORMAT);
|
||||
break;
|
||||
|
@ -46,7 +46,7 @@ Acked-by: Maxime Ripard <maxime@cerno.tech>
|
||||
static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
|
||||
.clock = 9000,
|
||||
.hdisplay = 480,
|
||||
@@ -4672,6 +4698,9 @@ static const struct of_device_id platfor
|
||||
@@ -4704,6 +4730,9 @@ static const struct of_device_id platfor
|
||||
.compatible = "friendlyarm,hd702e",
|
||||
.data = &friendlyarm_hd702e,
|
||||
}, {
|
||||
|
@ -0,0 +1,129 @@
|
||||
From 055e3d70b0227e26d58b2efc4561eb21a3fbf640 Mon Sep 17 00:00:00 2001
|
||||
From: Naushir Patuck <naush@raspberrypi.com>
|
||||
Date: Tue, 8 Feb 2022 13:49:11 +0000
|
||||
Subject: [PATCH] media: i2c: imx219: Scale the pixel clock rate for
|
||||
the 640x480 mode
|
||||
|
||||
The 640x480 mode uses a special binning mode for high framerate operation where
|
||||
the pixel rate is effectively doubled. Account for this when setting up the
|
||||
pixel clock rate, and applying the vblank and exposure controls.
|
||||
|
||||
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
|
||||
---
|
||||
drivers/media/i2c/imx219.c | 33 ++++++++++++++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/media/i2c/imx219.c
|
||||
+++ b/drivers/media/i2c/imx219.c
|
||||
@@ -162,6 +162,9 @@ struct imx219_mode {
|
||||
|
||||
/* 2x2 binning is used */
|
||||
bool binning;
|
||||
+
|
||||
+ /* Relative pixel clock rate factor for the mode. */
|
||||
+ unsigned int rate_factor;
|
||||
};
|
||||
|
||||
static const struct imx219_reg imx219_common_regs[] = {
|
||||
@@ -402,6 +405,7 @@ static const struct imx219_mode supporte
|
||||
.regs = mode_3280x2464_regs,
|
||||
},
|
||||
.binning = false,
|
||||
+ .rate_factor = 1,
|
||||
},
|
||||
{
|
||||
/* 1080P 30fps cropped */
|
||||
@@ -419,6 +423,7 @@ static const struct imx219_mode supporte
|
||||
.regs = mode_1920_1080_regs,
|
||||
},
|
||||
.binning = false,
|
||||
+ .rate_factor = 1,
|
||||
},
|
||||
{
|
||||
/* 2x2 binned 30fps mode */
|
||||
@@ -436,6 +441,7 @@ static const struct imx219_mode supporte
|
||||
.regs = mode_1640_1232_regs,
|
||||
},
|
||||
.binning = true,
|
||||
+ .rate_factor = 1,
|
||||
},
|
||||
{
|
||||
/* 640x480 30fps mode */
|
||||
@@ -453,6 +459,11 @@ static const struct imx219_mode supporte
|
||||
.regs = mode_640_480_regs,
|
||||
},
|
||||
.binning = true,
|
||||
+ /*
|
||||
+ * This mode uses a special 2x2 binning that doubles the
|
||||
+ * the internal pixel clock rate.
|
||||
+ */
|
||||
+ .rate_factor = 2,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -675,7 +686,8 @@ static int imx219_set_ctrl(struct v4l2_c
|
||||
break;
|
||||
case V4L2_CID_EXPOSURE:
|
||||
ret = imx219_write_reg(imx219, IMX219_REG_EXPOSURE,
|
||||
- IMX219_REG_VALUE_16BIT, ctrl->val);
|
||||
+ IMX219_REG_VALUE_16BIT,
|
||||
+ ctrl->val / imx219->mode->rate_factor);
|
||||
break;
|
||||
case V4L2_CID_DIGITAL_GAIN:
|
||||
ret = imx219_write_reg(imx219, IMX219_REG_DIGITAL_GAIN,
|
||||
@@ -695,7 +707,8 @@ static int imx219_set_ctrl(struct v4l2_c
|
||||
case V4L2_CID_VBLANK:
|
||||
ret = imx219_write_reg(imx219, IMX219_REG_VTS,
|
||||
IMX219_REG_VALUE_16BIT,
|
||||
- imx219->mode->height + ctrl->val);
|
||||
+ (imx219->mode->height + ctrl->val) /
|
||||
+ imx219->mode->rate_factor);
|
||||
break;
|
||||
case V4L2_CID_TEST_PATTERN_RED:
|
||||
ret = imx219_write_reg(imx219, IMX219_REG_TESTP_RED,
|
||||
@@ -867,7 +880,7 @@ static int imx219_set_pad_format(struct
|
||||
struct imx219 *imx219 = to_imx219(sd);
|
||||
const struct imx219_mode *mode;
|
||||
struct v4l2_mbus_framefmt *framefmt;
|
||||
- int exposure_max, exposure_def, hblank;
|
||||
+ int exposure_max, exposure_def, hblank, pixel_rate;
|
||||
unsigned int i;
|
||||
|
||||
if (fmt->pad >= NUM_PADS)
|
||||
@@ -928,6 +941,12 @@ static int imx219_set_pad_format(struct
|
||||
hblank = IMX219_PPL_DEFAULT - mode->width;
|
||||
__v4l2_ctrl_modify_range(imx219->hblank, hblank, hblank,
|
||||
1, hblank);
|
||||
+
|
||||
+ /* Scale the pixel rate based on the mode specific factor */
|
||||
+ pixel_rate =
|
||||
+ IMX219_PIXEL_RATE * imx219->mode->rate_factor;
|
||||
+ __v4l2_ctrl_modify_range(imx219->pixel_rate, pixel_rate,
|
||||
+ pixel_rate, 1, pixel_rate);
|
||||
}
|
||||
} else {
|
||||
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||
@@ -1315,7 +1334,7 @@ static int imx219_init_controls(struct i
|
||||
struct v4l2_ctrl_handler *ctrl_hdlr;
|
||||
unsigned int height = imx219->mode->height;
|
||||
struct v4l2_fwnode_device_properties props;
|
||||
- int exposure_max, exposure_def, hblank;
|
||||
+ int exposure_max, exposure_def, hblank, pixel_rate;
|
||||
int i, ret;
|
||||
|
||||
ctrl_hdlr = &imx219->ctrl_handler;
|
||||
@@ -1327,11 +1346,11 @@ static int imx219_init_controls(struct i
|
||||
ctrl_hdlr->lock = &imx219->mutex;
|
||||
|
||||
/* By default, PIXEL_RATE is read only */
|
||||
+ pixel_rate = IMX219_PIXEL_RATE * imx219->mode->rate_factor;
|
||||
imx219->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &imx219_ctrl_ops,
|
||||
V4L2_CID_PIXEL_RATE,
|
||||
- IMX219_PIXEL_RATE,
|
||||
- IMX219_PIXEL_RATE, 1,
|
||||
- IMX219_PIXEL_RATE);
|
||||
+ pixel_rate, pixel_rate,
|
||||
+ 1, pixel_rate);
|
||||
|
||||
imx219->link_freq =
|
||||
v4l2_ctrl_new_int_menu(ctrl_hdlr, &imx219_ctrl_ops,
|
@ -63,7 +63,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-6-noral
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -5981,6 +5981,14 @@ T: git git://anongit.freedesktop.org/drm
|
||||
@@ -5980,6 +5980,14 @@ T: git git://anongit.freedesktop.org/drm
|
||||
F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt
|
||||
F: drivers/gpu/drm/tiny/mi0283qt.c
|
||||
|
||||
|
@ -11,7 +11,7 @@ This reverts commit 2388f826cdc9af2651991adc0feb79de9bdf2232.
|
||||
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -1629,14 +1629,7 @@ static void do_remove_conflicting_frameb
|
||||
@@ -1631,14 +1631,7 @@ static void do_remove_conflicting_frameb
|
||||
* If it's not a platform device, at least print a warning. A
|
||||
* fix would add code to remove the device from the system.
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a.
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/kmod.h>
|
||||
@@ -1606,36 +1605,18 @@ static void do_remove_conflicting_frameb
|
||||
@@ -1608,36 +1607,18 @@ static void do_remove_conflicting_frameb
|
||||
/* check all firmware fbs and kick off if the base addr overlaps */
|
||||
for_each_registered_fb(i) {
|
||||
struct apertures_struct *gen_aper;
|
||||
@ -58,7 +58,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1973,13 +1954,9 @@ EXPORT_SYMBOL(register_framebuffer);
|
||||
@@ -1975,13 +1956,9 @@ EXPORT_SYMBOL(register_framebuffer);
|
||||
void
|
||||
unregister_framebuffer(struct fb_info *fb_info)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user