![]() |
|
|||
0001 /* 0002 * Copyright 2007 Dave Airlied 0003 * All Rights Reserved. 0004 * 0005 * Permission is hereby granted, free of charge, to any person obtaining a 0006 * copy of this software and associated documentation files (the "Software"), 0007 * to deal in the Software without restriction, including without limitation 0008 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 0009 * and/or sell copies of the Software, and to permit persons to whom the 0010 * Software is furnished to do so, subject to the following conditions: 0011 * 0012 * The above copyright notice and this permission notice (including the next 0013 * paragraph) shall be included in all copies or substantial portions of the 0014 * Software. 0015 * 0016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0017 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0018 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 0019 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 0020 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 0021 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 0022 * OTHER DEALINGS IN THE SOFTWARE. 0023 */ 0024 /* 0025 * Authors: Dave Airlied <airlied@linux.ie> 0026 * Ben Skeggs <darktama@iinet.net.au> 0027 * Jeremy Kolb <jkolb@brandeis.edu> 0028 */ 0029 #include "nouveau_bo.h" 0030 #include "nouveau_dma.h" 0031 #include "nouveau_mem.h" 0032 0033 #include <nvif/push206e.h> 0034 0035 int 0036 nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo, 0037 struct ttm_resource *old_reg, struct ttm_resource *new_reg) 0038 { 0039 struct nouveau_mem *mem = nouveau_mem(old_reg); 0040 struct nvif_push *push = chan->chan.push; 0041 int ret; 0042 0043 ret = PUSH_WAIT(push, 7); 0044 if (ret) 0045 return ret; 0046 0047 PUSH_NVSQ(push, NV74C1, 0x0304, new_reg->num_pages << PAGE_SHIFT, 0048 0x0308, upper_32_bits(mem->vma[0].addr), 0049 0x030c, lower_32_bits(mem->vma[0].addr), 0050 0x0310, upper_32_bits(mem->vma[1].addr), 0051 0x0314, lower_32_bits(mem->vma[1].addr), 0052 0x0318, 0x00000000 /* MODE_COPY, QUERY_NONE */); 0053 return 0; 0054 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |