Open
Conversation
added 10 commits
June 19, 2018 15:33
Rather than searching for drivers under a single
hardcoded directory, this change modifies
init_drivers() such that it searches under the
following ones:
System:
- /usr/share/liballocator
- /usr/local/share/liballocator
User:
- $HOME/.liballocator
And also allows users to set extra directories by
setting the following environment variable with a
colon-delimited list of paths:
__LIBALLOCATOR_EXTRA_CONF_DIRS
Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
This changes moves the following functions to a new helpers.h header file and makes them static inline functions so they can be used by others (i.e. drivers and tests) without having to link against the allocator library: * free_capability_sets() * serialize_capability_set() * deserialize_capability_set() Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Drivers will want to stick a copy of the given capability set when creating an allocation. This change adds a dup_capability_set() static inline helper. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Add a new utils.h header file with miscellaneous macros and static inline utility functions to be used by tests and drivers. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Adds the infrastructure to build an allocator driver based off nouveau. Current driver implementation is just a bunch of placeholders. The actual logic will be added incrementally with follow-on changes. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Add nouveau_driver_t and nouveau_device_t structures and the required logic to allocate a nouveau allocator device. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Add the code to nouveau_device_get_capabilities() to return a capability set to support a pitch linear memory layout. Note this change also implements nouveau_device_get_assertion_hints() so that we can also expose the allocation maximum size supported. ./capability_set_ops test now runs and succeeds when using the nouveau driver. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Add the necessary logic to create an allocator allocation backed by a nouveau buffer object. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Make the -f|--file option an optional one. If only -d|--drm-file is specified, assume both the drm and the allocator devices are the same (also if both options are specified but both point to the same device node). Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Add USAGE_BASE_DISPLAY to the list of usages to test in capability_set_ops. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.