GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
472 stars 66 forks source link

Add feature to gbm_gralloc and drm_hwcomposer HALs that will search for KMS DRI card #31

Closed rsglobal closed 4 years ago

rsglobal commented 4 years ago

We can not always guarantee that KMS card will always have /dev/dri/card0 path, This path can depend on different factors, e.g. DTS node order, driver compiled as a module or built-in, etc. Both drm_hwcomposer and gbm_gralloc have to always use KMS driver, not GPU.

rsglobal commented 4 years ago

@matviizorin ,

I've just found same algorithm in libkmsxx: https://github.com/tomba/kmsxx/blob/d9d5e44526a3b8065e4ae913032020d0bfd93103/kms%2B%2B/src/card.cpp#L42

So it should save hours of your efforts.

matviizorin commented 4 years ago

@rsglobal,

Thanks a lot, I'll try to implement it in the nearest time

matviizorin commented 4 years ago

I've just created the MR into drm_hwcomposer (MR#108).

matviizorin commented 4 years ago

WIP branch which will be upstream to gbm_gralloc - kms-device.

matviizorin commented 4 years ago

PR to gbm_gralloc has been created (PR#16).

matviizorin commented 4 years ago

The MR#108 was merged.

rsglobal commented 4 years ago

Feature was added into integration branch and successfully tested. @matviizorin , Thank you for contribution.