RFC: New libxcvt library

0 views
Skip to first unread message

Olivier Fourdan

unread,
Mar 26, 2021, 11:59:02 AM3/26/21
to xorg-devel
Hi all,

Currently. the Xorg Xserver has its own implementation of the VESA CVT standard timing modelines generator in `hw/xfree86/modes/xf86cvt.c`.

That code is placed in its own source file alone because it is also being used by the `cvt` utility.

Because it's part of the Xorg DDX, Xwayland, which is another DDX also has a copy of the same code in `hw/xwayland/xwayland-cvt.c`.

Now with Xwayland being a standalone package, mutter which uses the cvt utility at build time still needs to install `cvt` from Xorg to generate the modes used in Wayland.

Some time ago, discussing with Jonas Adahl on irc, we thought it would be a good idea to have that code and utility part of its own standalone project, to avoid the code duplication and possibly ease contributions.

That was https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142

So I went ahead and did just that, called it “libxcvt” and placed in https://gitlab.freedesktop.org/ofourdan/libxcvt

I also made a merge request to use that code in the Xserver: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637

Can we consider moving “libxcvt” to the xorg/lib namespace in gitlab?

Cheers
Olivier

Keith Packard

unread,
Mar 26, 2021, 12:04:28 PM3/26/21
to Olivier Fourdan, xorg-devel
Olivier Fourdan <ofou...@redhat.com> writes:

> Can we consider moving “libxcvt” to the xorg/lib namespace in gitlab?

Seems like a good plan to me; I've had several requests to add CVT
support to xrandr and haven't done so because it would have involved
pulling in a ton of code or creating a library like this :-)

--
-keith
signature.asc

Walter Harms

unread,
Apr 16, 2021, 6:32:43 AM4/16/21
to Olivier Fourdan, xorg-devel
Hi,
i think it is a good idea.
Can you give a hint how big that lib is ?

Even when the idea is good it is not really helpful to have to many
different libs hanging around. I read Keith Packard was already considering putting that into xrandr, if its not to big i would say it would
be a good idea to collect the monitor related things into one lib (EDID ?).

re,
wh

________________________________________
Von: xorg-devel <xorg-deve...@lists.x.org> im Auftrag von Olivier Fourdan <ofou...@redhat.com>
Gesendet: Freitag, 26. März 2021 16:58
An: xorg-devel
Betreff: RFC: New libxcvt library

WARNUNG: Diese E-Mail kam von außerhalb der Organisation. Klicken Sie nicht auf Links oder öffnen Sie keine Anhänge, es sei denn, Sie kennen den/die Absender*in und wissen, dass der Inhalt sicher ist.
_______________________________________________
xorg-...@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Olivier Fourdan

unread,
Apr 19, 2021, 10:10:45 AM4/19/21
to Walter Harms, xorg-devel
Hi Walter,

On Fri, Apr 16, 2021 at 12:32 PM Walter Harms <wha...@bfs.de> wrote:
i think it is a good idea.
Can you give a hint how big that lib is ?

Right now, it's extremely tiny, the lib is mostly one function taken from the xserver.


Even when the idea is good it is not really helpful to have to many
different libs hanging around.

Well, it's still better than duplicating code within the same project :)
 
I read Keith Packard was already considering putting that into xrandr, if its not to big i would say it would
be a good idea to collect the monitor related things into one lib (EDID ?).

I am completely open to adding more features and fixes to the lib, actually, it was one of the stated goals, the code is in need of TLC and having it in one place should help with that goal.

Cheers
Olivier

Matt Turner

unread,
Jun 12, 2021, 3:37:18 PM6/12/21
to Olivier Fourdan, xorg-devel, Daniel Stone

This is great and will help in packaging mutter and Wayland-only systems.

Can we please move this to the xorg/lib namespace and tag a release?
(Cc'ing daniels for the namespace move)

Thanks!

Reply all
Reply to author
Forward
0 new messages