summaryrefslogtreecommitdiff
path: root/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'channels.cpp')
-rw-r--r--channels.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/channels.cpp b/channels.cpp
index b0716ad..c1160e3 100644
--- a/channels.cpp
+++ b/channels.cpp
@@ -5,14 +5,19 @@ int main(int argc, char** argv)
{
unique_ptr<nv_device> dev(nv_device::open_default());
+ unsigned chans = 0;
for(unsigned i = 0; i < dev->channels; ++i) {
- if(i)
+ shared_ptr<nv_hwchannel> hwchan = dev->hwchannel(i);
+ if(!hwchan)
+ continue;
+ if(chans)
printf("\n");
printf("Channel %i\n", i);
- printf(" enabled = %i\n", dev->is_channel_enabled(i));
- printf(" dma = %08x\n", dev->ramfc->fc[i]->rd32(dev->ramfc->fc_fifo) << 4);
- printf(" get = %08x\n", dev->rd_get(i));
- printf(" put = %08x\n", dev->rd_put(i));
+ printf("\tenabled = %i\n", hwchan->enabled());
+ printf("\tdma = %08x\n", hwchan->rd_dma());
+ printf("\tget = %08x\n", hwchan->rd_get());
+ printf("\tput = %08x\n", hwchan->rd_put());
+ ++chans;
}
return 0;
}