diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-12-15 23:28:55 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-12-16 02:05:57 -0500 |
commit | 0735f62e116fae1e4f36237a97de28e8a56b4c2c (patch) | |
tree | 3c43ff86368448a041fecd5c8841de3e8230a003 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 3c8868d3dbba5110bd43b49879f12d1a6b2a28ca (diff) |
drm/nouveau: prevent all channel creation if accel not available
Previously, if there was no firmware available, the DRM would just
disable channel creation from userspace, but still use a single
channel for its own purposes.
With a bit of care it should actually be possible to do this, due
to the DRM's very limited use of the engine. It currently doesn't
work correctly however, resulting in corrupted fbcon and hangs on
a number of cards.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index e9f01906c52e..2f5d47021106 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -461,11 +461,8 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, int no_wait, | |||
461 | int ret; | 461 | int ret; |
462 | 462 | ||
463 | chan = nvbo->channel; | 463 | chan = nvbo->channel; |
464 | if (!chan || nvbo->tile_flags || nvbo->no_vm) { | 464 | if (!chan || nvbo->tile_flags || nvbo->no_vm) |
465 | chan = dev_priv->channel; | 465 | chan = dev_priv->channel; |
466 | if (!chan) | ||
467 | return -EINVAL; | ||
468 | } | ||
469 | 466 | ||
470 | src_offset = old_mem->mm_node->start << PAGE_SHIFT; | 467 | src_offset = old_mem->mm_node->start << PAGE_SHIFT; |
471 | dst_offset = new_mem->mm_node->start << PAGE_SHIFT; | 468 | dst_offset = new_mem->mm_node->start << PAGE_SHIFT; |
@@ -631,7 +628,8 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr, | |||
631 | return ret; | 628 | return ret; |
632 | } | 629 | } |
633 | 630 | ||
634 | if (dev_priv->init_state != NOUVEAU_CARD_INIT_DONE) | 631 | if (dev_priv->init_state != NOUVEAU_CARD_INIT_DONE || |
632 | !dev_priv->channel) | ||
635 | return ttm_bo_move_memcpy(bo, evict, no_wait, new_mem); | 633 | return ttm_bo_move_memcpy(bo, evict, no_wait, new_mem); |
636 | 634 | ||
637 | if (old_mem->mem_type == TTM_PL_SYSTEM && !bo->ttm) { | 635 | if (old_mem->mem_type == TTM_PL_SYSTEM && !bo->ttm) { |