Skip to content

Commit 2e14928

Browse files
committed
Merge tag 'drm-misc-next-2023-06-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.5: UAPI Changes: Cross-subsystem Changes: * fbdev: * Add Kconfig options and initializer macros for file I/O, convert DRM fbdev emulation Core Changes: * Unify handling of struct file_operations.show_fdinfo * Use .probe in all i2c code (interface cleanup) * TTM: * Remove unused code Driver Changes: * amdgpu: * Use shared show_fdinfo code * Fix building without procfs * bridge: * display-conenctor: Add support for external power supply * samsung-dsim: Fix enabling; Support variable clocking * tc358767: Fixes * ti-sn65dsi83: Fix enabling * msm: * Use shared show_fdinfo code * msxfb: * Add support for i.MX93 LCDIF * panel: * Add support for Ampire AM-800480L1TMQW-T00H plus DT bindings * panel-edp: Convert .remove to return void * stm: * dsi: Use devm_ helper * ltdc: Fix potential invalid pointer deref Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230601112246.GA10882@linux-uq9g
2 parents 85d712f + 43049f1 commit 2e14928

Some content is hidden

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

82 files changed

+1206
-601
lines changed

Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ properties:
7070
samsung,burst-clock-frequency:
7171
$ref: /schemas/types.yaml#/definitions/uint32
7272
description:
73-
DSIM high speed burst mode frequency.
73+
DSIM high speed burst mode frequency. If absent,
74+
the pixel clock from the attached device or bridge
75+
will be used instead.
7476

7577
samsung,esc-clock-frequency:
7678
$ref: /schemas/types.yaml#/definitions/uint32
@@ -80,7 +82,8 @@ properties:
8082
samsung,pll-clock-frequency:
8183
$ref: /schemas/types.yaml#/definitions/uint32
8284
description:
83-
DSIM oscillator clock frequency.
85+
DSIM oscillator clock frequency. If absent, the clock frequency
86+
of sclk_mipi will be used instead.
8487

8588
phys:
8689
maxItems: 1
@@ -100,7 +103,8 @@ properties:
100103
specified.
101104

102105
port@1:
103-
$ref: /schemas/graph.yaml#/properties/port
106+
$ref: /schemas/graph.yaml#/$defs/port-base
107+
unevaluatedProperties: false
104108
description:
105109
DSI output port node to the panel or the next bridge
106110
in the chain.
@@ -134,9 +138,7 @@ required:
134138
- compatible
135139
- interrupts
136140
- reg
137-
- samsung,burst-clock-frequency
138141
- samsung,esc-clock-frequency
139-
- samsung,pll-clock-frequency
140142

141143
allOf:
142144
- $ref: ../dsi-controller.yaml#

Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ properties:
3636
description: GPIO signal to enable DDC bus
3737
maxItems: 1
3838

39+
hdmi-pwr-supply:
40+
description: Power supply for the HDMI +5V Power pin
41+
3942
port:
4043
$ref: /schemas/graph.yaml#/properties/port
4144
description: Connection to controller providing HDMI signals

Documentation/devicetree/bindings/display/fsl,lcdif.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- fsl,imx28-lcdif
2222
- fsl,imx6sx-lcdif
2323
- fsl,imx8mp-lcdif
24+
- fsl,imx93-lcdif
2425
- items:
2526
- enum:
2627
- fsl,imx6sl-lcdif
@@ -88,7 +89,9 @@ allOf:
8889
properties:
8990
compatible:
9091
contains:
91-
const: fsl,imx8mp-lcdif
92+
enum:
93+
- fsl,imx8mp-lcdif
94+
- fsl,imx93-lcdif
9295
then:
9396
properties:
9497
clocks:
@@ -107,6 +110,7 @@ allOf:
107110
enum:
108111
- fsl,imx6sx-lcdif
109112
- fsl,imx8mp-lcdif
113+
- fsl,imx93-lcdif
110114
then:
111115
properties:
112116
clocks:
@@ -123,6 +127,7 @@ allOf:
123127
- fsl,imx8mm-lcdif
124128
- fsl,imx8mn-lcdif
125129
- fsl,imx8mp-lcdif
130+
- fsl,imx93-lcdif
126131
then:
127132
required:
128133
- power-domains

Documentation/devicetree/bindings/display/panel/panel-simple.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ properties:
3333
- ampire,am-1280800n3tzqw-t00h
3434
# Ampire AM-480272H3TMQW-T01H 4.3" WQVGA TFT LCD panel
3535
- ampire,am-480272h3tmqw-t01h
36+
# Ampire AM-800480L1TMQW-T00H 5" WVGA TFT LCD panel
37+
- ampire,am-800480l1tmqw-t00h
3638
# Ampire AM-800480R3TMQW-A1H 7.0" WVGA TFT LCD panel
3739
- ampire,am800480r3tmqwa1h
3840
# Ampire AM-800600P5TMQW-TB8H 8.0" SVGA TFT LCD panel

Documentation/gpu/drm-usage-stats.rst

Lines changed: 65 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ File format specification
2424
- All keys shall be prefixed with `drm-`.
2525
- Whitespace between the delimiter and first non-whitespace character shall be
2626
ignored when parsing.
27-
- Neither keys or values are allowed to contain whitespace characters.
27+
- Keys are not allowed to contain whitespace characters.
2828
- Numerical key value pairs can end with optional unit string.
2929
- Data type of the value is fixed as defined in the specification.
3030

@@ -39,19 +39,23 @@ Data types
3939
----------
4040

4141
- <uint> - Unsigned integer without defining the maximum value.
42-
- <str> - String excluding any above defined reserved characters or whitespace.
42+
- <keystr> - String excluding any above defined reserved characters or whitespace.
43+
- <valstr> - String.
4344

4445
Mandatory fully standardised keys
4546
---------------------------------
4647

47-
- drm-driver: <str>
48+
- drm-driver: <valstr>
4849

4950
String shall contain the name this driver registered as via the respective
5051
`struct drm_driver` data structure.
5152

5253
Optional fully standardised keys
5354
--------------------------------
5455

56+
Identification
57+
^^^^^^^^^^^^^^
58+
5559
- drm-pdev: <aaaa:bb.cc.d>
5660

5761
For PCI devices this should contain the PCI slot address of the device in
@@ -69,10 +73,13 @@ scope of each device, in which case `drm-pdev` shall be present as well.
6973
Userspace should make sure to not double account any usage statistics by using
7074
the above described criteria in order to associate data to individual clients.
7175

72-
- drm-engine-<str>: <uint> ns
76+
Utilization
77+
^^^^^^^^^^^
78+
79+
- drm-engine-<keystr>: <uint> ns
7380

7481
GPUs usually contain multiple execution engines. Each shall be given a stable
75-
and unique name (str), with possible values documented in the driver specific
82+
and unique name (keystr), with possible values documented in the driver specific
7683
documentation.
7784

7885
Value shall be in specified time units which the respective GPU engine spent
@@ -84,31 +91,19 @@ larger value within a reasonable period. Upon observing a value lower than what
8491
was previously read, userspace is expected to stay with that larger previous
8592
value until a monotonic update is seen.
8693

87-
- drm-engine-capacity-<str>: <uint>
94+
- drm-engine-capacity-<keystr>: <uint>
8895

8996
Engine identifier string must be the same as the one specified in the
90-
drm-engine-<str> tag and shall contain a greater than zero number in case the
97+
drm-engine-<keystr> tag and shall contain a greater than zero number in case the
9198
exported engine corresponds to a group of identical hardware engines.
9299

93100
In the absence of this tag parser shall assume capacity of one. Zero capacity
94101
is not allowed.
95102

96-
- drm-memory-<str>: <uint> [KiB|MiB]
97-
98-
Each possible memory type which can be used to store buffer objects by the
99-
GPU in question shall be given a stable and unique name to be returned as the
100-
string here.
101-
102-
Value shall reflect the amount of storage currently consumed by the buffer
103-
object belong to this client, in the respective memory region.
104-
105-
Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB'
106-
indicating kibi- or mebi-bytes.
107-
108-
- drm-cycles-<str> <uint>
103+
- drm-cycles-<keystr>: <uint>
109104

110105
Engine identifier string must be the same as the one specified in the
111-
drm-engine-<str> tag and shall contain the number of busy cycles for the given
106+
drm-engine-<keystr> tag and shall contain the number of busy cycles for the given
112107
engine.
113108

114109
Values are not required to be constantly monotonic if it makes the driver
@@ -117,16 +112,60 @@ larger value within a reasonable period. Upon observing a value lower than what
117112
was previously read, userspace is expected to stay with that larger previous
118113
value until a monotonic update is seen.
119114

120-
- drm-maxfreq-<str> <uint> [Hz|MHz|KHz]
115+
- drm-maxfreq-<keystr>: <uint> [Hz|MHz|KHz]
121116

122117
Engine identifier string must be the same as the one specified in the
123-
drm-engine-<str> tag and shall contain the maximum frequency for the given
124-
engine. Taken together with drm-cycles-<str>, this can be used to calculate
125-
percentage utilization of the engine, whereas drm-engine-<str> only reflects
118+
drm-engine-<keystr> tag and shall contain the maximum frequency for the given
119+
engine. Taken together with drm-cycles-<keystr>, this can be used to calculate
120+
percentage utilization of the engine, whereas drm-engine-<keystr> only reflects
126121
time active without considering what frequency the engine is operating as a
127122
percentage of it's maximum frequency.
128123

124+
Memory
125+
^^^^^^
126+
127+
- drm-memory-<region>: <uint> [KiB|MiB]
128+
129+
Each possible memory type which can be used to store buffer objects by the
130+
GPU in question shall be given a stable and unique name to be returned as the
131+
string here. The name "memory" is reserved to refer to normal system memory.
132+
133+
Value shall reflect the amount of storage currently consumed by the buffer
134+
objects belong to this client, in the respective memory region.
135+
136+
Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB'
137+
indicating kibi- or mebi-bytes.
138+
139+
- drm-shared-<region>: <uint> [KiB|MiB]
140+
141+
The total size of buffers that are shared with another file (ie. have more
142+
than a single handle).
143+
144+
- drm-total-<region>: <uint> [KiB|MiB]
145+
146+
The total size of buffers that including shared and private memory.
147+
148+
- drm-resident-<region>: <uint> [KiB|MiB]
149+
150+
The total size of buffers that are resident in the specified region.
151+
152+
- drm-purgeable-<region>: <uint> [KiB|MiB]
153+
154+
The total size of buffers that are purgeable.
155+
156+
- drm-active-<region>: <uint> [KiB|MiB]
157+
158+
The total size of buffers that are active on one or more engines.
159+
160+
Implementation Details
161+
======================
162+
163+
Drivers should use drm_show_fdinfo() in their `struct file_operations`, and
164+
implement &drm_driver.show_fdinfo if they wish to provide any stats which
165+
are not provided by drm_show_fdinfo(). But even driver specific stats should
166+
be documented above and where possible, aligned with other drivers.
167+
129168
Driver specific implementations
130-
===============================
169+
-------------------------------
131170

132171
:ref:`i915-usage-stats`

drivers/gpu/drm/Kconfig

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ config DRM_KUNIT_TEST
9595
config DRM_KMS_HELPER
9696
tristate
9797
depends on DRM
98+
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
9899
help
99100
CRTC helpers for KMS drivers.
100101

@@ -132,14 +133,6 @@ config DRM_FBDEV_EMULATION
132133
bool "Enable legacy fbdev support for your modesetting driver"
133134
depends on DRM_KMS_HELPER
134135
depends on FB=y || FB=DRM_KMS_HELPER
135-
select FB_CFB_FILLRECT
136-
select FB_CFB_COPYAREA
137-
select FB_CFB_IMAGEBLIT
138-
select FB_DEFERRED_IO
139-
select FB_SYS_FOPS
140-
select FB_SYS_FILLRECT
141-
select FB_SYS_COPYAREA
142-
select FB_SYS_IMAGEBLIT
143136
select FRAMEBUFFER_CONSOLE if !EXPERT
144137
select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
145138
default y
@@ -223,6 +216,7 @@ config DRM_TTM_HELPER
223216
config DRM_GEM_DMA_HELPER
224217
tristate
225218
depends on DRM
219+
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
226220
help
227221
Choose this if you need the GEM DMA helper functions
228222

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,7 @@ static const struct file_operations amdgpu_driver_kms_fops = {
27472747
.compat_ioctl = amdgpu_kms_compat_ioctl,
27482748
#endif
27492749
#ifdef CONFIG_PROC_FS
2750-
.show_fdinfo = amdgpu_show_fdinfo
2750+
.show_fdinfo = drm_show_fdinfo,
27512751
#endif
27522752
};
27532753

@@ -2802,6 +2802,9 @@ static const struct drm_driver amdgpu_kms_driver = {
28022802
.dumb_map_offset = amdgpu_mode_dumb_mmap,
28032803
.fops = &amdgpu_driver_kms_fops,
28042804
.release = &amdgpu_driver_release_kms,
2805+
#ifdef CONFIG_PROC_FS
2806+
.show_fdinfo = amdgpu_show_fdinfo,
2807+
#endif
28052808

28062809
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
28072810
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,

drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ static const char *amdgpu_ip_name[AMDGPU_HW_IP_NUM] = {
5353
[AMDGPU_HW_IP_VCN_JPEG] = "jpeg",
5454
};
5555

56-
void amdgpu_show_fdinfo(struct seq_file *m, struct file *f)
56+
void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
5757
{
58-
struct drm_file *file = f->private_data;
5958
struct amdgpu_device *adev = drm_to_adev(file->minor->dev);
6059
struct amdgpu_fpriv *fpriv = file->driver_priv;
6160
struct amdgpu_vm *vm = &fpriv->vm;
@@ -87,31 +86,30 @@ void amdgpu_show_fdinfo(struct seq_file *m, struct file *f)
8786
* ******************************************************************
8887
*/
8988

90-
seq_printf(m, "pasid:\t%u\n", fpriv->vm.pasid);
91-
seq_printf(m, "drm-driver:\t%s\n", file->minor->dev->driver->name);
92-
seq_printf(m, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn);
93-
seq_printf(m, "drm-client-id:\t%Lu\n", vm->immediate.fence_context);
94-
seq_printf(m, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL);
95-
seq_printf(m, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL);
96-
seq_printf(m, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL);
97-
seq_printf(m, "amd-memory-visible-vram:\t%llu KiB\n",
89+
drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid);
90+
drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name);
91+
drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn);
92+
drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context);
93+
drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL);
94+
drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL);
95+
drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL);
96+
drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n",
9897
stats.visible_vram/1024UL);
99-
seq_printf(m, "amd-evicted-vram:\t%llu KiB\n",
98+
drm_printf(p, "amd-evicted-vram:\t%llu KiB\n",
10099
stats.evicted_vram/1024UL);
101-
seq_printf(m, "amd-evicted-visible-vram:\t%llu KiB\n",
100+
drm_printf(p, "amd-evicted-visible-vram:\t%llu KiB\n",
102101
stats.evicted_visible_vram/1024UL);
103-
seq_printf(m, "amd-requested-vram:\t%llu KiB\n",
102+
drm_printf(p, "amd-requested-vram:\t%llu KiB\n",
104103
stats.requested_vram/1024UL);
105-
seq_printf(m, "amd-requested-visible-vram:\t%llu KiB\n",
104+
drm_printf(p, "amd-requested-visible-vram:\t%llu KiB\n",
106105
stats.requested_visible_vram/1024UL);
107-
seq_printf(m, "amd-requested-gtt:\t%llu KiB\n",
106+
drm_printf(p, "amd-requested-gtt:\t%llu KiB\n",
108107
stats.requested_gtt/1024UL);
109-
110108
for (hw_ip = 0; hw_ip < AMDGPU_HW_IP_NUM; ++hw_ip) {
111109
if (!usage[hw_ip])
112110
continue;
113111

114-
seq_printf(m, "drm-engine-%s:\t%Ld ns\n", amdgpu_ip_name[hw_ip],
112+
drm_printf(p, "drm-engine-%s:\t%Ld ns\n", amdgpu_ip_name[hw_ip],
115113
ktime_to_ns(usage[hw_ip]));
116114
}
117115
}

drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
#include "amdgpu_ids.h"
3838

3939
uint32_t amdgpu_get_ip_count(struct amdgpu_device *adev, int id);
40-
void amdgpu_show_fdinfo(struct seq_file *m, struct file *f);
40+
void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file);
4141

4242
#endif

drivers/gpu/drm/armada/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ config DRM_ARMADA
33
tristate "DRM support for Marvell Armada SoCs"
44
depends on DRM && HAVE_CLK && ARM && MMU
55
select DRM_KMS_HELPER
6+
select FB_IO_HELPERS if DRM_FBDEV_EMULATION
67
help
78
Support the "LCD" controllers found on the Marvell Armada 510
89
devices. There are two controllers on the device, each controller

0 commit comments

Comments
 (0)