Commit 8698080e authored by Dave Airlie's avatar Dave Airlie

Merge branch 'drm-nouveau-fixes-3.9' of...

Merge branch 'drm-nouveau-fixes-3.9' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

Regression fixes and oops fixes for nouveau.

* 'drm-nouveau-fixes-3.9' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv50: use correct tiling methods for m2mf buffer moves
  drm/nouveau: idle channel before releasing notify object
  drm/nouveau: fix regression in vblanking
  drm/nv50: encoder creation failure doesn't mean full init failure
parents f6161aa1 c1b90df2
...@@ -544,13 +544,13 @@ nv50_disp_curs_ofuncs = { ...@@ -544,13 +544,13 @@ nv50_disp_curs_ofuncs = {
static void static void
nv50_disp_base_vblank_enable(struct nouveau_event *event, int head) nv50_disp_base_vblank_enable(struct nouveau_event *event, int head)
{ {
nv_mask(event->priv, 0x61002c, (1 << head), (1 << head)); nv_mask(event->priv, 0x61002c, (4 << head), (4 << head));
} }
static void static void
nv50_disp_base_vblank_disable(struct nouveau_event *event, int head) nv50_disp_base_vblank_disable(struct nouveau_event *event, int head)
{ {
nv_mask(event->priv, 0x61002c, (1 << head), (0 << head)); nv_mask(event->priv, 0x61002c, (4 << head), 0);
} }
static int static int
......
...@@ -116,6 +116,11 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, ...@@ -116,6 +116,11 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16,
{ {
struct nouveau_abi16_ntfy *ntfy, *temp; struct nouveau_abi16_ntfy *ntfy, *temp;
/* wait for all activity to stop before releasing notify object, which
* may be still in use */
if (chan->chan && chan->ntfy)
nouveau_channel_idle(chan->chan);
/* cleanup notifier state */ /* cleanup notifier state */
list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) { list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) {
nouveau_abi16_ntfy_fini(chan, ntfy); nouveau_abi16_ntfy_fini(chan, ntfy);
......
...@@ -801,7 +801,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -801,7 +801,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
stride = 16 * 4; stride = 16 * 4;
height = amount / stride; height = amount / stride;
if (new_mem->mem_type == TTM_PL_VRAM && if (old_mem->mem_type == TTM_PL_VRAM &&
nouveau_bo_tile_layout(nvbo)) { nouveau_bo_tile_layout(nvbo)) {
ret = RING_SPACE(chan, 8); ret = RING_SPACE(chan, 8);
if (ret) if (ret)
...@@ -823,7 +823,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, ...@@ -823,7 +823,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
BEGIN_NV04(chan, NvSubCopy, 0x0200, 1); BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
OUT_RING (chan, 1); OUT_RING (chan, 1);
} }
if (old_mem->mem_type == TTM_PL_VRAM && if (new_mem->mem_type == TTM_PL_VRAM &&
nouveau_bo_tile_layout(nvbo)) { nouveau_bo_tile_layout(nvbo)) {
ret = RING_SPACE(chan, 8); ret = RING_SPACE(chan, 8);
if (ret) if (ret)
......
...@@ -2276,6 +2276,7 @@ nv50_display_create(struct drm_device *dev) ...@@ -2276,6 +2276,7 @@ nv50_display_create(struct drm_device *dev)
NV_WARN(drm, "failed to create encoder %d/%d/%d: %d\n", NV_WARN(drm, "failed to create encoder %d/%d/%d: %d\n",
dcbe->location, dcbe->type, dcbe->location, dcbe->type,
ffs(dcbe->or) - 1, ret); ffs(dcbe->or) - 1, ret);
ret = 0;
} }
} }
......
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