xfree86: ddc: add xf86Monitor_gtf_supported()

replacement for GTF_SUPPORTED() macro that's not a good API isolation
at all. Drivers should use that function instead for checking whether
the monitor supports GTF.

Should be backported to older releases, too - so drivers don't need
extra per-Xserver-version tweaks.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-02 16:47:03 +01:00
committed by Enrico Weigelt
parent ad08af5ea9
commit 1f66f6076b
2 changed files with 17 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#ifndef _EDID_H_ #ifndef _EDID_H_
#define _EDID_H_ #define _EDID_H_
#include <stdbool.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#ifndef _X_EXPORT #ifndef _X_EXPORT
@@ -668,4 +669,12 @@ struct cea_ext_body {
struct cea_data_block data_collection; struct cea_data_block data_collection;
}; };
/*
* check whether monitor supports Generalized Timing Formula
*
* @param monitor the monitor information structure to check
* @return true if GTF is supported by the monitor
*/
_X_EXPORT bool xf86Monitor_gtf_supported(xf86MonPtr monitor);
#endif /* _EDID_H_ */ #endif /* _EDID_H_ */

View File

@@ -777,3 +777,11 @@ gtf_supported(xf86MonPtr mon)
return FALSE; return FALSE;
} }
bool xf86Monitor_gtf_supported(xf86MonPtr monitor)
{
if (!monitor)
return false;
return GTF_SUPPORTED(monitor->features.msc);
}