-
Notifications
You must be signed in to change notification settings - Fork 158
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
drm/atomic: Update connector prop mapping in reset_state()
, and refactor prop mapping code a bit
#1531
Conversation
If I store some prop handles in my compositor (i.e. GAMMA_LUT) does that mean I need to refresh those at some point too, and when? |
You should remove and re-evaluate them on hotplug, so if you are using smithay-drm-extras on Note this only applies to connector properties, crtcs and planes are static anyhow. |
This is specifically an issue with connectors, which on some cards can be added and removed. I think once a drm object is created the properties it has are static? And I don't know if planes or CRTCs are ever added dynamically... |
Okay I'm not sure I actually store any connector properties, but either way I would store them for each connector as it is connected (and remove that info when it is disconnected). But I do call |
Even though it's type safe, using tuple indexes to access the fields seems unnecessarily confusing. It's generally better to have a named type.
If this has to be in an `RwLock` anyway, it seems unnecessary to clone it, and it can just be shared. (`AtomicDrmDevice` does not use `RwLock` yet, but will if it wants to update the mapping.) I don't expect this to cause problems, though maybe it doesn't help much either. But it makes sense.
On some cards, connectors may have been added dynamically since the mapping was first created. Fixes Smithay#1374.
4ba4256
to
3c08aac
Compare
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 now
Fixes #1374.