Skip to content

Commit 51c3b91

Browse files
committed
Merge tag 'drm-misc-next-2021-03-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.13: UAPI Changes: Cross-subsystem Changes: Core Changes: - %p4cc printk format modifier - atomic: introduce drm_crtc_commit_wait, rework atomic plane state helpers to take the drm_commit_state structure - dma-buf: heaps rework to return a struct dma_buf - simple-kms: Add plate state helpers - ttm: debugfs support, removal of sysfs Driver Changes: - Convert drivers to shadow plane helpers - arc: Move to drm/tiny - ast: cursor plane reworks - gma500: Remove TTM and medfield support - mxsfb: imx8mm support - panfrost: MMU IRQ handling rework - qxl: rework to better handle resources deallocation, locking - sun4i: Add alpha properties for UI and VI layers - vc4: RPi4 CEC support - vmwgfx: doc cleanup Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20210303100600.dgnkadonzuvfnu22@gilmour
2 parents 1e28eed + 762949b commit 51c3b91

File tree

286 files changed

+5431
-4790
lines changed

Some content is hidden

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

286 files changed

+5431
-4790
lines changed

Documentation/core-api/printk-formats.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,24 @@ For printing netdev_features_t.
567567

568568
Passed by reference.
569569

570+
V4L2 and DRM FourCC code (pixel format)
571+
---------------------------------------
572+
573+
::
574+
575+
%p4cc
576+
577+
Print a FourCC code used by V4L2 or DRM, including format endianness and
578+
its numerical value as hexadecimal.
579+
580+
Passed by reference.
581+
582+
Examples::
583+
584+
%p4cc BG12 little-endian (0x32314742)
585+
%p4cc Y10 little-endian (0x20303159)
586+
%p4cc NV12 big-endian (0xb231564e)
587+
570588
Thanks
571589
======
572590

Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ required:
109109
- resets
110110
- ddc
111111

112-
additionalProperties: false
112+
unevaluatedProperties: false
113113

114114
examples:
115115
- |
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale/NXP i.MX LCD Interface (LCDIF)
8+
9+
maintainers:
10+
- Marek Vasut <[email protected]>
11+
- Stefan Agner <[email protected]>
12+
13+
description: |
14+
(e)LCDIF display controller found in the Freescale/NXP i.MX SoCs.
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- enum:
20+
- fsl,imx23-lcdif
21+
- fsl,imx28-lcdif
22+
- fsl,imx6sx-lcdif
23+
- items:
24+
- enum:
25+
- fsl,imx6sl-lcdif
26+
- fsl,imx6sll-lcdif
27+
- fsl,imx6ul-lcdif
28+
- fsl,imx7d-lcdif
29+
- fsl,imx8mm-lcdif
30+
- fsl,imx8mq-lcdif
31+
- const: fsl,imx6sx-lcdif
32+
33+
reg:
34+
maxItems: 1
35+
36+
clocks:
37+
items:
38+
- description: Pixel clock
39+
- description: Bus clock
40+
- description: Display AXI clock
41+
minItems: 1
42+
43+
clock-names:
44+
items:
45+
- const: pix
46+
- const: axi
47+
- const: disp_axi
48+
minItems: 1
49+
50+
interrupts:
51+
maxItems: 1
52+
53+
port:
54+
$ref: /schemas/graph.yaml#/properties/port
55+
description: The LCDIF output port
56+
57+
required:
58+
- compatible
59+
- reg
60+
- clocks
61+
- interrupts
62+
- port
63+
64+
additionalProperties: false
65+
66+
allOf:
67+
- if:
68+
properties:
69+
compatible:
70+
contains:
71+
const: fsl,imx6sx-lcdif
72+
then:
73+
properties:
74+
clocks:
75+
minItems: 2
76+
maxItems: 3
77+
clock-names:
78+
minItems: 2
79+
maxItems: 3
80+
required:
81+
- clock-names
82+
else:
83+
properties:
84+
clocks:
85+
maxItems: 1
86+
clock-names:
87+
maxItems: 1
88+
89+
examples:
90+
- |
91+
#include <dt-bindings/clock/imx6sx-clock.h>
92+
#include <dt-bindings/interrupt-controller/arm-gic.h>
93+
94+
display-controller@2220000 {
95+
compatible = "fsl,imx6sx-lcdif";
96+
reg = <0x02220000 0x4000>;
97+
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
98+
clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
99+
<&clks IMX6SX_CLK_LCDIF_APB>,
100+
<&clks IMX6SX_CLK_DISPLAY_AXI>;
101+
clock-names = "pix", "axi", "disp_axi";
102+
103+
port {
104+
endpoint {
105+
remote-endpoint = <&panel_in>;
106+
};
107+
};
108+
};
109+
110+
...

Documentation/devicetree/bindings/display/mxsfb.txt

Lines changed: 0 additions & 87 deletions
This file was deleted.

Documentation/gpu/drm-kms-helpers.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ Atomic State Helper Reference
8080
.. kernel-doc:: drivers/gpu/drm/drm_atomic_state_helper.c
8181
:export:
8282

83+
GEM Atomic Helper Reference
84+
---------------------------
85+
86+
.. kernel-doc:: drivers/gpu/drm/drm_gem_atomic_helper.c
87+
:doc: overview
88+
89+
.. kernel-doc:: include/drm/drm_gem_atomic_helper.h
90+
:internal:
91+
92+
.. kernel-doc:: drivers/gpu/drm/drm_gem_atomic_helper.c
93+
:export:
94+
8395
Simple KMS Helper Reference
8496
===========================
8597

Documentation/gpu/todo.rst

Lines changed: 15 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -459,52 +459,6 @@ Contact: Emil Velikov, respective driver maintainers
459459

460460
Level: Intermediate
461461

462-
Plumb drm_atomic_state all over
463-
-------------------------------
464-
465-
Currently various atomic functions take just a single or a handful of
466-
object states (eg. plane state). While that single object state can
467-
suffice for some simple cases, we often have to dig out additional
468-
object states for dealing with various dependencies between the individual
469-
objects or the hardware they represent. The process of digging out the
470-
additional states is rather non-intuitive and error prone.
471-
472-
To fix that most functions should rather take the overall
473-
drm_atomic_state as one of their parameters. The other parameters
474-
would generally be the object(s) we mainly want to interact with.
475-
476-
For example, instead of
477-
478-
.. code-block:: c
479-
480-
int (*atomic_check)(struct drm_plane *plane, struct drm_plane_state *state);
481-
482-
we would have something like
483-
484-
.. code-block:: c
485-
486-
int (*atomic_check)(struct drm_plane *plane, struct drm_atomic_state *state);
487-
488-
The implementation can then trivially gain access to any required object
489-
state(s) via drm_atomic_get_plane_state(), drm_atomic_get_new_plane_state(),
490-
drm_atomic_get_old_plane_state(), and their equivalents for
491-
other object types.
492-
493-
Additionally many drivers currently access the object->state pointer
494-
directly in their commit functions. That is not going to work if we
495-
eg. want to allow deeper commit pipelines as those pointers could
496-
then point to the states corresponding to a future commit instead of
497-
the current commit we're trying to process. Also non-blocking commits
498-
execute locklessly so there are serious concerns with dereferencing
499-
the object->state pointers without holding the locks that protect them.
500-
Use of drm_atomic_get_new_plane_state(), drm_atomic_get_old_plane_state(),
501-
etc. avoids these problems as well since they relate to a specific
502-
commit via the passed in drm_atomic_state.
503-
504-
Contact: Ville Syrjälä, Daniel Vetter
505-
506-
Level: Intermediate
507-
508462
Use struct dma_buf_map throughout codebase
509463
------------------------------------------
510464

@@ -596,20 +550,24 @@ Contact: Daniel Vetter
596550

597551
Level: Intermediate
598552

599-
KMS cleanups
600-
------------
553+
Object lifetime fixes
554+
---------------------
555+
556+
There's two related issues here
557+
558+
- Cleanup up the various ->destroy callbacks, which often are all the same
559+
simple code.
601560

602-
Some of these date from the very introduction of KMS in 2008 ...
561+
- Lots of drivers erroneously allocate DRM modeset objects using devm_kzalloc,
562+
which results in use-after free issues on driver unload. This can be serious
563+
trouble even for drivers for hardware integrated on the SoC due to
564+
EPROBE_DEFERRED backoff.
603565

604-
- Make ->funcs and ->helper_private vtables optional. There's a bunch of empty
605-
function tables in drivers, but before we can remove them we need to make sure
606-
that all the users in helpers and drivers do correctly check for a NULL
607-
vtable.
566+
Both these problems can be solved by switching over to drmm_kzalloc(), and the
567+
various convenience wrappers provided, e.g. drmm_crtc_alloc_with_planes(),
568+
drmm_universal_plane_alloc(), ... and so on.
608569

609-
- Cleanup up the various ->destroy callbacks. A lot of them just wrapt the
610-
drm_*_cleanup implementations and can be removed. Some tack a kfree() at the
611-
end, for which we could add drm_*_cleanup_kfree(). And then there's the (for
612-
historical reasons) misnamed drm_primary_helper_destroy() function.
570+
Contact: Daniel Vetter
613571

614572
Level: Intermediate
615573

@@ -666,8 +624,6 @@ See the documentation of :ref:`VKMS <vkms>` for more details. This is an ideal
666624
internship task, since it only requires a virtual machine and can be sized to
667625
fit the available time.
668626

669-
Contact: Daniel Vetter
670-
671627
Level: See details
672628

673629
Backlight Refactoring

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ ARC PGU DRM DRIVER
13231323
M: Alexey Brodkin <[email protected]>
13241324
S: Supported
13251325
F: Documentation/devicetree/bindings/display/snps,arcpgu.txt
1326-
F: drivers/gpu/drm/arc/
1326+
F: drivers/gpu/drm/tiny/arcpgu.c
13271327

13281328
ARCNET NETWORK LAYER
13291329
M: Michael Grzeschik <[email protected]>
@@ -12267,7 +12267,7 @@ M: Stefan Agner <[email protected]>
1226712267
1226812268
S: Supported
1226912269
T: git git://anongit.freedesktop.org/drm/drm-misc
12270-
F: Documentation/devicetree/bindings/display/mxsfb.txt
12270+
F: Documentation/devicetree/bindings/display/fsl,lcdif.yaml
1227112271
F: drivers/gpu/drm/mxsfb/
1227212272

1227312273
MYLEX DAC960 PCI RAID Controller

drivers/dma-buf/dma-heap.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@ void *dma_heap_get_drvdata(struct dma_heap *heap)
202202
return heap->priv;
203203
}
204204

205+
/**
206+
* dma_heap_get_name() - get heap name
207+
* @heap: DMA-Heap to retrieve private data for
208+
*
209+
* Returns:
210+
* The char* for the heap name.
211+
*/
212+
const char *dma_heap_get_name(struct dma_heap *heap)
213+
{
214+
return heap->name;
215+
}
216+
205217
struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info)
206218
{
207219
struct dma_heap *heap, *h, *err_ret;

drivers/dma-buf/heaps/cma_heap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ static struct dma_buf *cma_heap_allocate(struct dma_heap *heap,
339339
buffer->pagecount = pagecount;
340340

341341
/* create the dmabuf */
342+
exp_info.exp_name = dma_heap_get_name(heap);
342343
exp_info.ops = &cma_heap_buf_ops;
343344
exp_info.size = buffer->len;
344345
exp_info.flags = fd_flags;

0 commit comments

Comments
 (0)