Skip to content

Commit 33a8617

Browse files
committed
Merge tag 'drm-misc-next-2023-05-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 6.5: UAPI Changes: Cross-subsystem Changes: - arch: Consolidate <asm/fb.h> Core Changes: - aperture: Ignore firmware framebuffers with non-primary devices - fbdev: Use fbdev's I/O helpers - sysfs: Expose DRM connector ID - tests: More tests for drm_rect Driver Changes: - armada: Implement fbdev emulation as a client - bridge: - fsl-ldb: Support i.MX6SX - lt9211: Remove blanking packets - lt9611: Remove blanking packets - tc358768: Implement input bus formats reporting, fix various timings and clocks settings - ti-sn65dsi86: Implement wait_hpd_asserted - nouveau: Improve NULL pointer checks before dereference - panel: - nt36523: Support Lenovo J606F - st7703: Support Anbernic RG353V-V2 - new panels: InnoLux G070ACE-L01 - sun4i: Fix MIPI-DSI dotclock - vc4: RGB Range toggle property, BT601 and BT2020 support for HDMI - vkms: Convert to drmm helpers, Add reflection and rotation support Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/2pxmxdzsk2ekjy6xvbpj67zrhtwvkkhfspuvdm5pfm5i54hed6@sooct7yq6z4w
2 parents f1fcbaa + 4795c78 commit 33a8617

File tree

144 files changed

+2755
-1158
lines changed

Some content is hidden

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

144 files changed

+2755
-1158
lines changed

Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ description: |
1717
properties:
1818
compatible:
1919
enum:
20+
- fsl,imx6sx-ldb
2021
- fsl,imx8mp-ldb
2122
- fsl,imx93-ldb
2223

@@ -64,7 +65,9 @@ allOf:
6465
properties:
6566
compatible:
6667
contains:
67-
const: fsl,imx93-ldb
68+
enum:
69+
- fsl,imx6sx-ldb
70+
- fsl,imx93-ldb
6871
then:
6972
properties:
7073
ports:

Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ allOf:
1919

2020
properties:
2121
compatible:
22-
items:
23-
- enum:
24-
- xiaomi,elish-boe-nt36523
25-
- xiaomi,elish-csot-nt36523
26-
- const: novatek,nt36523
22+
oneOf:
23+
- items:
24+
- enum:
25+
- xiaomi,elish-boe-nt36523
26+
- xiaomi,elish-csot-nt36523
27+
- const: novatek,nt36523
28+
- items:
29+
- enum:
30+
- lenovo,j606f-boe-nt36523w
31+
- const: novatek,nt36523w
2732

2833
reset-gpios:
2934
maxItems: 1
@@ -34,6 +39,7 @@ properties:
3439

3540
reg: true
3641
ports: true
42+
rotation: true
3743
backlight: true
3844

3945
required:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ properties:
174174
- innolux,at043tn24
175175
# Innolux AT070TN92 7.0" WQVGA TFT LCD panel
176176
- innolux,at070tn92
177+
# Innolux G070ACE-L01 7" WVGA (800x480) TFT LCD panel
178+
- innolux,g070ace-l01
177179
# Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD panel
178180
- innolux,g070y2-l01
179181
# Innolux G070Y2-T02 7" WVGA (800x480) TFT LCD TTL panel

Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ allOf:
2020
properties:
2121
compatible:
2222
enum:
23+
# Anberic RG353V-V2 5.0" 640x480 TFT LCD panel
24+
- anbernic,rg353v-panel-v2
2325
# Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
2426
- rocktech,jh057n00900
2527
# Xingbangda XBD599 5.99" 720x1440 TFT LCD panel

Documentation/gpu/rfc/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ host such documentation:
3131
.. toctree::
3232

3333
i915_vm_bind.rst
34+
35+
.. toctree::
36+
37+
xe.rst

Documentation/gpu/rfc/xe.rst

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
==========================
2+
Xe – Merge Acceptance Plan
3+
==========================
4+
Xe is a new driver for Intel GPUs that supports both integrated and
5+
discrete platforms starting with Tiger Lake (first Intel Xe Architecture).
6+
7+
This document aims to establish a merge plan for the Xe, by writing down clear
8+
pre-merge goals, in order to avoid unnecessary delays.
9+
10+
Xe – Overview
11+
=============
12+
The main motivation of Xe is to have a fresh base to work from that is
13+
unencumbered by older platforms, whilst also taking the opportunity to
14+
rearchitect our driver to increase sharing across the drm subsystem, both
15+
leveraging and allowing us to contribute more towards other shared components
16+
like TTM and drm/scheduler.
17+
18+
This is also an opportunity to start from the beginning with a clean uAPI that is
19+
extensible by design and already aligned with the modern userspace needs. For
20+
this reason, the memory model is solely based on GPU Virtual Address space
21+
bind/unbind (‘VM_BIND’) of GEM buffer objects (BOs) and execution only supporting
22+
explicit synchronization. With persistent mapping across the execution, the
23+
userspace does not need to provide a list of all required mappings during each
24+
submission.
25+
26+
The new driver leverages a lot from i915. As for display, the intent is to share
27+
the display code with the i915 driver so that there is maximum reuse there.
28+
29+
As for the power management area, the goal is to have a much-simplified support
30+
for the system suspend states (S-states), PCI device suspend states (D-states),
31+
GPU/Render suspend states (R-states) and frequency management. It should leverage
32+
as much as possible all the existent PCI-subsystem infrastructure (pm and
33+
runtime_pm) and underlying firmware components such PCODE and GuC for the power
34+
states and frequency decisions.
35+
36+
Repository:
37+
38+
https://gitlab.freedesktop.org/drm/xe/kernel (branch drm-xe-next)
39+
40+
Xe – Platforms
41+
==============
42+
Currently, Xe is already functional and has experimental support for multiple
43+
platforms starting from Tiger Lake, with initial support in userspace implemented
44+
in Mesa (for Iris and Anv, our OpenGL and Vulkan drivers), as well as in NEO
45+
(for OpenCL and Level0).
46+
47+
During a transition period, platforms will be supported by both Xe and i915.
48+
However, the force_probe mechanism existent in both drivers will allow only one
49+
official and by-default probe at a given time.
50+
51+
For instance, in order to probe a DG2 which PCI ID is 0x5690 by Xe instead of
52+
i915, the following set of parameters need to be used:
53+
54+
```
55+
i915.force_probe=!5690 xe.force_probe=5690
56+
```
57+
58+
In both drivers, the ‘.require_force_probe’ protection forces the user to use the
59+
force_probe parameter while the driver is under development. This protection is
60+
only removed when the support for the platform and the uAPI are stable. Stability
61+
which needs to be demonstrated by CI results.
62+
63+
In order to avoid user space regressions, i915 will continue to support all the
64+
current platforms that are already out of this protection. Xe support will be
65+
forever experimental and dependent on the usage of force_probe for these
66+
platforms.
67+
68+
When the time comes for Xe, the protection will be lifted on Xe and kept in i915.
69+
70+
Xe driver will be protected with both STAGING Kconfig and force_probe. Changes in
71+
the uAPI are expected while the driver is behind these protections. STAGING will
72+
be removed when the driver uAPI gets to a mature state where we can guarantee the
73+
‘no regression’ rule. Then force_probe will be lifted only for future platforms
74+
that will be productized with Xe driver, but not with i915.
75+
76+
Xe – Pre-Merge Goals
77+
====================
78+
79+
Drm_scheduler
80+
-------------
81+
Xe primarily uses Firmware based scheduling (GuC FW). However, it will use
82+
drm_scheduler as the scheduler ‘frontend’ for userspace submission in order to
83+
resolve syncobj and dma-buf implicit sync dependencies. However, drm_scheduler is
84+
not yet prepared to handle the 1-to-1 relationship between drm_gpu_scheduler and
85+
drm_sched_entity.
86+
87+
Deeper changes to drm_scheduler should *not* be required to get Xe accepted, but
88+
some consensus needs to be reached between Xe and other community drivers that
89+
could also benefit from this work, for coupling FW based/assisted submission such
90+
as the ARM’s new Mali GPU driver, and others.
91+
92+
As a key measurable result, the patch series introducing Xe itself shall not
93+
depend on any other patch touching drm_scheduler itself that was not yet merged
94+
through drm-misc. This, by itself, already includes the reach of an agreement for
95+
uniform 1 to 1 relationship implementation / usage across drivers.
96+
97+
GPU VA
98+
------
99+
Two main goals of Xe are meeting together here:
100+
101+
1) Have an uAPI that aligns with modern UMD needs.
102+
103+
2) Early upstream engagement.
104+
105+
RedHat engineers working on Nouveau proposed a new DRM feature to handle keeping
106+
track of GPU virtual address mappings. This is still not merged upstream, but
107+
this aligns very well with our goals and with our VM_BIND. The engagement with
108+
upstream and the port of Xe towards GPUVA is already ongoing.
109+
110+
As a key measurable result, Xe needs to be aligned with the GPU VA and working in
111+
our tree. Missing Nouveau patches should *not* block Xe and any needed GPUVA
112+
related patch should be independent and present on dri-devel or acked by
113+
maintainers to go along with the first Xe pull request towards drm-next.
114+
115+
DRM_VM_BIND
116+
-----------
117+
Nouveau, and Xe are all implementing ‘VM_BIND’ and new ‘Exec’ uAPIs in order to
118+
fulfill the needs of the modern uAPI. Xe merge should *not* be blocked on the
119+
development of a common new drm_infrastructure. However, the Xe team needs to
120+
engage with the community to explore the options of a common API.
121+
122+
As a key measurable result, the DRM_VM_BIND needs to be documented in this file
123+
below, or this entire block deleted if the consensus is for independent drivers
124+
vm_bind ioctls.
125+
126+
Although having a common DRM level IOCTL for VM_BIND is not a requirement to get
127+
Xe merged, it is mandatory to enforce the overall locking scheme for all major
128+
structs and list (so vm and vma). So, a consensus is needed, and possibly some
129+
common helpers. If helpers are needed, they should be also documented in this
130+
document.
131+
132+
ASYNC VM_BIND
133+
-------------
134+
Although having a common DRM level IOCTL for VM_BIND is not a requirement to get
135+
Xe merged, it is mandatory to have a consensus with other drivers and Mesa.
136+
It needs to be clear how to handle async VM_BIND and interactions with userspace
137+
memory fences. Ideally with helper support so people don't get it wrong in all
138+
possible ways.
139+
140+
As a key measurable result, the benefits of ASYNC VM_BIND and a discussion of
141+
various flavors, error handling and a sample API should be documented here or in
142+
a separate document pointed to by this document.
143+
144+
Userptr integration and vm_bind
145+
-------------------------------
146+
Different drivers implement different ways of dealing with execution of userptr.
147+
With multiple drivers currently introducing support to VM_BIND, the goal is to
148+
aim for a DRM consensus on what’s the best way to have that support. To some
149+
extent this is already getting addressed itself with the GPUVA where likely the
150+
userptr will be a GPUVA with a NULL GEM call VM bind directly on the userptr.
151+
However, there are more aspects around the rules for that and the usage of
152+
mmu_notifiers, locking and other aspects.
153+
154+
This task here has the goal of introducing a documentation of the basic rules.
155+
156+
The documentation *needs* to first live in this document (API session below) and
157+
then moved to another more specific document or at Xe level or at DRM level.
158+
159+
Documentation should include:
160+
161+
* The userptr part of the VM_BIND api.
162+
163+
* Locking, including the page-faulting case.
164+
165+
* O(1) complexity under VM_BIND.
166+
167+
Some parts of userptr like mmu_notifiers should become GPUVA or DRM helpers when
168+
the second driver supporting VM_BIND+userptr appears. Details to be defined when
169+
the time comes.
170+
171+
Long running compute: minimal data structure/scaffolding
172+
--------------------------------------------------------
173+
The generic scheduler code needs to include the handling of endless compute
174+
contexts, with the minimal scaffolding for preempt-ctx fences (probably on the
175+
drm_sched_entity) and making sure drm_scheduler can cope with the lack of job
176+
completion fence.
177+
178+
The goal is to achieve a consensus ahead of Xe initial pull-request, ideally with
179+
this minimal drm/scheduler work, if needed, merged to drm-misc in a way that any
180+
drm driver, including Xe, could re-use and add their own individual needs on top
181+
in a next stage. However, this should not block the initial merge.
182+
183+
This is a non-blocker item since the driver without the support for the long
184+
running compute enabled is not a showstopper.
185+
186+
Display integration with i915
187+
-----------------------------
188+
In order to share the display code with the i915 driver so that there is maximum
189+
reuse, the i915/display/ code is built twice, once for i915.ko and then for
190+
xe.ko. Currently, the i915/display code in Xe tree is polluted with many 'ifdefs'
191+
depending on the build target. The goal is to refactor both Xe and i915/display
192+
code simultaneously in order to get a clean result before they land upstream, so
193+
that display can already be part of the initial pull request towards drm-next.
194+
195+
However, display code should not gate the acceptance of Xe in upstream. Xe
196+
patches will be refactored in a way that display code can be removed, if needed,
197+
from the first pull request of Xe towards drm-next. The expectation is that when
198+
both drivers are part of the drm-tip, the introduction of cleaner patches will be
199+
easier and speed up.
200+
201+
Drm_exec
202+
--------
203+
Helper to make dma_resv locking for a big number of buffers is getting removed in
204+
the drm_exec series proposed in https://patchwork.freedesktop.org/patch/524376/
205+
If that happens, Xe needs to change and incorporate the changes in the driver.
206+
The goal is to engage with the Community to understand if the best approach is to
207+
move that to the drivers that are using it or if we should keep the helpers in
208+
place waiting for Xe to get merged.
209+
210+
This item ties into the GPUVA, VM_BIND, and even long-running compute support.
211+
212+
As a key measurable result, we need to have a community consensus documented in
213+
this document and the Xe driver prepared for the changes, if necessary.
214+
215+
Dev_coredump
216+
------------
217+
218+
Xe needs to align with other drivers on the way that the error states are
219+
dumped, avoiding a Xe only error_state solution. The goal is to use devcoredump
220+
infrastructure to report error states, since it produces a standardized way
221+
by exposing a virtual and temporary /sys/class/devcoredump device.
222+
223+
As the key measurable result, Xe driver needs to provide GPU snapshots captured
224+
at hang time through devcoredump, but without depending on any core modification
225+
of devcoredump infrastructure itself.
226+
227+
Later, when we are in-tree, the goal is to collaborate with devcoredump
228+
infrastructure with overall possible improvements, like multiple file support
229+
for better organization of the dumps, snapshot support, dmesg extra print,
230+
and whatever may make sense and help the overall infrastructure.
231+
232+
Xe – uAPI high level overview
233+
=============================
234+
235+
...Warning: To be done in follow up patches after/when/where the main consensus in various items are individually reached.

Documentation/gpu/todo.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,8 @@ Various hold-ups:
276276
- Need to switch to drm_fbdev_generic_setup(), otherwise a lot of the custom fb
277277
setup code can't be deleted.
278278

279-
- Many drivers wrap drm_gem_fb_create() only to check for valid formats. For
280-
atomic drivers we could check for valid formats by calling
281-
drm_plane_check_pixel_format() against all planes, and pass if any plane
282-
supports the format. For non-atomic that's not possible since like the format
283-
list for the primary plane is fake and we'd therefor reject valid formats.
279+
- Need to switch to drm_gem_fb_create(), as now drm_gem_fb_create() checks for
280+
valid formats for atomic drivers.
284281

285282
- Many drivers subclass drm_framebuffer, we'd need a embedding compatible
286283
version of the varios drm_gem_fb_create functions. Maybe called

Documentation/gpu/vkms.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,9 @@ Add Plane Features
118118

119119
There's lots of plane features we could add support for:
120120

121-
- ARGB format on primary plane: blend the primary plane into background with
122-
translucent alpha.
123-
124121
- Add background color KMS property[Good to get started].
125122

126-
- Full alpha blending on all planes.
127-
128-
- Rotation, scaling.
123+
- Scaling.
129124

130125
- Additional buffer formats, especially YUV formats for video like NV12.
131126
Low/high bpp RGB formats would also be interesting.

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6763,6 +6763,7 @@ F: drivers/gpu/drm/udl/
67636763
DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS)
67646764
M: Rodrigo Siqueira <[email protected]>
67656765
M: Melissa Wen <[email protected]>
6766+
M: Maíra Canal <[email protected]>
67666767
R: Haneen Mohammed <[email protected]>
67676768
R: Daniel Vetter <[email protected]>
67686769
@@ -6865,6 +6866,7 @@ S: Maintained
68656866
T: git git://anongit.freedesktop.org/drm/drm-misc
68666867
F: Documentation/devicetree/bindings/display/bridge/
68676868
F: drivers/gpu/drm/bridge/
6869+
F: drivers/gpu/drm/drm_bridge.c
68686870
F: include/drm/drm_bridge.h
68696871

68706872
DRM DRIVERS FOR EXYNOS

arch/arc/include/asm/fb.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
23
#ifndef _ASM_FB_H_
34
#define _ASM_FB_H_
45

5-
#include <linux/fb.h>
6-
#include <linux/fs.h>
7-
#include <asm/page.h>
8-
9-
static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10-
unsigned long off)
11-
{
12-
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
13-
}
14-
15-
static inline int fb_is_primary_device(struct fb_info *info)
16-
{
17-
return 0;
18-
}
6+
#include <asm-generic/fb.h>
197

208
#endif /* _ASM_FB_H_ */

0 commit comments

Comments
 (0)