-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nouveau allocator driver #16
Open
mvicomoya
wants to merge
10
commits into
cubanismo:master
Choose a base branch
from
mvicomoya:wip/mvicomoya/nouveau-driver
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add nouveau allocator driver #16
mvicomoya
wants to merge
10
commits into
cubanismo:master
from
mvicomoya:wip/mvicomoya/nouveau-driver
Conversation
This file contains 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
mvicomoya
commented
Jun 19, 2018
•
edited
Loading
edited
- A series of refactoring changes to allow multiple allocator drivers to cohexist
- Implementation of an allocator driver based off nouveau
- Test enhancements
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Add the necessary logic to create an allocator allocation backed by a nouveau buffer object. Signed-off-by: Miguel A Vico Moya <[email protected]>
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 <[email protected]>
Add USAGE_BASE_DISPLAY to the list of usages to test in capability_set_ops. Signed-off-by: Miguel A Vico Moya <[email protected]>
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.