-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 headless modesetting for linux gbm #14125
Conversation
std::vector<RESOLUTION_INFO> COffScreenModeSetting::GetModes() | ||
{ | ||
std::vector<RESOLUTION_INFO> resolutions; | ||
RESOLUTION_INFO res; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@lrusak updated to your version. |
|
RESOLUTION_INFO COffScreenModeSetting::GetCurrentMode() | ||
{ | ||
RESOLUTION_INFO res; | ||
res.iScreen = 0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
thx @Rechi |
@lrusak build is OK now. |
res.iSubtitles = static_cast<int>(0.965 * res.iHeight); | ||
res.fPixelRatio = 1.0f; | ||
res.bFullScreen = true; | ||
res.strId = std::to_string(0); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This adds a new IModeSettingBase interface that is implemented by the DRMUtils class for the standard drm modesetting implementations. Furthermore the new OffScreenModeSetting implementation acts as sort of a dummy modesetting handler.
OK I've squashed all of them as they were fixups, will merge once jenkins is happy. |
thanks @a1rwulf !!!! |
@@ -0,0 +1,42 @@ | |||
#include "OffScreenModeSetting.h" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This is a rework of my headless/hotplug proof of concept for linux gbm.
Description
In order to run kodi in headless mode I've extended the modesetting initialization.
The order of init tries is now as follows:
Motivation and Context
My plan is to detect hdmi connects/disconnects and reinit on the fly, which is actually
meant to be a userspace hotplug implementation.
Furthermore this allows you to run kodi without a screen, if you set audio to analog you
can for example control kodi via kore and use it as a music player.
How Has This Been Tested
Tested headless music playback and normal video playback on linux gbm (Intel NUC).
Types of change
Checklist:
@lrusak or @Kwiboo you may give it a shot on other gbm devices - however the DRMPrimeRenderer will fail hard if hdmi is not attached and you try to play a movie.