Skip to content

Commit

Permalink
Refactor driver loading code
Browse files Browse the repository at this point in the history
The scenarios we need to support become complicated. It's time for us to
reorganize the code and make it clearer.

* Use a bitmap and a vector to manage all known devices.
* Extract driver/device selection logic into functions.
* Merge multiple feature detection functions into a single
  is_feature_support function.
* Remove redundant drv_init function. We don't need to separate create
  and initialization of device driver now, and the separation itself
  could cause resource management issue.
* Introduce new function to select driver.

Tracked-On: OAM-126702
Signed-off-by: Weifeng Liu <[email protected]>
  • Loading branch information
phreer committed Nov 7, 2024
1 parent e708d18 commit 63622e0
Show file tree
Hide file tree
Showing 13 changed files with 672 additions and 276 deletions.
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ filegroup {
"virtgpu.c",
"virtgpu_cross_domain.c",
"virtgpu_virgl.c",
"intel_device.c",
],
}

Expand Down
Loading

0 comments on commit 63622e0

Please sign in to comment.