channel.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Tegra host1x Channel
  3. *
  4. * Copyright (c) 2010-2013, NVIDIA Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef __HOST1X_CHANNEL_H
  19. #define __HOST1X_CHANNEL_H
  20. #include <linux/io.h>
  21. #include "cdma.h"
  22. struct host1x;
  23. struct host1x_channel {
  24. struct list_head list;
  25. unsigned int refcount;
  26. unsigned int id;
  27. struct mutex reflock;
  28. struct mutex submitlock;
  29. void __iomem *regs;
  30. struct device *dev;
  31. struct host1x_cdma cdma;
  32. };
  33. /* channel list operations */
  34. int host1x_channel_list_init(struct host1x *host);
  35. #define host1x_for_each_channel(host, channel) \
  36. list_for_each_entry(channel, &host->chlist.list, list)
  37. #endif