···839839 }840840841841 /* Software copy if the card isn't up and running yet. */842842- if (!dev_priv->channel) {842842+ if (!dev_priv->channel || dev_priv->card_type == NV_C0) {843843 ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem);844844 goto out;845845 }
···11+/*22+ * Copyright 2010 Red Hat Inc.33+ *44+ * Permission is hereby granted, free of charge, to any person obtaining a55+ * copy of this software and associated documentation files (the "Software"),66+ * to deal in the Software without restriction, including without limitation77+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,88+ * and/or sell copies of the Software, and to permit persons to whom the99+ * Software is furnished to do so, subject to the following conditions:1010+ *1111+ * The above copyright notice and this permission notice shall be included in1212+ * all copies or substantial portions of the Software.1313+ *1414+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020+ * OTHER DEALINGS IN THE SOFTWARE.2121+ *2222+ * Authors: Ben Skeggs2323+ */2424+2525+#ifndef __NVC0_GRAPH_H__2626+#define __NVC0_GRAPH_H__2727+2828+#define GPC_MAX 42929+#define TP_MAX 323030+3131+#define ROP_BCAST(r) (0x408800 + (r))3232+#define ROP_UNIT(u,r) (0x410000 + (u) * 0x400 + (r))3333+#define GPC_BCAST(r) (0x418000 + (r))3434+#define GPC_UNIT(t,r) (0x500000 + (t) * 0x8000 + (r))3535+#define TP_UNIT(t,m,r) (0x504000 + (t) * 0x8000 + (m) * 0x800 + (r))3636+3737+struct nvc0_graph_priv {3838+ u8 gpc_nr;3939+ u8 rop_nr;4040+ u8 tp_nr[GPC_MAX];4141+ u8 tp_total;4242+4343+ u32 grctx_size;4444+ u32 *grctx_vals;4545+ struct nouveau_gpuobj *unk4188b4;4646+ struct nouveau_gpuobj *unk4188b8;4747+4848+ u8 magic_not_rop_nr;4949+ u32 magic419bd0;5050+ u32 magic419be4;5151+ u32 magicgpc980[4];5252+ u32 magicgpc918;5353+};5454+5555+struct nvc0_graph_chan {5656+ struct nouveau_gpuobj *grctx;5757+ struct nouveau_gpuobj *unk408004; // 0x418810 too5858+ struct nouveau_gpuobj *unk40800c; // 0x419004 too5959+ struct nouveau_gpuobj *unk418810; // 0x419848 too6060+ struct nouveau_gpuobj *mmio;6161+ int mmio_nr;6262+};6363+6464+int nvc0_grctx_generate(struct nouveau_channel *);6565+6666+#endif