Skip to content

Commit 304ac80

Browse files
committed
Merge tag 'drm-next-2021-11-12' of git://anongit.freedesktop.org/drm/drm
Pull more drm updates from Dave Airlie: "I missed a drm-misc-next pull for the main pull last week. It wasn't that major and isn't the bulk of this at all. This has a bunch of fixes all over, a lot for amdgpu and i915. bridge: - HPD improvments for lt9611uxc - eDP aux-bus support for ps8640 - LVDS data-mapping selection support ttm: - remove huge page functionality (needs reworking) - fix a race condition during BO eviction panels: - add some new panels fbdev: - fix double-free - remove unused scrolling acceleration - CONFIG_FB dep improvements locking: - improve contended locking logging - naming collision fix dma-buf: - add dma_resv_for_each_fence iterator - fix fence refcounting bug - name locking fixesA prime: - fix object references during mmap nouveau: - various code style changes - refcount fix - device removal fixes - protect client list with a mutex - fix CE0 address calculation i915: - DP rates related fixes - Revert disabling dual eDP that was causing state readout problems - put the cdclk vtables in const data - Fix DVO port type for older platforms - Fix blankscreen by turning DP++ TMDS output buffers on encoder->shutdown - CCS FBs related fixes - Fix recursive lock in GuC submission - Revert guc_id from i915_request tracepoint - Build fix around dmabuf amdgpu: - GPU reset fix - Aldebaran fix - Yellow Carp fixes - DCN2.1 DMCUB fix - IOMMU regression fix for Picasso - DSC display fixes - BPC display calculation fixes - Other misc display fixes - Don't allow partial copy from user for DC debugfs - SRIOV fixes - GFX9 CSB pin count fix - Various IP version check fixes - DP 2.0 fixes - Limit DCN1 MPO fix to DCN1 amdkfd: - SVM fixes - Fix gfx version for renoir - Reset fixes udl: - timeout fix imx: - circular locking fix virtio: - NULL ptr deref fix" * tag 'drm-next-2021-11-12' of git://anongit.freedesktop.org/drm/drm: (126 commits) drm/ttm: Double check mem_type of BO while eviction drm/amdgpu: add missed support for UVD IP_VERSION(3, 0, 64) drm/amdgpu: drop jpeg IP initialization in SRIOV case drm/amd/display: reject both non-zero src_x and src_y only for DCN1x drm/amd/display: Add callbacks for DMUB HPD IRQ notifications drm/amd/display: Don't lock connection_mutex for DMUB HPD drm/amd/display: Add comment where CONFIG_DRM_AMD_DC_DCN macro ends drm/amdkfd: Fix retry fault drain race conditions drm/amdkfd: lower the VAs base offset to 8KB drm/amd/display: fix exit from amdgpu_dm_atomic_check() abruptly drm/amd/amdgpu: fix the kfd pre_reset sequence in sriov drm/amdgpu: fix uvd crash on Polaris12 during driver unloading drm/i915/adlp/fb: Prevent the mapping of redundant trailing padding NULL pages drm/i915/fb: Fix rounding error in subsampled plane size calculation drm/i915/hdmi: Turn DP++ TMDS output buffers back on in encoder->shutdown() drm/locking: fix __stack_depot_* name conflict drm/virtio: Fix NULL dereference error in virtio_gpu_poll drm/amdgpu: fix SI handling in amdgpu_device_asic_has_dc_support() drm/amdgpu: Fix dangling kfd_bo pointer for shared BOs drm/amd/amdkfd: Don't sent command to HWS on kfd reset ...
2 parents f78e9de + b6c2472 commit 304ac80

File tree

140 files changed

+1767
-1498
lines changed

Some content is hidden

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

140 files changed

+1767
-1498
lines changed

Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,26 @@ properties:
4949

5050
properties:
5151
port@0:
52-
$ref: /schemas/graph.yaml#/properties/port
52+
$ref: /schemas/graph.yaml#/$defs/port-base
5353
description: |
5454
For LVDS encoders, port 0 is the parallel input
5555
For LVDS decoders, port 0 is the LVDS input
5656
57+
properties:
58+
endpoint:
59+
$ref: /schemas/media/video-interfaces.yaml#
60+
unevaluatedProperties: false
61+
62+
properties:
63+
data-mapping:
64+
enum:
65+
- jeida-18
66+
- jeida-24
67+
- vesa-24
68+
description: |
69+
The color signals mapping order. See details in
70+
Documentation/devicetree/bindings/display/panel/lvds.yaml
71+
5772
port@1:
5873
$ref: /schemas/graph.yaml#/properties/port
5974
description: |
@@ -71,6 +86,22 @@ properties:
7186

7287
power-supply: true
7388

89+
if:
90+
not:
91+
properties:
92+
compatible:
93+
contains:
94+
const: lvds-decoder
95+
then:
96+
properties:
97+
ports:
98+
properties:
99+
port@0:
100+
properties:
101+
endpoint:
102+
properties:
103+
data-mapping: false
104+
74105
required:
75106
- compatible
76107
- ports

Documentation/devicetree/bindings/display/bridge/ps8640.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ properties:
4040
vdd33-supply:
4141
description: Regulator for 3.3V digital core power.
4242

43+
aux-bus:
44+
$ref: /schemas/display/dp-aux-bus.yaml#
45+
4346
ports:
4447
$ref: /schemas/graph.yaml#/properties/ports
4548

@@ -98,7 +101,21 @@ examples:
98101
reg = <1>;
99102
ps8640_out: endpoint {
100103
remote-endpoint = <&panel_in>;
101-
};
104+
};
105+
};
106+
};
107+
108+
aux-bus {
109+
panel {
110+
compatible = "boe,nv133fhm-n62";
111+
power-supply = <&pp3300_dx_edp>;
112+
backlight = <&backlight>;
113+
114+
port {
115+
panel_in: endpoint {
116+
remote-endpoint = <&ps8640_out>;
117+
};
118+
};
102119
};
103120
};
104121
};

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ properties:
166166
- innolux,at070tn92
167167
# Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD panel
168168
- innolux,g070y2-l01
169+
# Innolux G070Y2-T02 7" WVGA (800x480) TFT LCD TTL panel
170+
- innolux,g070y2-t02
169171
# Innolux Corporation 10.1" G101ICE-L01 WXGA (1280x800) LVDS panel
170172
- innolux,g101ice-l01
171173
# Innolux Corporation 12.1" WXGA (1280x800) TFT LCD panel
@@ -309,6 +311,8 @@ properties:
309311
- urt,umsh-8596md-11t
310312
- urt,umsh-8596md-19t
311313
- urt,umsh-8596md-20t
314+
# Vivax TPC-9150 tablet 9.0" WSVGA TFT LCD panel
315+
- vivax,tpc9150-panel
312316
# VXT 800x480 color TFT LCD panel
313317
- vxt,vl050-8048nt-c01
314318
# Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
@@ -317,6 +321,7 @@ properties:
317321
- yes-optoelectronics,ytc700tlag-05-201c
318322

319323
backlight: true
324+
ddc-i2c-bus: true
320325
enable-gpios: true
321326
port: true
322327
power-supply: true
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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/sharp,ls060t1sx01.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sharp Microelectronics 6.0" FullHD TFT LCD panel
8+
9+
maintainers:
10+
- Dmitry Baryskov <[email protected]>
11+
12+
allOf:
13+
- $ref: panel-common.yaml#
14+
15+
properties:
16+
compatible:
17+
const: sharp,ls060t1sx01
18+
19+
reg: true
20+
backlight: true
21+
reset-gpios: true
22+
port: true
23+
24+
avdd-supply:
25+
description: handle of the regulator that provides the positive supply voltage
26+
avee-supply:
27+
description: handle of the regulator that provides the negative supply voltage
28+
vddi-supply:
29+
description: handle of the regulator that provides the I/O supply voltage
30+
vddh-supply:
31+
description: handle of the regulator that provides the analog supply voltage
32+
33+
required:
34+
- compatible
35+
- reg
36+
37+
additionalProperties: false
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/gpio/gpio.h>
42+
43+
dsi {
44+
#address-cells = <1>;
45+
#size-cells = <0>;
46+
47+
panel@0 {
48+
compatible = "sharp,ls060t1sx01";
49+
reg = <0>;
50+
avdd-supply = <&pm8941_l22>;
51+
backlight = <&backlight>;
52+
reset-gpios = <&pm8916_gpios 25 GPIO_ACTIVE_LOW>;
53+
};
54+
};
55+
56+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,8 @@ patternProperties:
12861286
description: Vitesse Semiconductor Corporation
12871287
"^vivante,.*":
12881288
description: Vivante Corporation
1289+
"^vivax,.*":
1290+
description: Vivax brand by M SAN Grupa d.o.o.
12891291
"^vocore,.*":
12901292
description: VoCore Studio
12911293
"^voipac,.*":

Documentation/gpu/todo.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,19 @@ Level: Advanced
314314
Garbage collect fbdev scrolling acceleration
315315
--------------------------------------------
316316

317-
Scroll acceleration is disabled in fbcon by hard-wiring p->scrollmode =
318-
SCROLL_REDRAW. There's a ton of code this will allow us to remove:
317+
Scroll acceleration has been disabled in fbcon. Now it works as the old
318+
SCROLL_REDRAW mode. A ton of code was removed in fbcon.c and the hook bmove was
319+
removed from fbcon_ops.
320+
Remaining tasks:
319321

320-
- lots of code in fbcon.c
321-
322-
- a bunch of the hooks in fbcon_ops, maybe the remaining hooks could be called
322+
- a bunch of the hooks in fbcon_ops could be removed or simplified by calling
323323
directly instead of the function table (with a switch on p->rotate)
324324

325325
- fb_copyarea is unused after this, and can be deleted from all drivers
326326

327+
- after that, fb_copyarea can be deleted from fb_ops in include/linux/fb.h as
328+
well as cfb_copyarea
329+
327330
Note that not all acceleration code can be deleted, since clearing and cursor
328331
support is still accelerated, which might be good candidates for further
329332
deletion projects.

drivers/dma-buf/dma-buf.c

Lines changed: 27 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ static void dma_buf_release(struct dentry *dentry)
6767
BUG_ON(dmabuf->vmapping_counter);
6868

6969
/*
70-
* Any fences that a dma-buf poll can wait on should be signaled
71-
* before releasing dma-buf. This is the responsibility of each
72-
* driver that uses the reservation objects.
73-
*
74-
* If you hit this BUG() it means someone dropped their ref to the
75-
* dma-buf while still having pending operation to the buffer.
70+
* If you hit this BUG() it could mean:
71+
* * There's a file reference imbalance in dma_buf_poll / dma_buf_poll_cb or somewhere else
72+
* * dmabuf->cb_in/out.active are non-0 despite no pending fence callback
7673
*/
7774
BUG_ON(dmabuf->cb_in.active || dmabuf->cb_out.active);
7875

@@ -200,28 +197,26 @@ static loff_t dma_buf_llseek(struct file *file, loff_t offset, int whence)
200197
static void dma_buf_poll_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
201198
{
202199
struct dma_buf_poll_cb_t *dcb = (struct dma_buf_poll_cb_t *)cb;
200+
struct dma_buf *dmabuf = container_of(dcb->poll, struct dma_buf, poll);
203201
unsigned long flags;
204202

205203
spin_lock_irqsave(&dcb->poll->lock, flags);
206204
wake_up_locked_poll(dcb->poll, dcb->active);
207205
dcb->active = 0;
208206
spin_unlock_irqrestore(&dcb->poll->lock, flags);
209207
dma_fence_put(fence);
208+
/* Paired with get_file in dma_buf_poll */
209+
fput(dmabuf->file);
210210
}
211211

212-
static bool dma_buf_poll_shared(struct dma_resv *resv,
212+
static bool dma_buf_poll_add_cb(struct dma_resv *resv, bool write,
213213
struct dma_buf_poll_cb_t *dcb)
214214
{
215-
struct dma_resv_list *fobj = dma_resv_shared_list(resv);
215+
struct dma_resv_iter cursor;
216216
struct dma_fence *fence;
217-
int i, r;
218-
219-
if (!fobj)
220-
return false;
217+
int r;
221218

222-
for (i = 0; i < fobj->shared_count; ++i) {
223-
fence = rcu_dereference_protected(fobj->shared[i],
224-
dma_resv_held(resv));
219+
dma_resv_for_each_fence(&cursor, resv, write, fence) {
225220
dma_fence_get(fence);
226221
r = dma_fence_add_callback(fence, &dcb->cb, dma_buf_poll_cb);
227222
if (!r)
@@ -232,24 +227,6 @@ static bool dma_buf_poll_shared(struct dma_resv *resv,
232227
return false;
233228
}
234229

235-
static bool dma_buf_poll_excl(struct dma_resv *resv,
236-
struct dma_buf_poll_cb_t *dcb)
237-
{
238-
struct dma_fence *fence = dma_resv_excl_fence(resv);
239-
int r;
240-
241-
if (!fence)
242-
return false;
243-
244-
dma_fence_get(fence);
245-
r = dma_fence_add_callback(fence, &dcb->cb, dma_buf_poll_cb);
246-
if (!r)
247-
return true;
248-
dma_fence_put(fence);
249-
250-
return false;
251-
}
252-
253230
static __poll_t dma_buf_poll(struct file *file, poll_table *poll)
254231
{
255232
struct dma_buf *dmabuf;
@@ -282,8 +259,10 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll)
282259
spin_unlock_irq(&dmabuf->poll.lock);
283260

284261
if (events & EPOLLOUT) {
285-
if (!dma_buf_poll_shared(resv, dcb) &&
286-
!dma_buf_poll_excl(resv, dcb))
262+
/* Paired with fput in dma_buf_poll_cb */
263+
get_file(dmabuf->file);
264+
265+
if (!dma_buf_poll_add_cb(resv, true, dcb))
287266
/* No callback queued, wake up any other waiters */
288267
dma_buf_poll_cb(NULL, &dcb->cb);
289268
else
@@ -303,7 +282,10 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll)
303282
spin_unlock_irq(&dmabuf->poll.lock);
304283

305284
if (events & EPOLLIN) {
306-
if (!dma_buf_poll_excl(resv, dcb))
285+
/* Paired with fput in dma_buf_poll_cb */
286+
get_file(dmabuf->file);
287+
288+
if (!dma_buf_poll_add_cb(resv, false, dcb))
307289
/* No callback queued, wake up any other waiters */
308290
dma_buf_poll_cb(NULL, &dcb->cb);
309291
else
@@ -1356,10 +1338,9 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
13561338
{
13571339
struct dma_buf *buf_obj;
13581340
struct dma_buf_attachment *attach_obj;
1359-
struct dma_resv *robj;
1360-
struct dma_resv_list *fobj;
1341+
struct dma_resv_iter cursor;
13611342
struct dma_fence *fence;
1362-
int count = 0, attach_count, shared_count, i;
1343+
int count = 0, attach_count;
13631344
size_t size = 0;
13641345
int ret;
13651346

@@ -1378,29 +1359,21 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
13781359
if (ret)
13791360
goto error_unlock;
13801361

1362+
1363+
spin_lock(&buf_obj->name_lock);
13811364
seq_printf(s, "%08zu\t%08x\t%08x\t%08ld\t%s\t%08lu\t%s\n",
13821365
buf_obj->size,
13831366
buf_obj->file->f_flags, buf_obj->file->f_mode,
13841367
file_count(buf_obj->file),
13851368
buf_obj->exp_name,
13861369
file_inode(buf_obj->file)->i_ino,
13871370
buf_obj->name ?: "");
1371+
spin_unlock(&buf_obj->name_lock);
13881372

1389-
robj = buf_obj->resv;
1390-
fence = dma_resv_excl_fence(robj);
1391-
if (fence)
1392-
seq_printf(s, "\tExclusive fence: %s %s %ssignalled\n",
1393-
fence->ops->get_driver_name(fence),
1394-
fence->ops->get_timeline_name(fence),
1395-
dma_fence_is_signaled(fence) ? "" : "un");
1396-
1397-
fobj = rcu_dereference_protected(robj->fence,
1398-
dma_resv_held(robj));
1399-
shared_count = fobj ? fobj->shared_count : 0;
1400-
for (i = 0; i < shared_count; i++) {
1401-
fence = rcu_dereference_protected(fobj->shared[i],
1402-
dma_resv_held(robj));
1403-
seq_printf(s, "\tShared fence: %s %s %ssignalled\n",
1373+
dma_resv_for_each_fence(&cursor, buf_obj->resv, true, fence) {
1374+
seq_printf(s, "\t%s fence: %s %s %ssignalled\n",
1375+
dma_resv_iter_is_exclusive(&cursor) ?
1376+
"Exclusive" : "Shared",
14041377
fence->ops->get_driver_name(fence),
14051378
fence->ops->get_timeline_name(fence),
14061379
dma_fence_is_signaled(fence) ? "" : "un");

0 commit comments

Comments
 (0)