mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
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:
committed by
Enrico Weigelt
parent
4dbcbdc478
commit
65ed6145d8
@@ -12,6 +12,7 @@
|
||||
#ifndef _EDID_H_
|
||||
#define _EDID_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#ifndef _X_EXPORT
|
||||
@@ -668,4 +669,12 @@ struct cea_ext_body {
|
||||
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_ */
|
||||
|
||||
@@ -777,3 +777,11 @@ gtf_supported(xf86MonPtr mon)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool xf86Monitor_gtf_supported(xf86MonPtr monitor)
|
||||
{
|
||||
if (!monitor)
|
||||
return false;
|
||||
|
||||
return GTF_SUPPORTED(monitor->features.msc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user