summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2025-02-06use dixDestroyPixmap() instead of direct driver callHEADmasterEnrico Weigelt, metux IT consult2-4/+4
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/15>
2024-07-14Move sizeof to second argument in calloc callsAlan Coopersmith5-6/+6
Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as: r128_dri.c: In function ‘R128DRIScreenInit’: r128_dri.c:822:48: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 822 | if (!(pR128DRI = (R128DRIPtr)calloc(sizeof(R128DRIRec),1))) { | ^~~~~~~~~~ r128_dri.c:822:48: note: earlier argument should specify number of elements, later size of each element Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/13>
2024-06-10drop support for ancient xserver versionsEnrico Weigelt, metux IT consult5-99/+27
We're now relying on at least 1.18 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/11>
2024-06-06fix FTBS on debian: missing statement after labelEnrico Weigelt, metux IT consult1-0/+2
Compilers on recent Debian (gcc as well as clang) break compilation if there's no statement after a label: > ../../src/r128_driver.c:571:1: error: expected statement > } Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/12>
2024-05-14Raise minimum supported Xserver version to 1.18 (ABI_VIDEODRV_VERSION 20.0)Alan Coopersmith8-1513/+7
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-r128/-/merge_requests/10>
2024-05-14R128ScreenInit: fix indentationAlan Coopersmith1-30/+30
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/10>
2024-05-12use XNFcallocarray() instead of xnfcalloc macroEnrico Weigelt, metux IT consult4-5/+5
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-r128/-/merge_requests/8>
2024-05-06backlight control and console detection for wsdisplay systemsnia3-5/+80
based on a patch by Michael Lorenz. Signed-off-by: Nia Alarie <nia@NetBSD.org> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/7>
2024-05-06don't assume VGA output on non-x86nia1-2/+8
Patch adapted from work by Michael Lorenz. Signed-off-by: Nia Alarie <nia@NetBSD.org> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/7>
2024-05-06Alternative non-BIOS method to determine the panel size for NetBSDnia2-3/+35
With this we no longer need to specify PanelWidth and PanelHeight in xorg.conf on non-x86 platforms. Patch adapted from work by Michael Lorenz. Signed-off-by: Nia Alarie <nia@NetBSD.org> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/7>
2024-01-08Fix 9 -Wmissing-prototypes warningsAlan Coopersmith5-13/+20
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Add X.Org's standard C warning flags to AM_CFLAGSAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-07Mark DriverRec exported in r128_probe.h to match r128_probe.cNiveditha Rau1-1/+1
Fixes build failure when compiling with Solaris Studio compiler using -xldscope=hidden: "r128_probe.c", line 359: redeclaration must have the same or more restrictive linker scoping: R128 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-17R128RAMRec: constify name pointerAlan Coopersmith1-1/+1
Clears 4 gcc warnings: r128_driver.c:178:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] { 4, 4, 3, 3, 1, 3, 1, 16, 12, "128-bit SDR SGRAM 1:1" }, ^~~~~~~~~~~~~~~~~~~~~~~ r128_driver.c:179:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] { 4, 8, 3, 3, 1, 3, 1, 17, 13, "64-bit SDR SGRAM 1:1" }, ^~~~~~~~~~~~~~~~~~~~~~ r128_driver.c:180:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] { 4, 4, 1, 2, 1, 2, 1, 16, 12, "64-bit SDR SGRAM 2:1" }, ^~~~~~~~~~~~~~~~~~~~~~ r128_driver.c:181:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] { 4, 4, 3, 3, 2, 3, 1, 16, 12, "64-bit DDR SGRAM" }, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-27Fix spelling/wording issuesAlan Coopersmith8-9/+9
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-10-22Fix for build failure when --disable-dri option is specifiedKevin Brace1-0/+2
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Consolidate acquisition of many options into two functionsKevin Brace1-73/+97
Move acquiring of the option settings into r128AcquireOption and r128UMSOption functions. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Rename R128UMSOption to r128UMSOptionKevin Brace1-2/+3
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Hold off enabling acceleration until EXA / XAA are fully initializedKevin Brace1-4/+2
The turn on timing is premature. Wait until completion of the initialization process. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Consolidate EXA initialization code into R128EXAInitKevin Brace3-31/+26
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Deprecate R128VerboseInitEXAKevin Brace1-25/+14
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Deprecate R128AccelInitKevin Brace1-27/+12
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Deprecate R128EXAAccelInitKevin Brace3-41/+21
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-08-02Consolidate frame buffer initialization codeKevin Brace1-80/+30
The previous implementation had duplicated code depending on which standard is being used (i.e., DRI1 and / or EXA). Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-27Prevent disabling of EXA inside R128ScreenInitKevin Brace1-2/+0
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-27Move loading of EXA and XAA modules into R128PreInitAccelKevin Brace3-18/+43
Moving them away from R128ScreenInit callback function. This is how other DDXs do it. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Move RAMDAC module initialization into R128LegacyMSKevin Brace1-3/+3
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Delete OPTION_DISPLAY option enumerationKevin Brace1-1/+0
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Delete USE_CRT_ONLY conditional compilation directiveKevin Brace1-7/+0
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Move many DDX UMS options into R128UMSOptionKevin Brace1-76/+94
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Remove OPTION_DAC_8BIT optionKevin Brace1-2/+0
It is no longer used. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-26Evaluate software cursor option inside R128PreInitKevin Brace2-1/+9
Since SWCursor option is referenced only once, it should be handled inside R128PreInit callback function rather than R128ScreenInit callback function. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-25Evaluate EXA related options inside R128PreInitKevin Brace1-24/+38
Since AccelMethod and RenderAccel options are referenced only once, it should be handled inside R128PreInit callback function rather than R128ScreenInit callback function. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-25Evaluate NoAccel option inside R128PreInitKevin Brace2-8/+14
Since NoAccel option is referenced only once, it should be handled inside R128PreInit callback function rather than R128ScreenInit callback function. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-24Separate EXA and XAA initializationKevin Brace4-55/+74
Starting the process of separating legacy XAA and newer EXA initialization code. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-19Reorganize r128_exa.cKevin Brace6-62/+122
Stop the use of #include to include r128_exa_render.c inside r128_exa.c. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-18Fix typo: Initalizing --> InitializingDylan Aïssi1-1/+1
Signed-off-by: Dylan Aïssi <bob.dybian@gmail.com>
2018-07-13Fix for some RAGE 128 Pro causing out of range display errorKevin Brace1-27/+33
Due to faulty assumptions made by commit 2072d9a, many RAGE 128 Pro VGA display will be detected as DVI, and causes out of range display error with the attached monitor. While this commit is less than perfect and only works on x86 platform, it avoids causing out of range display error. With this fix, there is no longer the need to specify the supported frequency range of the monitor inside xorg.conf. The code was tested on RAGE 128 Pro Ultra 16 MB AGP. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-12Convert tabs to white spaces for r128_output.cKevin Brace1-14/+14
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-09Using __func__ string for debug message function identificationKevin Brace1-10/+11
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-09Remove compilation warnings related to debug messagesKevin Brace2-5/+5
The variable sizes were not matching the intended print format. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-09Deprecate R128TRACE macro when generating debug messagesKevin Brace6-127/+223
Deprecating R128TRACE macro in favor of DEBUG macro used inside OpenChrome DDX. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-07-09Move the location R128PreInitDRI is calledKevin Brace1-4/+4
Merge it into R128LegacyMS function. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-26Include <stdint.h> in order to declare uint32_tStefan Dirsch1-0/+1
Apparently this is needed in src/atipcirename.h since xorg-server 1.20 in order to still build this driver. Signed-off-by: Stefan Dirsch <sndirsch@suse.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-25Move R128InitDDA2Registers to r128_crtc.cKevin Brace3-81/+76
It does not make sense for this function to be inside r128_driver.c since it is only called from a function inside r128_crtc.c. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-25Move R128InitDDARegisters to r128_crtc.cKevin Brace3-74/+78
It does not make sense for this function to be inside r128_driver.c since it is only called from a function inside r128_crtc.c. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-25Move R128RestorePLL2Registers to r128_crtc.cKevin Brace2-86/+85
r128_crtc.c is the more logical place this function should be located. R128PLL2WaitForReadUpdateComplete and R128PLL2WriteUpdate functions were moved as well. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-25Move R128RestorePLLRegisters to r128_crtc.cKevin Brace2-89/+89
r128_crtc.c is the more logical place this function should be located. R128PLLWaitForReadUpdateComplete and R128PLLWriteUpdate functions were moved as well. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-25Move R128RestoreDACRegisters to r128_output.cKevin Brace2-10/+10
r128_output.c is the more logical place this function should be located. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-06-25Move R128InitDACRegisters to r128_output.cKevin Brace3-14/+13
It does not make sense for this function to be inside r128_driver.c since it is only called from a function inside r128_output.c. Signed-off-by: Kevin Brace <kevinbrace@gmx.com>