Commit b5f436e7 authored by Dave Airlie's avatar Dave Airlie

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.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv7WCPzjQZonk+eS1FgEUKirz-4LOrVpMUVMM=D-GjbVpg@mail.gmail.com
parents 26eacb78 24199c54
...@@ -198,6 +198,22 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, ...@@ -198,6 +198,22 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
/****************************************************************************** /******************************************************************************
* EVO channel helpers * EVO channel helpers
*****************************************************************************/ *****************************************************************************/
static void
evo_flush(struct nv50_dmac *dmac)
{
/* Push buffer fetches are not coherent with BAR1, we need to ensure
* writes have been flushed right through to VRAM before writing PUT.
*/
if (dmac->push.type & NVIF_MEM_VRAM) {
struct nvif_device *device = dmac->base.device;
nvif_wr32(&device->object, 0x070000, 0x00000001);
nvif_msec(device, 2000,
if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))
break;
);
}
}
u32 * u32 *
evo_wait(struct nv50_dmac *evoc, int nr) evo_wait(struct nv50_dmac *evoc, int nr)
{ {
...@@ -208,6 +224,7 @@ evo_wait(struct nv50_dmac *evoc, int nr) ...@@ -208,6 +224,7 @@ evo_wait(struct nv50_dmac *evoc, int nr)
mutex_lock(&dmac->lock); mutex_lock(&dmac->lock);
if (put + nr >= (PAGE_SIZE / 4) - 8) { if (put + nr >= (PAGE_SIZE / 4) - 8) {
dmac->ptr[put] = 0x20000000; dmac->ptr[put] = 0x20000000;
evo_flush(dmac);
nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); nvif_wr32(&dmac->base.user, 0x0000, 0x00000000);
if (nvif_msec(device, 2000, if (nvif_msec(device, 2000,
...@@ -230,17 +247,7 @@ evo_kick(u32 *push, struct nv50_dmac *evoc) ...@@ -230,17 +247,7 @@ evo_kick(u32 *push, struct nv50_dmac *evoc)
{ {
struct nv50_dmac *dmac = evoc; struct nv50_dmac *dmac = evoc;
/* Push buffer fetches are not coherent with BAR1, we need to ensure evo_flush(dmac);
* writes have been flushed right through to VRAM before writing PUT.
*/
if (dmac->push.type & NVIF_MEM_VRAM) {
struct nvif_device *device = dmac->base.device;
nvif_wr32(&device->object, 0x070000, 0x00000001);
nvif_msec(device, 2000,
if (!(nvif_rd32(&device->object, 0x070000) & 0x00000002))
break;
);
}
nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2); nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2);
mutex_unlock(&dmac->lock); mutex_unlock(&dmac->lock);
...@@ -1264,6 +1271,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm) ...@@ -1264,6 +1271,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm)
{ {
struct nv50_mstm *mstm = *pmstm; struct nv50_mstm *mstm = *pmstm;
if (mstm) { if (mstm) {
drm_dp_mst_topology_mgr_destroy(&mstm->mgr);
kfree(*pmstm); kfree(*pmstm);
*pmstm = NULL; *pmstm = NULL;
} }
......
...@@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, ...@@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func,
goto err_free; goto err_free;
} }
err = nouveau_drm_device_init(drm);
if (err)
goto err_put;
platform_set_drvdata(pdev, drm); platform_set_drvdata(pdev, drm);
return drm; return drm;
err_put:
drm_dev_put(drm);
err_free: err_free:
nvkm_device_del(pdevice); nvkm_device_del(pdevice);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment