On Wed, Jul 10, 2013 at 3:28 PM, David Herrmann dh.herrmann@gmail.com wrote:
drm_setup() is called on every first open. I digged through core DRM and noticed that we have a lot of code that cleans up on lastclose and reinitializes on firstopen which is skipped for non-UMS drivers to preserve KMS state if no user keeps DRM node open. I would like to hear a comment in the commit-message which explains why we don't reset "if_version", anymore. Are you sure UMS user-space does not depend on this logic?
I have no idea of UMS, but if that reinitialization on lastclose+firstopen is not relied on, I guess we can remove a lot more code. Just wanted to make sure that this is right.
Yeah, you're right. I've been confused a bit with the need_setup logic and though that's only done once. But for ums drivers this seems to be done every time we restart X.
I think I'll rework this patch here and shovel stuff around some more. E.g. the buf_async stuff can die with drm_fasync, and I think the re-init is better handled in functions called by drm_lastclose. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch