Skip to content

Commit ff5ebaf

Browse files
committed
Merge tag 'drm-fixes-2023-01-13' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "There is a bit of a post-holiday build up here I expect, small fixes across the board, amdgpu and msm being the main leaders, with others having a few. One code removal patch for nouveau: buddy: - benchmark regression fix for top-down buddy allocation panel: - add Lenovo panel orientation quirk ttm: - fix kernel oops regression amdgpu: - fix missing fence references - fix missing pipeline sync fencing - SMU13 fan speed fix - SMU13 fix power cap handling - SMU13 BACO fix - Fix a possible segfault in bo validation error case - Delay removal of firmware framebuffer - Fix error when unloading amdkfd: - SVM fix when clearing vram - GC11 fix for multi-GPU i915: - Reserve enough fence slot for i915_vma_unbind_vsync - Fix potential use after free - Reset engines twice in case of reset failure - Use multi-cast registers for SVG Unit registers msm: - display: - doc warning fixes - dt attribs cleanups - memory leak fix - error handing in hdmi probe fix - dp_aux_isr incorrect signalling fix - shutdown path fix - accel: - a5xx: fix quirks to be a bitmask - a6xx: fix gx halt to avoid 1s hang - kexec shutdown fix - fix potential double free vmwgfx: - drop rcu usage to make code more robust virtio: - fix use-after-free in gem handle code nouveau: - drop unused nouveau_fbcon.c" * tag 'drm-fixes-2023-01-13' of git://anongit.freedesktop.org/drm/drm: (35 commits) drm: Optimize drm buddy top-down allocation method drm/ttm: Fix a regression causing kernel oops'es drm/i915/gt: Cover rest of SVG unit MCR registers drm/nouveau: Remove file nouveau_fbcon.c drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU drm/amd/pm/smu13: BACO is supported when it's in BACO state drm/amdkfd: Add sync after creating vram bo drm/i915/gt: Reset twice drm/amdgpu: fix pipeline sync v2 drm/vmwgfx: Remove rcu locks from user resources drm/virtio: Fix GEM handle creation UAF drm/amdgpu: Fixed bug on error when unloading amdgpu drm/amd: Delay removal of the firmware framebuffer drm/amdgpu: Fix potential NULL dereference drm/i915: Fix potential context UAFs drm/i915: Reserve enough fence slot for i915_vma_unbind_async drm: Add orientation quirk for Lenovo ideapad D330-10IGL drm/msm/a6xx: Avoid gx gbit halt during rpm suspend drm/msm/adreno: Make adreno quirks not overwrite each other drm/msm: another fix for the headless Adreno GPU ...
2 parents d45b832 + e695bc7 commit ff5ebaf

Some content is hidden

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

43 files changed

+332
-950
lines changed

Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ properties:
3232
- description: Display byte clock
3333
- description: Display byte interface clock
3434
- description: Display pixel clock
35-
- description: Display escape clock
35+
- description: Display core clock
3636
- description: Display AHB clock
3737
- description: Display AXI clock
3838

@@ -137,8 +137,6 @@ required:
137137
- phys
138138
- assigned-clocks
139139
- assigned-clock-parents
140-
- power-domains
141-
- operating-points-v2
142140
- ports
143141

144142
additionalProperties: false

Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ required:
6969
- compatible
7070
- reg
7171
- reg-names
72-
- vdds-supply
7372

7473
unevaluatedProperties: false
7574

Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ required:
3939
- compatible
4040
- reg
4141
- reg-names
42-
- vcca-supply
4342

4443
unevaluatedProperties: false
4544

Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ properties:
3434
vddio-supply:
3535
description: Phandle to vdd-io regulator device node.
3636

37+
qcom,dsi-phy-regulator-ldo-mode:
38+
type: boolean
39+
description: Indicates if the LDO mode PHY regulator is wanted.
40+
3741
required:
3842
- compatible
3943
- reg

Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ examples:
7272
#include <dt-bindings/interconnect/qcom,qcm2290.h>
7373
#include <dt-bindings/power/qcom-rpmpd.h>
7474
75-
mdss@5e00000 {
75+
display-subsystem@5e00000 {
7676
#address-cells = <1>;
7777
#size-cells = <1>;
7878
compatible = "qcom,qcm2290-mdss";

Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ examples:
6262
#include <dt-bindings/interrupt-controller/arm-gic.h>
6363
#include <dt-bindings/power/qcom-rpmpd.h>
6464
65-
mdss@5e00000 {
65+
display-subsystem@5e00000 {
6666
#address-cells = <1>;
6767
#size-cells = <1>;
6868
compatible = "qcom,sm6115-mdss";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_b
20992099
}
21002100

21012101
amdgpu_amdkfd_remove_eviction_fence(
2102-
bo, bo->kfd_bo->process_info->eviction_fence);
2102+
bo, bo->vm_bo->vm->process_info->eviction_fence);
21032103

21042104
amdgpu_bo_unreserve(bo);
21052105

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

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
6161
amdgpu_ctx_put(p->ctx);
6262
return -ECANCELED;
6363
}
64+
65+
amdgpu_sync_create(&p->sync);
6466
return 0;
6567
}
6668

@@ -452,18 +454,6 @@ static int amdgpu_syncobj_lookup_and_add(struct amdgpu_cs_parser *p,
452454
}
453455

454456
r = amdgpu_sync_fence(&p->sync, fence);
455-
if (r)
456-
goto error;
457-
458-
/*
459-
* When we have an explicit dependency it might be necessary to insert a
460-
* pipeline sync to make sure that all caches etc are flushed and the
461-
* next job actually sees the results from the previous one.
462-
*/
463-
if (fence->context == p->gang_leader->base.entity->fence_context)
464-
r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence);
465-
466-
error:
467457
dma_fence_put(fence);
468458
return r;
469459
}
@@ -1188,10 +1178,19 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11881178
static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
11891179
{
11901180
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
1181+
struct drm_gpu_scheduler *sched;
11911182
struct amdgpu_bo_list_entry *e;
1183+
struct dma_fence *fence;
11921184
unsigned int i;
11931185
int r;
11941186

1187+
r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_leader_idx]);
1188+
if (r) {
1189+
if (r != -ERESTARTSYS)
1190+
DRM_ERROR("amdgpu_ctx_wait_prev_fence failed.\n");
1191+
return r;
1192+
}
1193+
11951194
list_for_each_entry(e, &p->validated, tv.head) {
11961195
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
11971196
struct dma_resv *resv = bo->tbo.base.resv;
@@ -1211,10 +1210,24 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
12111210
return r;
12121211
}
12131212

1214-
r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_leader_idx]);
1215-
if (r && r != -ERESTARTSYS)
1216-
DRM_ERROR("amdgpu_ctx_wait_prev_fence failed.\n");
1217-
return r;
1213+
sched = p->gang_leader->base.entity->rq->sched;
1214+
while ((fence = amdgpu_sync_get_fence(&p->sync))) {
1215+
struct drm_sched_fence *s_fence = to_drm_sched_fence(fence);
1216+
1217+
/*
1218+
* When we have an dependency it might be necessary to insert a
1219+
* pipeline sync to make sure that all caches etc are flushed and the
1220+
* next job actually sees the results from the previous one
1221+
* before we start executing on the same scheduler ring.
1222+
*/
1223+
if (!s_fence || s_fence->sched != sched)
1224+
continue;
1225+
1226+
r = amdgpu_sync_fence(&p->gang_leader->explicit_sync, fence);
1227+
if (r)
1228+
return r;
1229+
}
1230+
return 0;
12181231
}
12191232

12201233
static void amdgpu_cs_post_dependencies(struct amdgpu_cs_parser *p)
@@ -1254,9 +1267,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
12541267
continue;
12551268

12561269
fence = &p->jobs[i]->base.s_fence->scheduled;
1270+
dma_fence_get(fence);
12571271
r = drm_sched_job_add_dependency(&leader->base, fence);
1258-
if (r)
1272+
if (r) {
1273+
dma_fence_put(fence);
12591274
goto error_cleanup;
1275+
}
12601276
}
12611277

12621278
if (p->gang_size > 1) {
@@ -1344,6 +1360,7 @@ static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser)
13441360
{
13451361
unsigned i;
13461362

1363+
amdgpu_sync_free(&parser->sync);
13471364
for (i = 0; i < parser->num_post_deps; i++) {
13481365
drm_syncobj_put(parser->post_deps[i].syncobj);
13491366
kfree(parser->post_deps[i].chain);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <generated/utsrelease.h>
3737
#include <linux/pci-p2pdma.h>
3838

39+
#include <drm/drm_aperture.h>
3940
#include <drm/drm_atomic_helper.h>
4041
#include <drm/drm_fb_helper.h>
4142
#include <drm/drm_probe_helper.h>
@@ -90,6 +91,8 @@ MODULE_FIRMWARE("amdgpu/navi12_gpu_info.bin");
9091
#define AMDGPU_MAX_RETRY_LIMIT 2
9192
#define AMDGPU_RETRY_SRIOV_RESET(r) ((r) == -EBUSY || (r) == -ETIMEDOUT || (r) == -EINVAL)
9293

94+
static const struct drm_driver amdgpu_kms_driver;
95+
9396
const char *amdgpu_asic_name[] = {
9497
"TAHITI",
9598
"PITCAIRN",
@@ -3687,6 +3690,11 @@ int amdgpu_device_init(struct amdgpu_device *adev,
36873690
if (r)
36883691
return r;
36893692

3693+
/* Get rid of things like offb */
3694+
r = drm_aperture_remove_conflicting_pci_framebuffers(adev->pdev, &amdgpu_kms_driver);
3695+
if (r)
3696+
return r;
3697+
36903698
/* Enable TMZ based on IP_VERSION */
36913699
amdgpu_gmc_tmz_set(adev);
36923700

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424

2525
#include <drm/amdgpu_drm.h>
26-
#include <drm/drm_aperture.h>
2726
#include <drm/drm_drv.h>
2827
#include <drm/drm_fbdev_generic.h>
2928
#include <drm/drm_gem.h>
@@ -2122,11 +2121,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
21222121
}
21232122
#endif
21242123

2125-
/* Get rid of things like offb */
2126-
ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &amdgpu_kms_driver);
2127-
if (ret)
2128-
return ret;
2129-
21302124
adev = devm_drm_dev_alloc(&pdev->dev, &amdgpu_kms_driver, typeof(*adev), ddev);
21312125
if (IS_ERR(adev))
21322126
return PTR_ERR(adev);

0 commit comments

Comments
 (0)