Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

AlanGriffiths
Copy link
Collaborator

Fixes: #3238

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (120d2cc) 77.81% compared to head (7a8e820) 77.82%.
Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mattkae mattkae left a 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...
Copy link
Contributor

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);
Copy link
Contributor

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?

Copy link
Collaborator Author

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;
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@AlanGriffiths
Copy link
Collaborator Author

Not needed (yet). C.f. #3248

@AlanGriffiths AlanGriffiths deleted the better-crtc-finding branch August 14, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on wake when outputs have the same geometry
2 participants