Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
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>
|
|
Clears 6 of 17 -Wdiscarded-qualifiers warnings from gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
smi_video.c: In function 'SetAttrSAA7111':
smi_video.c:795:6: warning: declaration of 'i' shadows a parameter [-Wshadow]
int i;
^
smi_video.c:723:39: warning: shadowed declaration is here [-Wshadow]
SetAttrSAA7111(ScrnInfoPtr pScrn, int i, int value)
^
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Also don't check for NULL before calling free().
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Fixes a segfault when the destination area is off screen.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Krzysztof Halasa <khc@pm.waw.pl>
|
|
On some videos the last displayed line was wrong. This can
be fixed using LynxEM+ VPR68. Code borrowed from siliconmotion's
in-house driver.
Also fix a typo.
Signed-off-by: Cedric Cellier <rixed@happyleptic.org>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
|
|
Probably this makes dualhead mode more useful because it makes
possible displaying video on the LCD as long as the CRT output is
disabled or cloned.
|
|
FOURCC_YV12 and FOURCC_I420 handling also was buggy. First it was
doing a noop by swapping offset2 and offset3 values twice, and second,
swap is not required when using smi 501/502 CSC video.
Changed SMI_DisplayVideo0501_CSC() to not set static values to
registers in a possible loop, if there is clipping.
|
|
The LEAVE() macro, when debug is disabled, now is defined as:
<hash>define LEAVE(...) return __VA_ARGS__
This avoids the requirement of a return statement after the LEAVE()
macro call, what can be confusing.
|
|
Use the same logic for offscreen memory management as used in
smi_video.c. This also makes the functions SMI_AllocateMemory and
SMI_FreeMemory no longer static in smi_video.c.
|
|
Commit 0870d46718fe4e01953efd63cec46c54140b20f9 broke the clipping
code. That has been corrected in this patch. Anyway, the hardware color
space conversion should not be hidden down in the driver code, instead
it should be usable by external programs as well, instead of having
some applications doing it by software.
|
|
This significantly simplify the function SMI_DisplayVideo0501_CSC(),
but the real cause of the problem that this patch corrects is that
whenever MMIO 0x1000fc bit 24 (Vertical Linear Filter Control) is
set, the last line of the rendered video will display only noisy,
regardless of video being rendered 1x1, or scaled up or down.
|
|
|
|
This code is an adaptation of SMI sample implementation.
CSCVideo is an alternate way to render video, that should reduce memory
bandwidth usage, and uses the color space conversion hardware to render
video directly to the framebuffer memory.
When using randr dual head mode, currently only XAA is supported. As it
has a fixed format framebuffer (when using the Virtual xorg.conf option).
This patch also ensures that pScrn->displayWidth, pScrn->virtualX and
pScrn->virtualY are only changed by the driver when using EXA.
|
|
pSmi->IsSecondary was not used, and there should not exist two
instances of the driver managing the same card.
Macro CHECK_SECONDARY() was dependant on a second instance of the driver
for the same card, and also removed.
Some rework should still be done in the cursor code, as it sometimes,
when displaying different data, will leave the hw cursor visible, while
using an argb cursor.
|
|
Also done some clean up, like removing unused/redundant members of the
screen private structure, and removing now unused configuration file
options.
|
|
Clip the video to the CRTC viewport by using
xf86_crtc_clip_video_helper, and allow XV in
dual head mode.
|
|
The values that should be used, should also have a more meaningful name,
as something like:
doesn't help much, and the fact that these "ports" can be accessed from
several "bases" may be confusing also, as there is SCRBase, DCRBase,
FPRBase, DPRBase, CPRBase (and IOBase). The 501 code should probably be
changed to just use IOBase, as currently it uses SCRBase, that happens
to be at pSmi->MapBase + 0x0000.
This patch also completely transforms the WaitQueue macro in a noop
for the MSOC. In SMI sample code it is almost the current code, just
that the macro body is commented out. Hopefully this will be addressed
soon.
|
|
These macros access vga registers, but don't make it clear in their name.
|
|
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.
|
|
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".
|
|
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.
|
|
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.
|
|
This should be the biggest patch in the "merge". Done in a single chunk
to have it compilable at all stages.
|
|
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>
|
|
|
|
|
|
Based on Dennis' code from bug 8721 with some minor
changes by me.
|
|
|
|
redirected video.
|
|
|
|
|
|
COMPOSITE extension's new macro. These appear to only be used
internally.
|
|
|
|
|
|
|
|
|
|
|
|
|