-
Notifications
You must be signed in to change notification settings - Fork 104
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
Don't use the same crtc for multiple outputs in a group #3247
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3247 +/- ##
========================================
Coverage 77.81% 77.82%
========================================
Files 1068 1058 -10
Lines 67571 67175 -396
========================================
- Hits 52583 52281 -302
+ Misses 14988 14894 -94 ☔ View full report in Codecov by Sentry. |
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.
A few questions!
@@ -109,6 +109,19 @@ std::tuple<mgk::DRMModeCrtcUPtr, int> find_crtc_and_index_for_connector( | |||
|
|||
auto const encoders = connector_available_encoders(resources, connector.get()); | |||
|
|||
// This workaround feels like overkill, but I've not fould a better place to implement a fix... |
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.
Minor misspelling: fould
-> found
if (*pcrtc_id == get<0>(skipped_crtc)->crtc_id) | ||
{ | ||
recent_crtc_ids.erase(pcrtc_id); | ||
recent_crtc_ids.push_back(get<0>(skipped_crtc)->crtc_id); |
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.
Should we also remove this from skipped_crtcs
?
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.
No
// | ||
// Using "thread_local" as each group of outputs is accessed on its own thread. | ||
thread_local std::list<u_int32_t> recent_crtc_ids; | ||
std::list<std::tuple<mgk::DRMModeCrtcUPtr, int>> skipped_crtcs; |
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.
Why isn't skipped_crtcs
also thread_local
?
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.
Because it doesn't have static duration
Not needed (yet). C.f. #3248 |
Fixes: #3238