diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 25 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 2 |
3 files changed, 18 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 2720ce009664..d48c02a36527 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -242,14 +242,26 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) | |||
242 | if (unlikely(!abi16)) | 242 | if (unlikely(!abi16)) |
243 | return -ENOMEM; | 243 | return -ENOMEM; |
244 | client = nv_client(abi16->client); | 244 | client = nv_client(abi16->client); |
245 | |||
246 | if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0) | ||
247 | return nouveau_abi16_put(abi16, -EINVAL); | ||
248 | |||
249 | device = nv_device(abi16->device); | 245 | device = nv_device(abi16->device); |
250 | imem = nouveau_instmem(device); | 246 | imem = nouveau_instmem(device); |
251 | pfb = nouveau_fb(device); | 247 | pfb = nouveau_fb(device); |
252 | 248 | ||
249 | /* hack to allow channel engine type specification on kepler */ | ||
250 | if (device->card_type >= NV_E0) { | ||
251 | if (init->fb_ctxdma_handle != ~0) | ||
252 | init->fb_ctxdma_handle = NVE0_CHANNEL_IND_ENGINE_GR; | ||
253 | else | ||
254 | init->fb_ctxdma_handle = init->tt_ctxdma_handle; | ||
255 | |||
256 | /* allow flips to be executed if this is a graphics channel */ | ||
257 | init->tt_ctxdma_handle = 0; | ||
258 | if (init->fb_ctxdma_handle == NVE0_CHANNEL_IND_ENGINE_GR) | ||
259 | init->tt_ctxdma_handle = 1; | ||
260 | } | ||
261 | |||
262 | if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0) | ||
263 | return nouveau_abi16_put(abi16, -EINVAL); | ||
264 | |||
253 | /* allocate "abi16 channel" data and make up a handle for it */ | 265 | /* allocate "abi16 channel" data and make up a handle for it */ |
254 | init->channel = ffsll(~abi16->handles); | 266 | init->channel = ffsll(~abi16->handles); |
255 | if (!init->channel--) | 267 | if (!init->channel--) |
@@ -264,11 +276,6 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) | |||
264 | abi16->handles |= (1 << init->channel); | 276 | abi16->handles |= (1 << init->channel); |
265 | 277 | ||
266 | /* create channel object and initialise dma and fence management */ | 278 | /* create channel object and initialise dma and fence management */ |
267 | if (device->card_type >= NV_E0) { | ||
268 | init->fb_ctxdma_handle = NVE0_CHANNEL_IND_ENGINE_GR; | ||
269 | init->tt_ctxdma_handle = 0; | ||
270 | } | ||
271 | |||
272 | ret = nouveau_channel_new(drm, cli, NVDRM_DEVICE, NVDRM_CHAN | | 279 | ret = nouveau_channel_new(drm, cli, NVDRM_DEVICE, NVDRM_CHAN | |
273 | init->channel, init->fb_ctxdma_handle, | 280 | init->channel, init->fb_ctxdma_handle, |
274 | init->tt_ctxdma_handle, &chan->chan); | 281 | init->tt_ctxdma_handle, &chan->chan); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 049c6b23e1d7..1363578bf945 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c | |||
@@ -346,7 +346,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) | |||
346 | /* allocate software object class (used for fences on <= nv05, and | 346 | /* allocate software object class (used for fences on <= nv05, and |
347 | * to signal flip completion), bind it to a subchannel. | 347 | * to signal flip completion), bind it to a subchannel. |
348 | */ | 348 | */ |
349 | if (chan != chan->drm->cechan) { | 349 | if ((device->card_type < NV_E0) || gart /* nve0: want_nvsw */) { |
350 | ret = nouveau_object_new(nv_object(client), chan->handle, | 350 | ret = nouveau_object_new(nv_object(client), chan->handle, |
351 | NvSw, nouveau_abi16_swclass(chan->drm), | 351 | NvSw, nouveau_abi16_swclass(chan->drm), |
352 | NULL, 0, &object); | 352 | NULL, 0, &object); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index f62dbd2733bf..919186c4651b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c | |||
@@ -148,7 +148,7 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
148 | NV_ERROR(drm, "failed to create ce channel, %d\n", ret); | 148 | NV_ERROR(drm, "failed to create ce channel, %d\n", ret); |
149 | 149 | ||
150 | arg0 = NVE0_CHANNEL_IND_ENGINE_GR; | 150 | arg0 = NVE0_CHANNEL_IND_ENGINE_GR; |
151 | arg1 = 0; | 151 | arg1 = 1; |
152 | } else { | 152 | } else { |
153 | arg0 = NvDmaFB; | 153 | arg0 = NvDmaFB; |
154 | arg1 = NvDmaTT; | 154 | arg1 = NvDmaTT; |