Fun with DRM and RandR

It’s been a while since my last post and it is long overdue.

Some of you may have noticed a lot of changes in the Ecore_Drm library lately. These changes are all part of a master plan to get RandR support working for Enlightenment so that users can configure their monitors when running via drm in a Wayland-Only environment.

So, what has been going on ?? Well, I’ve been knee deep in DRM & RandR hell basically 🙂 Hell you ask ? Why yes ! For anyone who has never worked with the libdrm API, it is not a direct one-to-one translation when trying to implement RandR support and the libdrm API has about Zero documentation. This makes finding the proper libdrm functions to perform a RandR function Very difficult.

As an example, there is no libdrm API function for rotation support on a given output/crtc. Rotation is basically Not supported on a per-output/per-crtc basis. The only way to actually rotate something using libdrm is via rotating the hardware Plane. This took ages to find and figure out mostly due to the extreme lack of documentation.

You may be asking “Ok, so does this mean I can use the Enlightenment RandR dialog to configure my screens now?”. The short answer is: partially. Using the dialog, there is support now for listing the available outputs, their available modes, for enabling/disabling a given output, and for changing the mode of an output. It should be noted tho that there are some “gotchas” involved with this. Due to the nature of the way Enlightenment creates a giant Ecore_Evas to spread across both outputs, any resolution that you set on One output MUST be set on any other outputs also. This means that if you configure One output to be 1600×900, then all other outputs MUST be set at that same resolution. This is “hopefully” only a temporary limitation as more things are flushed out in the backend Ecore_Drm code. It should also be noted that Rotation is not possible just yet. Having only recently figured out that rotation only works with Planes in libdrm, I have yet to implement Plane support in Ecore_Drm. This is currently “in progress” and I am hoping to land it before I leave for vacation.

There is actually some good news to report tho 🙂 For those who have tested/tried running Enlightenment Wayland-Only (via drm), you will be happy to hear that this week I have GREATLY improved the rendering speed of the Evas Drm engine. This means that when running Enlightenment Wayland-Only, you will find that the rendering and interaction with dialogs is MUCH faster & smoother now. This provides a much more pleasant experience when testing things.

Advertisements

Join the flame war

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s