Skip to content

Commit 4f7d8da

Browse files
committed
Merge tag 'drm-misc-next-2024-08-29' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.12: UAPI Changes: devfs: - support device numbers up to MINORBITS limit Core Changes: ci: - increase job timeout devfs: - use XArray for minor ids displayport: - mst: GUID improvements docs: - add fixes and cleanups panic: - optionally display QR code Driver Changes: amdgpu: - faster vblank disabling - GUID improvements gm12u320 - convert to struct drm_edid host1x: - fix syncpoint IRQ during resume - use iommu_paging_domain_alloc() imx: - ipuv3: convert to struct drm_edid omapdrm: - improve error handling panel: - add support for BOE TV101WUM-LL2 plus DT bindings - novatek-nt35950: improve error handling - nv3051d: improve error handling - panel-edp: add support for BOE NE140WUM-N6G; revert support for SDC ATNA45AF01 - visionox-vtdr6130: improve error handling; use devm_regulator_bulk_get_const() renesas: - rz-du: add support for RZ/G2UL plus DT bindings sti: - convert to struct drm_edid tegra: - gr3d: improve PM domain handling - convert to struct drm_edid Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents e55ef65 + 84addde commit 4f7d8da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2368
-876
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/boe,tv101wum-ll2.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: BOE TV101WUM-LL2 DSI Display Panel
8+
9+
maintainers:
10+
- Neil Armstrong <[email protected]>
11+
12+
allOf:
13+
- $ref: panel-common.yaml#
14+
15+
properties:
16+
compatible:
17+
const: boe,tv101wum-ll2
18+
19+
reg:
20+
maxItems: 1
21+
description: DSI virtual channel
22+
23+
backlight: true
24+
reset-gpios: true
25+
vsp-supply: true
26+
vsn-supply: true
27+
port: true
28+
rotation: true
29+
30+
required:
31+
- compatible
32+
- reg
33+
- reset-gpios
34+
- vsp-supply
35+
- vsn-supply
36+
- port
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
#include <dt-bindings/gpio/gpio.h>
43+
dsi {
44+
#address-cells = <1>;
45+
#size-cells = <0>;
46+
panel@0 {
47+
compatible = "boe,tv101wum-ll2";
48+
reg = <0>;
49+
50+
vsn-supply = <&vsn_lcd>;
51+
vsp-supply = <&vsp_lcd>;
52+
53+
reset-gpios = <&pio 45 GPIO_ACTIVE_LOW>;
54+
55+
port {
56+
panel_in: endpoint {
57+
remote-endpoint = <&dsi_out>;
58+
};
59+
};
60+
};
61+
};
62+
63+
...

Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
compatible:
1919
oneOf:
2020
- enum:
21+
- renesas,r9a07g043u-du # RZ/G2UL
2122
- renesas,r9a07g044-du # RZ/G2{L,LC}
2223
- items:
2324
- enum:
@@ -60,9 +61,6 @@ properties:
6061
$ref: /schemas/graph.yaml#/properties/port
6162
unevaluatedProperties: false
6263

63-
required:
64-
- port@0
65-
6664
unevaluatedProperties: false
6765

6866
renesas,vsps:
@@ -88,6 +86,34 @@ required:
8886

8987
additionalProperties: false
9088

89+
allOf:
90+
- if:
91+
properties:
92+
compatible:
93+
contains:
94+
const: renesas,r9a07g043u-du
95+
then:
96+
properties:
97+
ports:
98+
properties:
99+
port@0:
100+
description: DPI
101+
102+
required:
103+
- port@0
104+
else:
105+
properties:
106+
ports:
107+
properties:
108+
port@0:
109+
description: DSI
110+
port@1:
111+
description: DPI
112+
113+
required:
114+
- port@0
115+
- port@1
116+
91117
examples:
92118
# RZ/G2L DU
93119
- |

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7343,10 +7343,10 @@ F: drivers/gpu/drm/udl/
73437343

73447344
DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS)
73457345
M: Rodrigo Siqueira <[email protected]>
7346-
M: Melissa Wen <[email protected]>
73477346
M: Maíra Canal <[email protected]>
73487347
R: Haneen Mohammed <[email protected]>
73497348
R: Daniel Vetter <[email protected]>
7349+
R: Melissa Wen <[email protected]>
73507350
73517351
S: Maintained
73527352
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git

drivers/accel/drm_accel.c

Lines changed: 7 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <linux/debugfs.h>
1010
#include <linux/device.h>
11-
#include <linux/idr.h>
11+
#include <linux/xarray.h>
1212

1313
#include <drm/drm_accel.h>
1414
#include <drm/drm_auth.h>
@@ -18,8 +18,7 @@
1818
#include <drm/drm_ioctl.h>
1919
#include <drm/drm_print.h>
2020

21-
static DEFINE_SPINLOCK(accel_minor_lock);
22-
static struct idr accel_minors_idr;
21+
DEFINE_XARRAY_ALLOC(accel_minors_xa);
2322

2423
static struct dentry *accel_debugfs_root;
2524

@@ -117,99 +116,6 @@ void accel_set_device_instance_params(struct device *kdev, int index)
117116
kdev->type = &accel_sysfs_device_minor;
118117
}
119118

120-
/**
121-
* accel_minor_alloc() - Allocates a new accel minor
122-
*
123-
* This function access the accel minors idr and allocates from it
124-
* a new id to represent a new accel minor
125-
*
126-
* Return: A new id on success or error code in case idr_alloc failed
127-
*/
128-
int accel_minor_alloc(void)
129-
{
130-
unsigned long flags;
131-
int r;
132-
133-
spin_lock_irqsave(&accel_minor_lock, flags);
134-
r = idr_alloc(&accel_minors_idr, NULL, 0, ACCEL_MAX_MINORS, GFP_NOWAIT);
135-
spin_unlock_irqrestore(&accel_minor_lock, flags);
136-
137-
return r;
138-
}
139-
140-
/**
141-
* accel_minor_remove() - Remove an accel minor
142-
* @index: The minor id to remove.
143-
*
144-
* This function access the accel minors idr and removes from
145-
* it the member with the id that is passed to this function.
146-
*/
147-
void accel_minor_remove(int index)
148-
{
149-
unsigned long flags;
150-
151-
spin_lock_irqsave(&accel_minor_lock, flags);
152-
idr_remove(&accel_minors_idr, index);
153-
spin_unlock_irqrestore(&accel_minor_lock, flags);
154-
}
155-
156-
/**
157-
* accel_minor_replace() - Replace minor pointer in accel minors idr.
158-
* @minor: Pointer to the new minor.
159-
* @index: The minor id to replace.
160-
*
161-
* This function access the accel minors idr structure and replaces the pointer
162-
* that is associated with an existing id. Because the minor pointer can be
163-
* NULL, we need to explicitly pass the index.
164-
*
165-
* Return: 0 for success, negative value for error
166-
*/
167-
void accel_minor_replace(struct drm_minor *minor, int index)
168-
{
169-
unsigned long flags;
170-
171-
spin_lock_irqsave(&accel_minor_lock, flags);
172-
idr_replace(&accel_minors_idr, minor, index);
173-
spin_unlock_irqrestore(&accel_minor_lock, flags);
174-
}
175-
176-
/*
177-
* Looks up the given minor-ID and returns the respective DRM-minor object. The
178-
* refence-count of the underlying device is increased so you must release this
179-
* object with accel_minor_release().
180-
*
181-
* The object can be only a drm_minor that represents an accel device.
182-
*
183-
* As long as you hold this minor, it is guaranteed that the object and the
184-
* minor->dev pointer will stay valid! However, the device may get unplugged and
185-
* unregistered while you hold the minor.
186-
*/
187-
static struct drm_minor *accel_minor_acquire(unsigned int minor_id)
188-
{
189-
struct drm_minor *minor;
190-
unsigned long flags;
191-
192-
spin_lock_irqsave(&accel_minor_lock, flags);
193-
minor = idr_find(&accel_minors_idr, minor_id);
194-
if (minor)
195-
drm_dev_get(minor->dev);
196-
spin_unlock_irqrestore(&accel_minor_lock, flags);
197-
198-
if (!minor) {
199-
return ERR_PTR(-ENODEV);
200-
} else if (drm_dev_is_unplugged(minor->dev)) {
201-
drm_dev_put(minor->dev);
202-
return ERR_PTR(-ENODEV);
203-
}
204-
205-
return minor;
206-
}
207-
208-
static void accel_minor_release(struct drm_minor *minor)
209-
{
210-
drm_dev_put(minor->dev);
211-
}
212-
213119
/**
214120
* accel_open - open method for ACCEL file
215121
* @inode: device inode
@@ -227,7 +133,7 @@ int accel_open(struct inode *inode, struct file *filp)
227133
struct drm_minor *minor;
228134
int retcode;
229135

230-
minor = accel_minor_acquire(iminor(inode));
136+
minor = drm_minor_acquire(&accel_minors_xa, iminor(inode));
231137
if (IS_ERR(minor))
232138
return PTR_ERR(minor);
233139

@@ -246,7 +152,7 @@ int accel_open(struct inode *inode, struct file *filp)
246152

247153
err_undo:
248154
atomic_dec(&dev->open_count);
249-
accel_minor_release(minor);
155+
drm_minor_release(minor);
250156
return retcode;
251157
}
252158
EXPORT_SYMBOL_GPL(accel_open);
@@ -257,7 +163,7 @@ static int accel_stub_open(struct inode *inode, struct file *filp)
257163
struct drm_minor *minor;
258164
int err;
259165

260-
minor = accel_minor_acquire(iminor(inode));
166+
minor = drm_minor_acquire(&accel_minors_xa, iminor(inode));
261167
if (IS_ERR(minor))
262168
return PTR_ERR(minor);
263169

@@ -274,7 +180,7 @@ static int accel_stub_open(struct inode *inode, struct file *filp)
274180
err = 0;
275181

276182
out:
277-
accel_minor_release(minor);
183+
drm_minor_release(minor);
278184

279185
return err;
280186
}
@@ -290,15 +196,13 @@ void accel_core_exit(void)
290196
unregister_chrdev(ACCEL_MAJOR, "accel");
291197
debugfs_remove(accel_debugfs_root);
292198
accel_sysfs_destroy();
293-
idr_destroy(&accel_minors_idr);
199+
WARN_ON(!xa_empty(&accel_minors_xa));
294200
}
295201

296202
int __init accel_core_init(void)
297203
{
298204
int ret;
299205

300-
idr_init(&accel_minors_idr);
301-
302206
ret = accel_sysfs_init();
303207
if (ret < 0) {
304208
DRM_ERROR("Cannot create ACCEL class: %d\n", ret);

drivers/gpu/drm/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,37 @@ config DRM_PANIC_SCREEN
149149
or by writing to /sys/module/drm/parameters/panic_screen sysfs entry
150150
Default is "user"
151151

152+
config DRM_PANIC_SCREEN_QR_CODE
153+
bool "Add a panic screen with a QR code"
154+
depends on DRM_PANIC && RUST
155+
help
156+
This option adds a QR code generator, and a panic screen with a QR
157+
code. The QR code will contain the last lines of kmsg and other debug
158+
information. This should be easier for the user to report a kernel
159+
panic, with all debug information available.
160+
To use this panic screen, also set DRM_PANIC_SCREEN to "qr_code"
161+
162+
config DRM_PANIC_SCREEN_QR_CODE_URL
163+
string "Base URL of the QR code in the panic screen"
164+
depends on DRM_PANIC_SCREEN_QR_CODE
165+
help
166+
This option sets the base URL to report the kernel panic. If it's set
167+
the QR code will contain the URL and the kmsg compressed with zlib as
168+
a URL parameter. If it's empty, the QR code will contain the kmsg as
169+
uncompressed text only.
170+
There is a demo code in javascript, to decode and uncompress the kmsg
171+
data from the URL parameter at https://github.com/kdj0c/panic_report
172+
173+
config DRM_PANIC_SCREEN_QR_VERSION
174+
int "Maximum version (size) of the QR code."
175+
depends on DRM_PANIC_SCREEN_QR_CODE
176+
default 40
177+
help
178+
This option limits the version (or size) of the QR code. QR code
179+
version ranges from Version 1 (21x21) to Version 40 (177x177).
180+
Smaller QR code are easier to read, but will contain less debugging
181+
data. Default is 40.
182+
152183
config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
153184
bool "Enable refcount backtrace history in the DP MST helpers"
154185
depends on STACKTRACE_SUPPORT

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += \
8989
drm_privacy_screen_x86.o
9090
drm-$(CONFIG_DRM_ACCEL) += ../../accel/drm_accel.o
9191
drm-$(CONFIG_DRM_PANIC) += drm_panic.o
92+
drm-$(CONFIG_DRM_PANIC_SCREEN_QR_CODE) += drm_panic_qr.o
9293
obj-$(CONFIG_DRM) += drm.o
9394

9495
obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o

0 commit comments

Comments
 (0)