/** * struct host1x_bo_cache - host1x buffer object cache * @mappings: list of mappings * @lock: synchronizes accesses to the list of mappings * * Note that entries are not periodically evicted from this cache and instead need to be * explicitly released. This is used primarily for DRM/KMS where the cache's reference is * released when the last reference to a buffer object represented by a mapping in this * cache is dropped.
*/ struct host1x_bo_cache { struct list_head mappings; struct mutex lock;
};
staticinlinevoid host1x_bo_cache_destroy(struct host1x_bo_cache *cache)
{ /* XXX warn if not empty? */
mutex_destroy(&cache->lock);
}
/** * struct host1x_client_ops - host1x client operations * @early_init: host1x client early initialization code * @init: host1x client initialization code * @exit: host1x client tear down code * @late_exit: host1x client late tear down code * @suspend: host1x client suspend code * @resume: host1x client resume code
*/ struct host1x_client_ops { int (*early_init)(struct host1x_client *client); int (*init)(struct host1x_client *client); int (*exit)(struct host1x_client *client); int (*late_exit)(struct host1x_client *client); int (*suspend)(struct host1x_client *client); int (*resume)(struct host1x_client *client);
};
/** * struct host1x_client - host1x client structure * @list: list node for the host1x client * @host: pointer to struct device representing the host1x controller * @dev: pointer to struct device backing this host1x client * @group: IOMMU group that this client is a member of * @ops: host1x client operations * @class: host1x class represented by this client * @channel: host1x channel associated with this client * @syncpts: array of syncpoints requested for this client * @num_syncpts: number of syncpoints requested for this client * @parent: pointer to parent structure * @usecount: reference count for this structure * @lock: mutex for mutually exclusive concurrency * @cache: host1x buffer object cache
*/ struct host1x_client { struct list_head list; struct device *host; struct device *dev; struct iommu_group *group;
/* Check if register is marked as an address reg */ int (*is_addr_reg)(struct device *dev, u32 class, u32 reg);
/* Check if class belongs to the unit */ int (*is_valid_class)(u32 class);
/* Request a SETCLASS to this class */
u32 class;
/* Add a channel wait for previous ops to complete */ bool serialize;
/* Fast-forward syncpoint increments on job timeout */ bool syncpt_recovery;
/* Callback called when job is freed */ void (*release)(struct host1x_job *job); void *user_data;
/* Whether host1x-side firewall should be ran for this job or not */ bool enable_firewall;
/* Options for configuring engine data stream ID */ /* Context device to use for job */ struct host1x_memory_context *memory_context; /* Stream ID to use if context isolation is disabled (!memory_context) */
u32 engine_fallback_streamid; /* Engine offset to program stream ID to */
u32 engine_streamid_offset;
};
/** * struct host1x_driver - host1x logical device driver * @driver: core driver * @subdevs: table of OF device IDs matching subdevices for this driver * @list: list node for the driver * @probe: called when the host1x logical device is probed * @remove: called when the host1x logical device is removed * @shutdown: called when the host1x logical device is shut down
*/ struct host1x_driver { struct device_driver driver;
int __host1x_client_register(struct host1x_client *client);
/* * Note that this wrapper calls __host1x_client_init() for compatibility * with existing callers. Callers that want to separately initialize and * register a host1x client must first initialize using either of the * __host1x_client_init() or host1x_client_init() functions and then use * the low-level __host1x_client_register() function to avoid the client * getting reinitialized.
*/ #define host1x_client_register(client) \
({ \ staticstruct lock_class_key __key; \
__host1x_client_init(client, &__key); \
__host1x_client_register(client); \
})
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.