Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Tegra host1x Channel
0004  *
0005  * Copyright (c) 2010-2013, NVIDIA Corporation.
0006  */
0007 
0008 #ifndef __HOST1X_CHANNEL_H
0009 #define __HOST1X_CHANNEL_H
0010 
0011 #include <linux/io.h>
0012 #include <linux/kref.h>
0013 
0014 #include "cdma.h"
0015 
0016 struct host1x;
0017 struct host1x_channel;
0018 
0019 struct host1x_channel_list {
0020     struct host1x_channel *channels;
0021     unsigned long *allocated_channels;
0022 };
0023 
0024 struct host1x_channel {
0025     struct kref refcount;
0026     unsigned int id;
0027     struct mutex submitlock;
0028     void __iomem *regs;
0029     struct host1x_client *client;
0030     struct device *dev;
0031     struct host1x_cdma cdma;
0032 };
0033 
0034 /* channel list operations */
0035 int host1x_channel_list_init(struct host1x_channel_list *chlist,
0036                  unsigned int num_channels);
0037 void host1x_channel_list_free(struct host1x_channel_list *chlist);
0038 struct host1x_channel *host1x_channel_get_index(struct host1x *host,
0039                         unsigned int index);
0040 
0041 #endif