aboutsummaryrefslogtreecommitdiffstats
path: root/community/xf86-video-s3virge/check-max-value.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-10-22 06:12:38 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-11-30 17:14:33 +0000
commit68d73a573f544218f1d53e82851ff7f54f25e970 (patch)
tree7ec4c7e78c60c2e684646f72d94374cf6b157dda /community/xf86-video-s3virge/check-max-value.patch
parent086c2ac5455da89a5a16524583caebdad4407541 (diff)
downloadaports-68d73a573f544218f1d53e82851ff7f54f25e970.tar.gz
aports-68d73a573f544218f1d53e82851ff7f54f25e970.tar.bz2
aports-68d73a573f544218f1d53e82851ff7f54f25e970.tar.xz
community/xf86-video-s3virge: move from main
Diffstat (limited to 'community/xf86-video-s3virge/check-max-value.patch')
-rw-r--r--community/xf86-video-s3virge/check-max-value.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/community/xf86-video-s3virge/check-max-value.patch b/community/xf86-video-s3virge/check-max-value.patch
new file mode 100644
index 0000000000..0573a05c9c
--- /dev/null
+++ b/community/xf86-video-s3virge/check-max-value.patch
@@ -0,0 +1,24 @@
+--- a/src/s3v_driver.c
++++ b/src/s3v_driver.c
+@@ -1212,8 +1212,6 @@
+ /* todo - The virge limit is 2048 vertical & horizontal */
+ /* pixels, not clock register settings. */
+ /* true for all ViRGE? */
+- pScrn->maxHValue = 2048;
+- pScrn->maxVValue = 2048;
+
+ /* Lower depths default to config file */
+ pScrn->virtualX = pScrn->display->virtualX;
+@@ -2566,6 +2564,12 @@
+ if ((pScrn->bitsPerPixel + 7)/8 * mode->HDisplay > 4095)
+ return MODE_VIRTUAL_X;
+
++ if (mode->HTotal > 2048)
++ return MODE_BAD_HVALUE;
++
++ if (mode->VTotal > 2048)
++ return MODE_BAD_VVALUE;
++
+ return MODE_OK;
+ }
+