Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Also don't check for NULL before calling free().
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
ScrnInfo->pixmapPrivate is gone
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
|
|
|
|
|
|
Call ModifyPixmapHeader on SMI_EnterVT to update the screen pixmap
address tracked by EXA.
Set memoryBase in the ExaDriverRec to NULL when switching out: some
pixmap could get allocated near the former aperture address and it
could be erroneously considered as being in offscreen memory.
|
|
o Define HAVE_XMODES in config.h.
o Correct the LEAVE() macro declaration when SMI_DEBUG is defined.
o Remove prototype for SMI_DGAInit() if HAVE_XMODES is not defined.
o Properly scale value read from sm501 CURRENT_CLOCK register, to
print an appropriate message on startup.
|
|
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.
|
|
On the MSOC, the hardware cursor was remaining on screen, when using
EXA and a randr rotated mode.
|
|
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.
|
|
Other chipsets are doing the same. But this apparently is to circumvent
a problem in randr/cursor implementation, that appears to not work very
well with hardware that supports two hw cursors, but not argb cursors.
|
|
Use separate buffers for crt and panel hw cursors.
Describe, and workaround a problem with Dualhead and hw cursor enabled.
It still has the inconvenient of having a blinking X when exiting the server
or switching to a VT; maybe should also save the image currently configured
also (and restore on exit), or just disable hw cursor on dual head mode.
Also revert change to not initialize video on dualhead. Better to have
fully functional video only on panel, that can be resized, then non
resizable video..
|
|
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.
|
|
|
|
* Make screen resizing behave better with XAA.
* Move some local variable declarations to the top of
the function definition to conform ANSI C.
* Make the Lynx panel modesetting code to actually
program the panel sync pulse width in dualhead mode.
* Also, fix a crash when using libpciaccess
(the memory wasn't being unmapped).
|
|
Moved most of the Lynx-specific code out of the main
functions at smi_driver.c to some new files: smilynx_hw.c
(With CRTC-independent code like global hardware initialization and
mode saving/restoring), smilynx_crtc.c (With the CRTC-local
procedures) and smilynx_output.c (Output power management, DDC and
monitor detection, currently).
Done something similar with the SMI501 code: split
SMI501_ModeInit in three separate functions: SMI501_HWInit that does
the global initialization, and the CRTC mode_set callbacks
SMI501_ModeSet_crt and SMI501_ModeSet_lcd at smi501_crtc.c.
The SMI501_ModeSet code is divided into SMI501_WriteMode_common,
SMI501_WriteMode_lcd and SMI501_WriteMode_crt, each one updates a
different register set in the hardware.
Inside smi_crtc.c, there is mainly hardware independent
code... Initial CRT controller allocation, shadows, rotation and
framebuffer resizing code.
The shadow code currently relies on EXA... I'm not sure what are the
problems of the EXA implementation in MSOC. Does it work?
I think it would be a good thing to get rid of XAA soon: The next
thing I'll be working on will be EXA Composite... I hope it's possible
to get EXA acceleration working at least as fast as the current
XAA. (Although Teddy Wang confirmed me that the SMI720 DMA engine is
broken...)
So, the patch adds some features like new Lynx dualhead modesetting
code, but it probably breaks some other things:
* Video Overlay: I suppose it does work with EXA activated. It seems
it is also possible to have simultaneous overlays in both CRTCs with the
Lynx hardware (I have some code for this, but still work in progress).
* Hardware Cursor (It needs more integration in the CRTC interfaces).
* The old Shadow FB / rotation code, which we should probably drop.
These are in my TODO list... Along with some more cleaning and other
minor issues in the modesetting code.
About the SMI501 RandR1.2 implementation... I suppose it's specially
lacking per-output DPMS (The DPMS field in the System Control register
only affects the CRT, doesn't it?).
|