Age | Commit message (Collapse) | Author |
|
Also don't check for NULL before calling free().
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
|
|
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.
|
|
The code was inherited from first import of latest smi sources, but
the driver actually programs a mode, so there is no need to check if
there will be a table entry with register contents matching the requested
mode.
|
|
The code is under "<hash>ifdef USE_PANEL_CENTER", as it is buggy, and
regardless of value set to right and bottom, it will crop from 0 to
mode-width/mode-height, and then display a lot of screen artifacts, due
to improper programming. Either way, the CRT in clone mode will display
correctly.
|
|
Sample usage on sm502:
$ DISPLAY=:0 xrandr --output VGA --newmode 1280x1024 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
$ DISPLAY=:0 xrandr --addmode VGA 1280x1024
$ DISPLAY=:0 xrandr --output VGA --mode 1280x1024 --pos 768x176
Last command assuming using XAA (with ``Virtual 2048 1024''), so that it
will have panel in top-left, and crt in bottom-right.
|
|
It actually was not added in a previous commit (due to using git reset
to remake a commit, and not readding it), but now, changed only call
xf86CVTMode if it is available in the X Server, otherwise, for older
X Servers, a modeline should be specified in xorg.conf.
|
|
Also correct printing information about MCLK in the smi501/502, it
should print M2CLK (aka M1CLK o the 502) as it is the clock that
controls video engine/memory.
|
|
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?).
|