/* * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE.
*/ #include"priv.h"
ret = dma->init(falcon, dma_addr, dmalen, mem_type, sec, &cmd); if (ret) return ret;
dst = mem_base;
src = dma_base; if (len) { while (len >= dmalen) {
dma->xfer(falcon, dst, src - dma_start, cmd);
if (img && nvkm_printk_ok(falcon->owner, falcon->user, NV_DBG_TRACE)) { for (i = 0; i < dmalen; i += 4, mem_base += 4) { constint w = 8, x = (i / 4) % w;
if (x == 0)
printk(KERN_INFO "%s %08x <-", type, mem_base);
printk(KERN_CONT " %08x", *(u32 *)(img + src + i)); if (x == (w - 1) || ((i + 4) == dmalen))
printk(KERN_CONT " <- %08x+%08x", dma_base,
src + i - dma_base - (x * 4)); if (i == (7 * 4))
printk(KERN_CONT " *");
}
}
if (nvkm_msec(falcon->owner->device, 2000, if (dma->done(falcon)) break;
) < 0) return -ETIMEDOUT;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.