Skip to content
Commits on Source (7)
......@@ -18,11 +18,13 @@ include:
file:
- '/templates/ci-fairy.yml'
- '/templates/fedora.yml'
- template: Security/SAST.gitlab-ci.yml
stages:
- sanity check
- prep
- build
- test
variables:
FDO_UPSTREAM_REPO: xorg/lib/libxcvt
......@@ -91,7 +93,7 @@ check-merge-request:
.fedora.34:
variables:
FDO_DISTRIBUTION_VERSION: '34'
FDO_DISTRIBUTION_TAG: '2021-07-26.0'
FDO_DISTRIBUTION_TAG: '2022-08-03.0'
prep-fedora-34:
extends:
......
......@@ -22,11 +22,13 @@ include:
{% for d in distributions %}
- '/templates/{{d.name}}.yml'
{% endfor %}
- template: Security/SAST.gitlab-ci.yml
stages:
- sanity check
- prep
- build
- test
variables:
FDO_UPSTREAM_REPO: xorg/lib/libxcvt
......
.default_tag: &default_tag '2021-07-26.0'
.default_tag: &default_tag '2022-08-03.0'
distributions:
- name: fedora
......
......@@ -11,7 +11,7 @@ replacement to the version provided by the `Xorg` server.
An example output is:
```
$ $ cvt --verbose 1920 1200 75
$ cvt --verbose 1920 1200 75
# 1920x1200 74.93 Hz (CVT 2.30MA) hsync: 94.04 kHz; pclk: 245.25 MHz
Modeline "1920x1200_75.00" 245.25 1920 2064 2264 2608 1200 1203 1209 1255 -hsync +vsync
```
......
......@@ -30,7 +30,7 @@
#include <libxcvt/libxcvt.h>
bool
static bool
cvt_is_standard(int hdisplay, int vdisplay, float vrefresh, bool reduced, bool verbose)
{
bool is_cvt = true;
......
......@@ -79,8 +79,8 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced,
/* 2) character cell horizontal granularity (pixels) - default 8 */
#define CVT_H_GRANULARITY 8
/* 4) Minimum vertical porch (lines) - default 3 */
#define CVT_MIN_V_PORCH 3
/* 4) Minimum vertical front porch (lines) - default 3 */
#define CVT_MIN_V_PORCH_RND 3
/* 4) Minimum number of vertical back porch lines - default 6 */
#define CVT_MIN_V_BPORCH 6
......@@ -161,16 +161,16 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced,
float hblank_percentage;
int vsync_and_back_porch, vback_porch;
int hblank;
int hblank, hsync_w;
/* 8. Estimated Horizontal period */
hperiod = ((float) (1000000.0 / vfield_rate - CVT_MIN_VSYNC_BP)) /
(vdisplay_rnd + 2 * vmargin + CVT_MIN_V_PORCH + interlace);
(vdisplay_rnd + 2 * vmargin + CVT_MIN_V_PORCH_RND + interlace);
/* 9. Find number of lines in sync + backporch */
if (((int) (CVT_MIN_VSYNC_BP / hperiod) + 1) <
(vsync + CVT_MIN_V_PORCH))
vsync_and_back_porch = vsync + CVT_MIN_V_PORCH;
(vsync + CVT_MIN_V_BPORCH))
vsync_and_back_porch = vsync + CVT_MIN_V_BPORCH;
else
vsync_and_back_porch = (int) (CVT_MIN_VSYNC_BP / hperiod) + 1;
......@@ -181,7 +181,7 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced,
/* 11. Find total number of lines in vertical field */
mode_info->vtotal =
vdisplay_rnd + 2 * vmargin + vsync_and_back_porch + interlace +
CVT_MIN_V_PORCH;
CVT_MIN_V_PORCH_RND;
/* 5) Definition of Horizontal blanking time limitation */
/* Gradient (%/kHz) - default 600 */
......@@ -216,13 +216,12 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced,
/* Fill in HSync values */
mode_info->hsync_end = mode_info->hdisplay + hblank / 2;
mode_info->hsync_start = mode_info->hsync_end -
(mode_info->htotal * CVT_HSYNC_PERCENTAGE) / 100;
mode_info->hsync_start += CVT_H_GRANULARITY -
mode_info->hsync_start % CVT_H_GRANULARITY;
hsync_w = (mode_info->htotal * CVT_HSYNC_PERCENTAGE) / 100;
hsync_w -= hsync_w % CVT_H_GRANULARITY;
mode_info->hsync_start = mode_info->hsync_end - hsync_w;
/* Fill in vsync values */
mode_info->vsync_start = mode_info->vdisplay + CVT_MIN_V_PORCH;
mode_info->vsync_start = mode_info->vdisplay + CVT_MIN_V_PORCH_RND;
mode_info->vsync_end = mode_info->vsync_start + vsync;
}
......
project('libxcvt', 'c',
version: '0.1.2',
version: '0.1.3',
meson_version: '>= 0.40.0',
default_options: ['warning_level=1',
'buildtype=debugoptimized'])
......