Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm nouveau fixes from Dave Airlie:
 "This is just nouveau fixes from Ben, one fixes a nasty oops that some
  Fedora people have been seeing, so I'd like to get it out of the way."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  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
This commit is contained in:
Linus Torvalds 2013-03-12 10:37:14 -07:00
commit c39ac49f23
4 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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,
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)

View File

@ -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;
} }
} }