Modes can be shared across different sized monitors this way. Also caught some missing byteswapping and an incorrect return type.
Add function to keep pointer within valid crtc areas. Finish event delivery and swapping code. Separate configuration from layout changes to send correct events.