Three fixes: tegra regression fix display flushing fix mst cleanup fix.
Unified · Split
| @@ -198,6 +198,22 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, · 197 unmodified lines | ||
| 198 | 198 | /****************************************************************************** |
| 199 | 199 | * EVO channel helpers |
| 200 | 200 | *****************************************************************************/ |
| 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 | + | |
| 201 | 217 | u32 * |
| 202 | 218 | evo_wait(struct nv50_dmac *evoc, int nr) |
| 203 | 219 | { |
| @@ -208,6 +224,7 @@ evo_wait(struct nv50_dmac *evoc, int nr) · 4 unmodified lines | ||
| 208 | 224 | mutex_lock(&dmac->lock); |
| 209 | 225 | if (put + nr >= (PAGE_SIZE / 4) - 8) { |
| 210 | 226 | dmac->ptr[put] = 0x20000000; |
| 227 | + evo_flush(dmac); | |
| 211 | 228 | |
| 212 | 229 | nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); |
| 213 | 230 | if (nvif_msec(device, 2000, |
| @@ -230,17 +247,7 @@ evo_kick(u32 *push, struct nv50_dmac *evoc) · 16 unmodified lines | ||
| 230 | 247 | { |
| 231 | 248 | struct nv50_dmac *dmac = evoc; |
| 232 | 249 | |
| 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); | |
| 244 | 251 | |
| 245 | 252 | nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2); |
| 246 | 253 | mutex_unlock(&dmac->lock); |
| @@ -1264,6 +1271,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm) · 1017 unmodified lines | ||
| 1264 | 1271 | { |
| 1265 | 1272 | struct nv50_mstm *mstm = *pmstm; |
| 1266 | 1273 | if (mstm) { |
| 1274 | + drm_dp_mst_topology_mgr_destroy(&mstm->mgr); | |
| 1267 | 1275 | kfree(*pmstm); |
| 1268 | 1276 | *pmstm = NULL; |
| 1269 | 1277 | } |
| @@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, · 1170 unmodified lines | ||
| 1171 | 1171 | goto err_free; |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | + err = nouveau_drm_device_init(drm); | |
| 1175 | + if (err) | |
| 1176 | + goto err_put; | |
| 1177 | + | |
| 1174 | 1178 | platform_set_drvdata(pdev, drm); |
| 1175 | 1179 | |
| 1176 | 1180 | return drm; |
| 1177 | 1181 | |
| 1182 | +err_put: | |
| 1183 | + drm_dev_put(drm); | |
| 1178 | 1184 | err_free: |
| 1179 | 1185 | nvkm_device_del(pdevice); |
| 1180 | 1186 | |