Skip to content

Commit 4e291f2

Browse files
committed
Merge tag 'drm-misc-next-2022-11-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: Core Changes: - atomic-helper: Add begin_fb_access and end_fb_access hooks - fb-helper: Rework to move fb emulation into helpers - scheduler: rework entity flush, kill and fini - ttm: Optimize pool allocations Driver Changes: - amdgpu: scheduler rework - hdlcd: Switch to DRM-managed resources - ingenic: Fix registration error path - lcdif: FIFO threshold tuning - meson: Fix return type of cvbs' mode_valid - ofdrm: multiple fixes (kconfig, types, endianness) - sun4i: A100 and D1 support - panel: - New Panel: Jadard JD9365DA-H3 Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20221110083612.g63eaocoaa554soh@houat
2 parents 3076e09 + 6b818c5 commit 4e291f2

File tree

154 files changed

+2922
-1382
lines changed

Some content is hidden

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

154 files changed

+2922
-1382
lines changed

Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ maintainers:
1212

1313
properties:
1414
compatible:
15-
enum:
16-
- allwinner,sun6i-a31-mipi-dsi
17-
- allwinner,sun50i-a64-mipi-dsi
15+
oneOf:
16+
- enum:
17+
- allwinner,sun6i-a31-mipi-dsi
18+
- allwinner,sun50i-a64-mipi-dsi
19+
- allwinner,sun50i-a100-mipi-dsi
20+
- items:
21+
- const: allwinner,sun20i-d1-mipi-dsi
22+
- const: allwinner,sun50i-a100-mipi-dsi
1823

1924
reg:
2025
maxItems: 1
@@ -59,7 +64,6 @@ required:
5964
- phys
6065
- phy-names
6166
- resets
62-
- vcc-dsi-supply
6367
- port
6468

6569
allOf:
@@ -68,7 +72,9 @@ allOf:
6872
properties:
6973
compatible:
7074
contains:
71-
const: allwinner,sun6i-a31-mipi-dsi
75+
enum:
76+
- allwinner,sun6i-a31-mipi-dsi
77+
- allwinner,sun50i-a100-mipi-dsi
7278

7379
then:
7480
properties:
@@ -78,16 +84,22 @@ allOf:
7884
required:
7985
- clock-names
8086

87+
else:
88+
properties:
89+
clocks:
90+
maxItems: 1
91+
8192
- if:
8293
properties:
8394
compatible:
8495
contains:
85-
const: allwinner,sun50i-a64-mipi-dsi
96+
enum:
97+
- allwinner,sun6i-a31-mipi-dsi
98+
- allwinner,sun50i-a64-mipi-dsi
8699

87100
then:
88-
properties:
89-
clocks:
90-
minItems: 1
101+
required:
102+
- vcc-dsi-supply
91103

92104
unevaluatedProperties: false
93105

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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/jadard,jd9365da-h3.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Jadard JD9365DA-HE WXGA DSI panel
8+
9+
maintainers:
10+
- Jagan Teki <[email protected]>
11+
12+
allOf:
13+
- $ref: panel-common.yaml#
14+
15+
properties:
16+
compatible:
17+
items:
18+
- enum:
19+
- chongzhou,cz101b4001
20+
- const: jadard,jd9365da-h3
21+
22+
reg: true
23+
24+
vdd-supply:
25+
description: supply regulator for VDD, usually 3.3V
26+
27+
vccio-supply:
28+
description: supply regulator for VCCIO, usually 1.8V
29+
30+
reset-gpios: true
31+
32+
backlight: true
33+
34+
port: true
35+
36+
required:
37+
- compatible
38+
- reg
39+
- vdd-supply
40+
- vccio-supply
41+
- reset-gpios
42+
43+
additionalProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/gpio/gpio.h>
48+
#include <dt-bindings/pinctrl/rockchip.h>
49+
50+
dsi {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
panel@0 {
55+
compatible = "chongzhou,cz101b4001", "jadard,jd9365da-h3";
56+
reg = <0>;
57+
vdd-supply = <&lcd_3v3>;
58+
vccio-supply = <&vcca_1v8>;
59+
reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
60+
backlight = <&backlight>;
61+
62+
port {
63+
mipi_in_panel: endpoint {
64+
remote-endpoint = <&mipi_out_panel>;
65+
};
66+
};
67+
};
68+
};
69+
70+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ patternProperties:
246246
description: ChipOne
247247
"^chipspark,.*":
248248
description: ChipSPARK
249+
"^chongzhou,.*":
250+
description: Shenzhen Chongzhou Electronic Technology Co., Ltd
249251
"^chrontel,.*":
250252
description: Chrontel, Inc.
251253
"^chrp,.*":
@@ -639,6 +641,8 @@ patternProperties:
639641
description: ITian Corporation
640642
"^iwave,.*":
641643
description: iWave Systems Technologies Pvt. Ltd.
644+
"^jadard,.*":
645+
description: Jadard Technology Inc.
642646
"^jdi,.*":
643647
description: Japan Display Inc.
644648
"^jedec,.*":

Documentation/gpu/drm-kms-helpers.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ fbdev Helper Functions Reference
116116
.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
117117
:export:
118118

119+
.. kernel-doc:: drivers/gpu/drm/drm_fbdev_generic.c
120+
:export:
121+
119122
format Helper Functions Reference
120123
=================================
121124

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6503,6 +6503,12 @@ S: Orphan / Obsolete
65036503
F: drivers/gpu/drm/i810/
65046504
F: include/uapi/drm/i810_drm.h
65056505

6506+
DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS
6507+
M: Jagan Teki <[email protected]>
6508+
S: Maintained
6509+
F: Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml
6510+
F: drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
6511+
65066512
DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER
65076513
M: Paul Kocialkowski <[email protected]>
65086514
S: Supported
@@ -7113,7 +7119,7 @@ F: drivers/gpu/drm/ttm/
71137119
F: include/drm/ttm/
71147120

71157121
DRM GPU SCHEDULER
7116-
M: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
7122+
M: Luben Tuikov <luben.tuikov@amd.com>
71177123
71187124
S: Maintained
71197125
T: git git://anongit.freedesktop.org/drm/drm-misc

drivers/gpu/drm/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ drm_kms_helper-y := \
117117
drm_self_refresh_helper.o \
118118
drm_simple_kms_helper.o
119119
drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
120-
drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
120+
drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += \
121+
drm_fbdev_generic.o \
122+
drm_fb_helper.o
121123
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
122124

123125
#

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
673673
goto err;
674674
}
675675

676-
ret = amdgpu_job_alloc(adev, 1, &job, NULL);
676+
ret = amdgpu_job_alloc(adev, NULL, NULL, NULL, 1, &job);
677677
if (ret)
678678
goto err;
679679

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include <drm/display/drm_dp_helper.h>
2828
#include <drm/drm_edid.h>
29-
#include <drm/drm_fb_helper.h>
3029
#include <drm/drm_probe_helper.h>
3130
#include <drm/amdgpu_drm.h>
3231
#include "amdgpu.h"

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

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,8 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
291291
return -EINVAL;
292292

293293
for (i = 0; i < p->gang_size; ++i) {
294-
ret = amdgpu_job_alloc(p->adev, num_ibs[i], &p->jobs[i], vm);
295-
if (ret)
296-
goto free_all_kdata;
297-
298-
ret = drm_sched_job_init(&p->jobs[i]->base, p->entities[i],
299-
&fpriv->vm);
294+
ret = amdgpu_job_alloc(p->adev, vm, p->entities[i], vm,
295+
num_ibs[i], &p->jobs[i]);
300296
if (ret)
301297
goto free_all_kdata;
302298
}
@@ -430,7 +426,7 @@ static int amdgpu_cs_p2_dependencies(struct amdgpu_cs_parser *p,
430426
dma_fence_put(old);
431427
}
432428

433-
r = amdgpu_sync_fence(&p->gang_leader->sync, fence);
429+
r = amdgpu_sync_fence(&p->sync, fence);
434430
dma_fence_put(fence);
435431
if (r)
436432
return r;
@@ -452,9 +448,20 @@ static int amdgpu_syncobj_lookup_and_add(struct amdgpu_cs_parser *p,
452448
return r;
453449
}
454450

455-
r = amdgpu_sync_fence(&p->gang_leader->sync, fence);
456-
dma_fence_put(fence);
451+
r = amdgpu_sync_fence(&p->sync, fence);
452+
if (r)
453+
goto error;
457454

455+
/*
456+
* When we have an explicit dependency it might be necessary to insert a
457+
* pipeline sync to make sure that all caches etc are flushed and the
458+
* next job actually sees the results from the previous one.
459+
*/
460+
if (fence->context == p->gang_leader->base.entity->fence_context)
461+
r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence);
462+
463+
error:
464+
dma_fence_put(fence);
458465
return r;
459466
}
460467

@@ -1101,7 +1108,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11011108
if (r)
11021109
return r;
11031110

1104-
r = amdgpu_sync_fence(&job->sync, fpriv->prt_va->last_pt_update);
1111+
r = amdgpu_sync_fence(&p->sync, fpriv->prt_va->last_pt_update);
11051112
if (r)
11061113
return r;
11071114

@@ -1112,7 +1119,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11121119
if (r)
11131120
return r;
11141121

1115-
r = amdgpu_sync_fence(&job->sync, bo_va->last_pt_update);
1122+
r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update);
11161123
if (r)
11171124
return r;
11181125
}
@@ -1131,7 +1138,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11311138
if (r)
11321139
return r;
11331140

1134-
r = amdgpu_sync_fence(&job->sync, bo_va->last_pt_update);
1141+
r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update);
11351142
if (r)
11361143
return r;
11371144
}
@@ -1144,7 +1151,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11441151
if (r)
11451152
return r;
11461153

1147-
r = amdgpu_sync_fence(&job->sync, vm->last_update);
1154+
r = amdgpu_sync_fence(&p->sync, vm->last_update);
11481155
if (r)
11491156
return r;
11501157

@@ -1176,7 +1183,6 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11761183
static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
11771184
{
11781185
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
1179-
struct amdgpu_job *leader = p->gang_leader;
11801186
struct amdgpu_bo_list_entry *e;
11811187
unsigned int i;
11821188
int r;
@@ -1188,14 +1194,14 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
11881194

11891195
sync_mode = amdgpu_bo_explicit_sync(bo) ?
11901196
AMDGPU_SYNC_EXPLICIT : AMDGPU_SYNC_NE_OWNER;
1191-
r = amdgpu_sync_resv(p->adev, &leader->sync, resv, sync_mode,
1197+
r = amdgpu_sync_resv(p->adev, &p->sync, resv, sync_mode,
11921198
&fpriv->vm);
11931199
if (r)
11941200
return r;
11951201
}
11961202

1197-
for (i = 0; i < p->gang_size - 1; ++i) {
1198-
r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
1203+
for (i = 0; i < p->gang_size; ++i) {
1204+
r = amdgpu_sync_push_to_job(&p->sync, p->jobs[i]);
11991205
if (r)
12001206
return r;
12011207
}
@@ -1241,7 +1247,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
12411247
struct dma_fence *fence;
12421248

12431249
fence = &p->jobs[i]->base.s_fence->scheduled;
1244-
r = amdgpu_sync_fence(&leader->sync, fence);
1250+
r = drm_sched_job_add_dependency(&leader->base, fence);
12451251
if (r)
12461252
goto error_cleanup;
12471253
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ struct amdgpu_cs_parser {
7575

7676
unsigned num_post_deps;
7777
struct amdgpu_cs_post_dep *post_deps;
78+
79+
struct amdgpu_sync sync;
7880
};
7981

8082
int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,

0 commit comments

Comments
 (0)