summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2008-09-22Correct logic in sw cursor handling and add missing entries to .gitignore.Paulo Cesar Pereira de Andrade
2008-09-22Split SMI501_ModeInit in two functions.Paulo Cesar Pereira de Andrade
This allows using alternate MSOCRegRec structures to set a mode. This should be useful to restore the initial mode.
2008-09-22Remove unused .cvsignore files.Paulo Cesar Pereira de Andrade
2008-09-22Simplify hw cursor and sw cursor option handling.Paulo Cesar Pereira de Andrade
Also rename SMIRec field hwcursor to HwCursor, as there are few usages, and this way, match the case usage for other field names.
2008-09-22Rework/simplify debug macros.Paulo Cesar Pereira de Andrade
Instead of cut&paste of the name of the current function everywhere, just use cpp's __FUNCTION__ predefined macro. Create two macros to exit a function, named LEAVE() and RETURN(). Functions returning void should call LEAVE() and then explicitly return for now. "Logged" function calls are indented, so a review was done to ensure functions with a ENTER() also have the proper exit macro. The DEBUG macro was changed to have variadic arguments, and this way it is no longer required to prefix arguments with VERBLEV, but now it also is not possible to use another "verbosity value", but it wasn't used in any of the DEBUG macro calls.
2008-09-22Fix a leak and minor cosmetic change.Paulo Cesar Pereira de Andrade
Leak was due to only releasing return value of xf86GetEntityInfo if the chipset was PCI_CHIP_SMI501. Cosmetic change was to log pci burst and pci retry default values as X_DEFAULT instead of X_PROBED.
2008-09-19Kludge to not lock the SMI 501 when running at 8bpp.Paulo Cesar Pereira de Andrade
2008-09-19Add MSOC palette support to run at 8 bpp.Paulo Cesar Pereira de Andrade
Colors should be correctly set, but most output using Render is not properly drawn, i.e. anti aliased fonts, etc. Need to investigate further, but it should be a general problem, not exclusive to the driver.
2008-09-19Enable pci retry and pci burst by default.Paulo Cesar Pereira de Andrade
Rename fields pci_burst and NoPCIRetry to PCIBurst and PCIRetry, to match field names case usage, and updated logic for the removal of "No" from the pci retry option. Pci retry and pci burst greatly increase video playback speed, allowing smooth video play on the SMI 501.
2008-09-19Add initial exa support for SMI501.Paulo Cesar Pereira de Andrade
This just allows exa to run, with a minimal ammount of features avaiable.
2008-09-18Add a missing CHECK_SECONDARY macro call.Paulo Cesar Pereira de Andrade
2008-09-18Correct video offscreen memory allocation routines.Paulo Cesar Pereira de Andrade
It was always failing in the first allocation, if using XAA, what caused some players to not work correct. This is a major problem for the MSOC as it still only supports XAA. Also add a workaround for a hardware problem, as described in "SM501 Rev.AA engineering addendum v0.1.pdf" "A-27 PIXELS TOO BRIGHT ON VIDEO SHRINK".
2008-09-18Update for new smi_501 interfaces.Paulo Cesar Pereira de Andrade
This also adds some simplification for the driver code, by adding some function pointers to avoid the need to check the chipset everywhere. The new SMI_DetectMCLK function doesn't actually change pSmi->MCLK to avoid chances of it stoping working on non MSOC chipsets, as it previously not did set it, and for the MSOC, for the moment, default to whatever value is already set, i.e. doesn't reprogram it. Added new memory detection code for the MSOC, that better matches the documentation.
2008-09-18 Complete rewrite of smi_501.c and smi_501.h.Paulo Cesar Pereira de Andrade
The previous version was dependant on kernel framebuffer, as it was just failing a test if not having a modeline defined, and in the test case, it is running at 1024x600. Now it properly programs the video hardware, and the procedure is expected to be very well documented.
2008-09-02Rename global smi501 functions to have SMI501 prefix.Paulo Cesar Pereira de Andrade
Functions renamed were setDPMS -> SMI501_SetDPMS, regRead32 -> SMI501_Read32 and regWrite32 -> SMI501_Write32. Also moved SMI_SetDPMS to start of smi_501.c to have extern functions at start of the file.
2008-09-02Correct all compiler warning messages.Paulo Cesar Pereira de Andrade
Code compiled with: gcc -Wall -Wbad-function-cast -Wdeclaration-after-statement \ -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \ -fno-strict-aliasing -Wold-style-definition -Wpointer-arith \ -Wstrict-prototypes This patch also makes most smi_501.c functions static, as they are not called from anywhere else. Also removed prototypes for non existent functions in smi_501.h.
2008-09-02Correct xv video problems on MSOC.Paulo Cesar Pereira de Andrade
Set VIDEO_CLIP_TO_VIEWPORT as it is used in MSI sources, and also add proper code to detect panel size, as this information is used to manage offscreen memory (but shouldn't it be using pScrn->virtualY, etc?)
2008-09-01Don't pretend this driver compiles on XFree86.Paulo Cesar Pereira de Andrade
Either remove check for XF86_VERSION_CURRENT or at least add the implementation of RegionsEqual() to smi_video.c.
2008-09-01Fix XAA, ShadowFB and VT switching for non-sm501 chipsetsFrancisco Jerez
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-09-01Split SMI_MapMem in SMI_MapMem and SMI_MapMmioPaulo Cesar Pereira de Andrade
This is required because MSOC needs mmio to detect ammount of memory. The patch also creates a SMI_DetectMem() function, that should slightly simplify SMI_PreInit().
2008-08-29Correct a problem when handling i420 format.Arnaud Patard
The problem was that the driver was converting i420->YV12 2 times instead of only once.
2008-08-29Update MSOC video interface.Paulo Cesar Pereira de Andrade
This synchronizes smi_video.c with smi 2.2.5 sources.
2008-08-29Update xaa and generic acceleration code for the MSOC.Paulo Cesar Pereira de Andrade
Currently, the support for EXA is not functional, neither is ShadowFB or bpp/depth other than 16.
2008-08-29MSOC doesn't access VGA registers or VBE/INT10Paulo Cesar Pereira de Andrade
This should be the biggest patch in the "merge". Done in a single chunk to have it compilable at all stages.
2008-08-29Add code to probe and recognize the SMI501 chipsetPaulo Cesar Pereira de Andrade
2008-08-29Change SILICONMOTION_NAME valuePaulo Cesar Pereira de Andrade
xf86VDrvMsgVerb prints up to 14 characters prefix, where prefix has the format "%s(%d): " so, use name "SMI" instead of "Silicon Motion"
2008-08-29Add initial support and macros for the MSOC.Paulo Cesar Pereira de Andrade
This patch add the new files and basic required definitions.
2008-08-29Fix build for removal of xf86Version.hPaulo Cesar Pereira de Andrade
This is the first patch of series to merge code from the version 2.2.5 from SiliconMotion and code from http://cgit.freedesktop.org/~agd5f/xf86-video-smi501 After the merge, work will continue, to correct some extra problems, and make it work with EXA at least (as only the Xorg version has EXA support).
2008-08-16Allow using XV and RandR rotation simultaneously.Francisco Jerez
As it doesn't seem feasible to rotate the video, I did some modifications at SMI_PutImage and SMI_ClipVideo to make PutImage work (incorrectly) with rotation enabled. The image is displayed unrotated. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-16Some fixes in the EXA UTS/DTS code.Francisco Jerez
In DTS: * It uses the screen Bpp inestead of the pixmap Bpp... this gives some problems when using pixmaps with different depth to the screen. In UTS: * aligned_pitch was computed from src_pitch inestead of the pixmap width. * When writing the target coordinates to the DE registers, it does y*0xFFFF inestead of y & 0xFFFF. * I renamed source_pitch to src_pixelpitch as it is very confusing to have src_pitch and source_pitch. * It isn't necessary to call WaitQueue before copying each scanline, but it seems it almost doesn't affect performance. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-16RandR rotation implemented.Francisco Jerez
* I added the configuration file option "RandRRotation". * I replaced pSmi->ShadowPitch with pSmi->screenStride, it seems it makes more sense because the lower word of ShadowPitch may change independently. * I moved the SMI_DEDataFormat to smi_accel.c because it seems it is a piece of code repeated many times in the driver. * At some places, it is assumed the framebuffer is at FBOffset: when using a shadow framebuffer, FBOffset is the location of the on-screen framebuffer (0 should be used). This made e.g. EXA completly useless with ShadowFB enabled (it crashed). * In the FBManager initialization, I have replaced xf86InitFBManager with xf86InitFBManagerRegion to reserve some additional space as screen fb: it's unlikely to be the case, but a less efficient alignment in the rotated mode could make the rotated mode need more memory than the unrotated one. This is not a problem with EXA as the offscreen memory parameters can be easily modified when doing the rotation. * In SMI_RefreshArea it's assumed that some DE registers are already in some state, this is specially not true when using EXA. * SMI_ValidMode rejects a rotated mode with different dimensions than the panel. This seems to work now. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-16Updates in SMI_EnterVT when remapping memory.Francisco Jerez
Update the screen pixmap header with the new aperture address when remapping framebuffer memory in SMI_EnterVT. Update pSmi->EXADriverPtr->memoryBase too, in case EXA is being used. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-16Make the int10/VBE initialization depend on the UseBIOS configuration option.Francisco Jerez
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-16Memory detection moved before memory mapping in SMI_PreInit.Francisco Jerez
Take into account the VideoRam configuration option. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2008-08-15Dead code removal.Adam Jackson
2008-03-19Fix distcheckAdam Jackson
2008-03-19Death to RCS tags.Adam Jackson
2008-03-10smi: add pciaccess supportDave Airlie
2007-08-07Define SILICONMOTION_VERSION* using PACKAGE_VERSION*Brice Goglin
2007-03-20minor fixupAlex Deucher
2007-03-16Fix UTS issues with flashDennis De Winter
Also remove safety padding on memory manager calculation
2007-03-15hostdata blit UTS works, but SW is fasterAlex Deucher
UTS is working, but SW is faster so leave it disabled
2007-03-14more clock fixesAlex Deucher
2007-03-13fix clk calculation on older lynx chipsAlex Deucher
2007-03-13fix Solid()xf86-video-siliconmotion-1.5.0Alex Deucher
Unforunately, for 32 bpp solid fills the HW ignores alpha.
2007-03-13remove spurious waitqueue() lineAlex Deucher
2007-03-13Update copyright.Alex Deucher
2007-03-13switch the engine to quick start modeAlex Deucher
Rather than writing to the engine command register for every operation, set quick start mode, and the operation executes automatically when the width register is written.
2007-03-13fixup waitqueue slotsAlex Deucher
2007-03-13more exa fixups, disable UTS for now.Alex Deucher