Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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?)
|
|
Either remove check for XF86_VERSION_CURRENT or at least add the
implementation of RegionsEqual() to smi_video.c.
|
|
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
|
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().
|
|
|
|
The problem was that the driver was converting i420->YV12 2 times
instead of only once.
|
|
This synchronizes smi_video.c with smi 2.2.5 sources.
|
|
Currently, the support for EXA is not functional, neither is
ShadowFB or bpp/depth other than 16.
|
|
This should be the biggest patch in the "merge". Done in a single chunk
to have it compilable at all stages.
|
|
|
|
xf86VDrvMsgVerb prints up to 14 characters prefix, where prefix has the
format "%s(%d): " so, use name "SMI" instead of "Silicon Motion"
|
|
This patch add the new files and basic required definitions.
|
|
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).
|
|
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>
|
|
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>
|
|
* 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>
|
|
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>
|
|
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
|
Take into account the VideoRam configuration option.
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also remove safety padding on memory manager calculation
|
|
UTS is working, but SW is faster so leave it disabled
|
|
|
|
|
|
|
|
|
|
Unforunately, for 32 bpp solid fills the HW ignores alpha.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FBBase already take the register offset into account.
|
|
pSmi->FBOffset is the offset from the start of the framebuffer
pScrn->fbOffset is the aperture offset where the framebuffer
starts
|
|
|