History

Merge branch 'linux-4.20' of git://github.com/skeggsb/linux into drm-fixes

Three fixes: tegra regression fix display flushing fix mst cleanup fix.

Dave Airlie committed 7 years ago

Commit b5f436e2 parents 26eacb7 24199c52 files · +25 −11Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/nouveau/dispnv50/disp.c +19 −11
  2. drivers/gpu/drm/nouveau/nouveau_drm.c +6 −0
drivers/gpu/drm/nouveau/dispnv50/disp.c+19−11
@@ -198,6 +198,22 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, · 197 unmodified lines
198198 /******************************************************************************
199199 * EVO channel helpers
200200 *****************************************************************************/
201+static void
202+evo_flush(struct nv50_dmac *dmac)
203+{
204+ /* Push buffer fetches are not coherent with BAR1, we need to ensure
205+ * writes have been flushed right through to VRAM before writing PUT.
206+ */
207+ if (dmac->push.type & NVIF_MEM_VRAM) {
208+ struct nvif_device *device = dmac->base.device;
209+ nvif_wr32(&device->object, 0x070000, 0x00000001);
210+ nvif_msec(device, 2000,
211+ if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))
212+ break;
213+ );
214+ }
215+}
216+
201217 u32 *
202218 evo_wait(struct nv50_dmac *evoc, int nr)
203219 {
@@ -208,6 +224,7 @@ evo_wait(struct nv50_dmac *evoc, int nr) · 4 unmodified lines
208224 mutex_lock(&dmac->lock);
209225 if (put + nr >= (PAGE_SIZE / 4) - 8) {
210226 dmac->ptr[put] = 0x20000000;
227+ evo_flush(dmac);
211228
212229 nvif_wr32(&dmac->base.user, 0x0000, 0x00000000);
213230 if (nvif_msec(device, 2000,
@@ -230,17 +247,7 @@ evo_kick(u32 *push, struct nv50_dmac *evoc) · 16 unmodified lines
230247 {
231248 struct nv50_dmac *dmac = evoc;
232249
233− /* Push buffer fetches are not coherent with BAR1, we need to ensure
234− * writes have been flushed right through to VRAM before writing PUT.
235− */
236− if (dmac->push.type & NVIF_MEM_VRAM) {
237− struct nvif_device *device = dmac->base.device;
238− nvif_wr32(&device->object, 0x070000, 0x00000001);
239− nvif_msec(device, 2000,
240− if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))
241− break;
242− );
243− }
250+ evo_flush(dmac);
244251
245252 nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2);
246253 mutex_unlock(&dmac->lock);
@@ -1264,6 +1271,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm) · 1017 unmodified lines
12641271 {
12651272 struct nv50_mstm *mstm = *pmstm;
12661273 if (mstm) {
1274+ drm_dp_mst_topology_mgr_destroy(&mstm->mgr);
12671275 kfree(*pmstm);
12681276 *pmstm = NULL;
12691277 }
drivers/gpu/drm/nouveau/nouveau_drm.c+6−0
@@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, · 1170 unmodified lines
11711171 goto err_free;
11721172 }
11731173
1174+ err = nouveau_drm_device_init(drm);
1175+ if (err)
1176+ goto err_put;
1177+
11741178 platform_set_drvdata(pdev, drm);
11751179
11761180 return drm;
11771181
1182+err_put:
1183+ drm_dev_put(drm);
11781184 err_free:
11791185 nvkm_device_del(pdevice);
11801186

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t