338 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
27d864d830 replace obsolete "pointer" typedef by plain void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 20:28:51 +01:00
Enrico Weigelt, metux IT consult
c382d68230 drop obsolete compat macros
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-02 16:34:20 +01:00
Enrico Weigelt, metux IT consult
0276188501 .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 18:19:27 +01:00
Enrico Weigelt, metux IT consult
70b8b5726f .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-28 16:58:22 +01:00
Enrico Weigelt, metux IT consult
7684278e2b .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-27 14:35:47 +01:00
Enrico Weigelt, metux IT consult
2942c22bb0 configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:16:52 +01:00
Enrico Weigelt, metux IT consult
4e469ef015 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-siliconmotion-25.0.0
2025-12-18 19:18:58 +01:00
Enrico Weigelt, metux IT consult
5eaa1b059b configure.ac: tiny formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:38:04 +01:00
Enrico Weigelt, metux IT consult
8ea8d73782 drop hacks for ancient pre-libpciaccess Xservers
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 16:13:49 +01:00
Enrico Weigelt, metux IT consult
796e3b3309 drop obsolete #ifdef XFree86LOADER
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:47:56 +01:00
Enrico Weigelt, metux IT consult
117638016d configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:29:02 +01:00
Enrico Weigelt, metux IT consult
e170f62042 drop support for ancient pre-7.1 xextproto
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:08:35 +01:00
Enrico Weigelt, metux IT consult
e91c3dfb9a drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:55:08 +01:00
Enrico Weigelt, metux IT consult
f3d13af280 drop obsolete #ifdef HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:07:07 +01:00
Enrico Weigelt, metux IT consult
9636acac9e release 1.7.11
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-siliconmotion-1.7.11
2025-12-16 15:29:07 +01:00
Enrico Weigelt, metux IT consult
190ff1a82d README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:22:34 +01:00
Alan Coopersmith
1d74b8072e Avoid leaking crtcPriv memory if xf86CrtcCreate fails
Reported by Oracle Parfait 16.2 static analyzer:

Error: Memory leak
   Memory leak [memory-leak]:
      Memory leak of pointer crtcPriv allocated with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)
        at line 652 of driver/xf86-video-siliconmotion/src/smi501_crtc.c in function 'SMI501_CrtcPreInit'.
        calloc called at line 35 of xserver/os/alloc.c in function 'XNFcallocarray'
        Allocated value returned to caller at line 39
        XNFcallocarray called at line 238 of driver/xf86-video-siliconmotion/src/smi_crtc.c in function 'SMI_CrtcFuncsInit_base'
          crtcPriv allocated at line 633 of driver/xf86-video-siliconmotion/src/smi501_crtc.c in function 'SMI501_CrtcPreInit' with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)

   Memory leak [memory-leak]:
      Memory leak of pointer crtcPriv allocated with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)
        at line 672 of driver/xf86-video-siliconmotion/src/smi501_crtc.c in function 'SMI501_CrtcPreInit'.
        calloc called at line 35 of xserver/os/alloc.c in function 'XNFcallocarray'
        Allocated value returned to caller at line 39
        XNFcallocarray called at line 238 of driver/xf86-video-siliconmotion/src/smi_crtc.c in function 'SMI_CrtcFuncsInit_base'
          crtcPriv allocated at line 657 of driver/xf86-video-siliconmotion/src/smi501_crtc.c in function 'SMI501_CrtcPreInit' with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)

Error: Memory leak
   Memory leak [memory-leak]:
      Memory leak of pointer crtcPriv allocated with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)
        at line 946 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit'.
        calloc called at line 35 of xserver/os/alloc.c in function 'XNFcallocarray'
        Allocated value returned to caller at line 39
        XNFcallocarray called at line 238 of driver/xf86-video-siliconmotion/src/smi_crtc.c in function 'SMI_CrtcFuncsInit_base'
          crtcPriv allocated at line 923 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit' with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)

   Memory leak [memory-leak]:
      Memory leak of pointer crtcPriv allocated with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)
        at line 983 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit'.
        calloc called at line 35 of xserver/os/alloc.c in function 'XNFcallocarray'
        Allocated value returned to caller at line 39
        XNFcallocarray called at line 238 of driver/xf86-video-siliconmotion/src/smi_crtc.c in function 'SMI_CrtcFuncsInit_base'
          crtcPriv allocated at line 952 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit' with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)

   Memory leak [memory-leak]:
      Memory leak of pointer crtcPriv allocated with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)
        at line 997 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit'.
        calloc called at line 35 of xserver/os/alloc.c in function 'XNFcallocarray'
        Allocated value returned to caller at line 39
        XNFcallocarray called at line 238 of driver/xf86-video-siliconmotion/src/smi_crtc.c in function 'SMI_CrtcFuncsInit_base'
          crtcPriv allocated at line 988 of driver/xf86-video-siliconmotion/src/smilynx_crtc.c in function 'SMILynx_CrtcPreInit' with SMI_CrtcFuncsInit_base(&crtcFuncs, &crtcPriv)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/12>
2025-12-16 10:34:46 +01:00
Alan Coopersmith
f39c4d7574 Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/11>
2025-12-16 10:34:39 +01:00
Enrico Weigelt, metux IT consult
6b3aec8351 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 19:14:12 +01:00
b-aaz
fc65efd2c2 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
xlibre-xf86-video-siliconmotion-1.7.10.2
2025-07-29 18:54:58 +02:00
Enrico Weigelt, metux IT consult
fee9673b84 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 17:56:17 +02:00
Alan Coopersmith
25b624c756 Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/10>
2025-07-09 19:22:04 +02:00
callmetango
ec1ff5dbff .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:04:20 +02:00
Enrico Weigelt, metux IT consult
7a78953884 smi_video: define _GNU_SOURCE for asprintf()
On glibc, the _GNU_SOURCE symbol needs to be defined in order to get
asprintf() defined.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-siliconmotion-1.7.10.1
2025-05-27 14:44:01 +02:00
Enrico Weigelt, metux IT consult
984dfb07d5 drop some dead code
We still have a bunch of code that's ifdef'ed-out, so probably not needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-27 14:42:17 +02:00
Enrico Weigelt, metux IT consult
d54b329188 drop obsolete compat macros
These aren't really needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-27 14:42:17 +02:00
Enrico Weigelt, metux IT consult
3a3cf9d7d8 drop compat with ancient xserver
Relying on >= 1.18, thus videodrv abi >= 20.0

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-27 14:42:17 +02:00
Alan Coopersmith
2af1096f00 Handle 3 -Wmissing-variable-declarations warnings
Reported by clang 19.1.7:

smi_exa.c:201:7: warning: no previous extern declaration for non-static
 variable 'SMI_BltRop' [-Wmissing-variable-declarations]
  201 | CARD8 SMI_BltRop[16] =  /* table stolen from KAA */
      |       ^

smi_exa.c:347:7: warning: no previous extern declaration for non-static
 variable 'SMI_SolidRop' [-Wmissing-variable-declarations]
  347 | CARD8 SMI_SolidRop[16] =        /* table stolen from KAA */
      |       ^

smi_driver.c:101:5: warning: no previous extern declaration for non-static
 variable 'gSMIEntityIndex' [-Wmissing-variable-declarations]
  101 | int gSMIEntityIndex = -1;
      |     ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Alan Coopersmith
523f670b38 SMI501_OutputDPMS_lcd: Fix -Wimplicit-fallthrough warning
Reported by clang 19.1.7:

smi501_output.c:52:5: warning: unannotated fall-through between switch labels
 [-Wimplicit-fallthrough]
   52 |     case DPMSModeStandby:
      |     ^
smi501_output.c:52:5: note: insert 'break;' to avoid fall-through
   52 |     case DPMSModeStandby:
      |     ^
      |     break;

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Alan Coopersmith
70ac2f1c41 SMI_DisplayVideo0501_CSC: Handle -Wshift-sign-overflow warnings
Reported by clang 19.1.7:

smi_video.c:1836:14: warning: signed shift result (0x80000000) sets the
 sign bit of the shift expression's type ('int') and becomes negative
 [-Wshift-sign-overflow]
 1836 |     csc = (1 << 31) | (1 << 25);
      |            ~ ^  ~~

smi_video.c:1897:35: warning: signed shift result (0x80000000) sets the
 sign bit of the shift expression's type ('int') and becomes negative
 [-Wshift-sign-overflow]
 1897 |         while (READ_DPR(pSmi, 0xfc) & (1 << 31))
      |                                        ~ ^  ~~

smi_video.c:1901:35: warning: signed shift result (0x80000000) sets the
 sign bit of the shift expression's type ('int') and becomes negative
 [-Wshift-sign-overflow]
 1901 |         while (READ_DPR(pSmi, 0xfc) & (1 << 31))
      |                                        ~ ^  ~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Alan Coopersmith
b0846c0d8f Handle -Wconditional-uninitialized warning
Reported by clang 19.1.7:

smi_video.c:1629:5: warning: variable 'crtc' may be uninitialized when
 used here [-Wconditional-uninitialized]
 1629 |         if(crtc == crtcConf->crtc[0])
      |            ^~~~
smi_video.c:1493:21: note: initialize the variable 'crtc' to silence this
 warning
 1493 |     xf86CrtcPtr crtc;
      |                     ^
      |                      = NULL

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Alan Coopersmith
14913de4d9 smi_video.c: Removed unused macro ABS()
Reported by clang 19.1.7:

smi_video.c:67:9: warning: macro is not used [-Wunused-macros]
   67 | #define ABS(n) (((n) < 0) ? -(n) : (n))
      |         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Alan Coopersmith
63c44903e5 Clear up -Wsingle-bit-bitfield-constant-conversion warnings
Gets rid of 21 warnings from clang 19.1.7 of the form:

smi_501.c:191:25: warning: implicit truncation from 'int' to a
 one-bit wide bit-field changes value from 1 to -1
 [-Wsingle-bit-bitfield-constant-conversion]
  191 |     mode->gate.f.engine = 1;
      |                         ^ ~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/9>
2025-04-13 01:17:20 +00:00
Enrico Weigelt, metux IT consult
ad54a83d36 use asprintf() instead of Xasprintf()
All our supported platforms should have asprintf(), so we don't need
the Xserver's own implementation anymore.

It's one of two drivers blocking removal of this function from server ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/8>
2025-04-12 18:11:11 -07:00
Enrico Weigelt, metux IT consult
4de8913e6f drop obsolete check for REGION_NULL
Since we're relying on at least xserver 1.18, we know that symbol exists.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/6>
2024-05-22 18:41:10 -07:00
Enrico Weigelt, metux IT consult
f494e95294 drop support for ancient xserver versions
We're relying on at least 1.18 now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/6>
2024-05-22 18:41:10 -07:00
Alan Coopersmith
8f53239ad7 Raise minimum supported Xserver version to 1.18 (ABI_VIDEODRV_VERSION 20.0)
Already effectively required by use of XNFcallocarray() introduced in
xorg/xserver@b96dc999 - xserver-1.18.0, released in Nov. 2015.

Allows dropping remnants of code for XAA and pre-pciaccess X servers

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/7>
2024-05-18 16:03:41 -07:00
Enrico Weigelt, metux IT consult
0d6cd74523 use XNFcallocarray() instead of xnfcalloc macro
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/5>
2024-05-08 16:37:46 +02:00
Alan Coopersmith
6bb016cbec xf86-video-siliconmotion 1.7.10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-video-siliconmotion-1.7.10
2023-09-27 17:57:10 -07:00
Alan Coopersmith
6f3c8acd07 gitlab CI: ensure libtool is installed in build container
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-26 18:20:52 -07:00
Alan Coopersmith
1eace80407 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:14:16 -08:00
Alan Coopersmith
f3e48a4a04 Replace malloc()+memset() with calloc()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-15 09:22:36 -08:00
Alan Coopersmith
343b595d28 Replace malloc()+snprintf() with Xasprintf()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-15 09:13:22 -08:00
Alan Coopersmith
8cddfb1205 Quiet -Wempty-body warning
smi_video.c: In function ‘SetAttrSAA7111’:
smi_video.c:802:33: warning: suggest braces around empty body
  in an ‘if’ statement [-Wempty-body]
      if ((j&7) == 7) DEBUG("\n");
                                 ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-15 08:50:50 -08:00
Alan Coopersmith
7c145c65e2 constify some char * declarations
Clears 6 of 17 -Wdiscarded-qualifiers warnings from gcc

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-15 08:50:50 -08:00
Alan Coopersmith
92f5cf6fcb gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-08 18:04:57 -08:00
Alan Coopersmith
ff3dbb3ee8 gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-28 15:00:06 -08:00
Alan Coopersmith
3e608e2332 Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-28 14:57:43 -08:00
Alan Coopersmith
725459b05f Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-28 14:30:03 -08:00
Alan Coopersmith
8e7eea6e1c Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-07 19:08:46 -08:00