2586 Commits

Author SHA1 Message Date
Matt Sealey
a4cb4046ce ipu: don't follow interface pixfmt again since 32-bit is problematic
Signed-off-by: Matt Sealey <matt@genesi-usa.com>
2013-05-22 17:28:56 -05:00
Matt Sealey
7d6f9461af font: add the Fixed 8x16 console font to the kernel.
It's a bit like Terminus, but more rounded and less harsh on the eyes. Ubuntu has shipped
it as their default console font for years, before they switched to the "Ubuntu" font. Putting
this in the kernel has practically no benefit except to reduce the amount of "glitching"
swapping the built-in kernel console font for a new one halfway through boot when you see the
kernel output on a screen.

Note to gain the benefit of it not swapping the font around again when "consolefont" or
similar service starts, you need to set your font to Uni3-Fixed16.psf.gz or something very
similar.
2012-12-10 20:49:34 -06:00
Matt Sealey
d21c266824 siihdmi: add 1600x900 to the common not-quite-1080p mode matching 2012-11-16 21:45:35 +00:00
Matt Sealey
d1156b1817 backlight: match "DISP3 BG - DI1" as well as "DISP3 BG", solving issue with Smartbook backlight not turning off during screen blank
Mistaken use of strcmp vs. proper use of strncmp caused this
2012-07-31 15:04:57 -05:00
Matt Sealey
44a6231768 siihdmi: introduce siihdmi.nohotplug=1 argument to disable the hotplug handler globally 2012-04-20 12:37:20 -05:00
Matt Sealey
455affb66e siihdmi: reintroduce the 480-600ms sleep after reset to allow hotplug to settle. 2012-04-19 19:15:49 -05:00
Matt Sealey
73cae9887a siihdmi: enable DEBUG so that DBG() messages are output 2012-04-19 17:46:57 -05:00
Matt Sealey
0adb2f1d0b siihdmi: strncmp would nuke if the mode in the current monitor database had no name 2012-04-19 16:54:34 -05:00
Matt Sealey
af99f78e82 siihdmi: updated checkpatch run, fix a few other things including a serious memset argument order problem (argh!)
scripts/checkpatch.pl -f drivers/video/mxc/siihdmi.c --ignore=LONG_LINE,C99_COMMENTS
total: 0 errors, 0 warnings, 1555 lines checked

NOTE: Ignored message types: C99_COMMENTS LONG_LINE

drivers/video/mxc/siihdmi.c has no obvious style problems and is ready for submission.
2012-04-19 15:02:30 -05:00
Matt Sealey
c00322177f siihdmi: fix some checkpatch errors and realign some stuff to reduce warnings. Now we're only guilty of going over 80 columns, but Camelot is a silly place. 2012-04-19 14:43:34 -05:00
Matt Sealey
64cf5e0b27 siihdmi: downgrade to 640x480 output while getting EDID to match HDMI specification 2012-04-19 14:03:47 -05:00
Matt Sealey
9960ff68e1 siihdmi: clarify power modes debug 2012-04-19 14:01:42 -05:00
Matt Sealey
37cd50e9ff siihdmi: strncmp against modedb instead of structure memcmp to save time and effort matching CEA VIC 2012-04-19 13:59:01 -05:00
Matt Sealey
ddc6441e13 siihdmi: fix a division by zero when HDMI VSDB gives out 0 as the maximum TMDS clock capability 2012-04-19 13:55:52 -05:00
Matt Sealey
37c5293a2e siihdmi: comment about setting up interrupt service 2012-04-19 13:52:43 -05:00
Matt Sealey
d78c91e816 siihdmi: do the same msecs_to_jiffies for the identify timeout to match the DDC timeout 2012-04-19 13:49:56 -05:00
Matt Sealey
2bba60824f siihdmi: correct bus timeouts to convert ms to jiffies for the time_after function 2012-04-19 13:49:00 -05:00
Matt Sealey
badb686329 siihdmi: only mark insufficient margin in the mode list for 800x600 as all other modes tested actually seem to work okay. 2012-04-19 13:46:11 -05:00
Matt Sealey
1327336167 siihdmi: correct debug not to show display "power" on or off but more directly refer to "receiver sense" active or inactive. Also distinguish between the debug in the hotplug service loop and the almost identical output in the display setup code 2012-04-19 13:42:23 -05:00
Matt Sealey
a39558634a siihdmi: use SIIHDMI_NAME for driver data too 2012-04-19 13:39:15 -05:00
Matt Sealey
7c070eb308 siihdmi: rework debug statements not to redefine DEBUG, and use SIIHDMI_NAME 2012-04-19 13:37:00 -05:00
Matt Sealey
21371b733b siihdmi: add definition of driver name to simplify debug statements (header) 2012-04-19 13:24:59 -05:00
Matt Sealey
4fa3f18a58 ipu: add platform data method to determine pixel clock accuracy (external or internal).
If the internal clock is deadly accurate for the desired mode, that will be used instead
(the accuracy is set to within 1/200th which is well within VESA standards of 1/50th) to
save power.

efikamx changes: for HDMI, try external clock when necessary. For LVDS, don't since there
is some weird clock mess with the binary blob for the LCD panels in the mtl017 driver
which we think is derived from the lack of external clock support in more ancient kernels.
It is fudging the values to both correct some kind of panel EDID bug and also to fix the
potential deviation in clock, but since it's a binary blob it's kind of hard to change.
2012-03-08 15:22:33 -06:00
Matt Sealey
0d89a534b1 siihdmi: optional AV Mute, internal register helpers, fill out AVI InfoFrame better (supply VIC for VIC modes) 2011-11-10 11:55:21 -06:00
Matt Sealey
8681692d25 siihdmi: reduce resolution stabilize time to minimum of 50ms
Since there isn't a noticable effect on display compatibility in higher values, we may as well not waste time idling for something that already has taken effect.
Net benefit of this is that DVI monitors, due to not requiring an InfoFrame drain time, now change resolution much, much faster than HDMI monitors (which may now take about 50ms longer, but this isn't noticable in benchmarks)
2011-10-26 13:49:16 -05:00
Matt Sealey
0aa62f7f4d siihdmi: improvements targeted at greater display compatibility
* siihdmi.dvi=1 switch for kernel command line (and sysfs) which will force an HDMI display into DVI sink mode (will disable audio!)
* EDID handling reworked to better match the operational mode described in the manual, and to streamline the DDC bus locking (it will now lock the bus once instead of twice, and get all EDID data while the lock is held instead of trying twice once it realises there is an extension
* more consistently set the DVI/HDMI operational mode every type the System Control register is touched
* set Power Control to "D0" after setting the DVI/HDMI operational mode as a 0x00 write here seems to help latch the previous register set
* misc: renumber "steps" to enable display to match the manual
* only delay for InfoFrame drain time if it's an HDMI sink (DVI sinks do not get sent InfoFrames so there is nothing to drain)
* add a "resolution stabilization" delay (currently 255ms, manual states 50-500ms) in case the IPU is not sending data yet (will be ratcheted down later to make resolution changing faster)

HDMI compatibility has improved somewhat (no more pink lines) and as far as tested with all the test monitors, no breakages have occurred.
Monitor resolution change time has increased due to the stabilization delay, which may not actually be necessary as by the time we have gotten to this point to change resolution it could be assumed the notification through the Linux framebuffer subsystem is more than long enough. Your mileage may vary.
2011-10-26 07:46:46 -05:00
Matt Sealey
b6277489e0 siihdmi: add CEC register set for later development 2011-10-24 11:50:10 -05:00
Matt Sealey
f750dd8890 siihdmi: don't wait for receiver sense to setup display
* do not power down the chip just because the monitor is still in standby and waking up
* EDID will be requested but if the monitor has not properly powered yet then it will give a default mode
* also fix the symlink error (try remove device vs. make new phys-link, both are phys-link now, so it will remove the phys-link attribute before recreating it)
2011-10-24 11:48:10 -05:00
Matt Sealey
680b24818e siihdmi: make 1080p and 720p autodetection a little more panel-friendly
Essentially where before we simply picked a 1080p or 720p mode and then fall back to
EDID preferred mode, now we basically do

if (teneighty)
	if (native is 1680x1050, 1440x900) return native
	if (1080p) return 1080p

if (seventwenty)
	if (native is 1366x768, 1360x768, 1280x768, 1280x800, 1024x768) return native
	if (720p) return 720p

fallback: use preferred mode

This means far more "close to 720p" modes for plasmas are used instead of 720p with
a scaler, and for monitors that SAY they can do 1080p (but it's actually scaled down
or overscanned because native res is smaller) then use panel native instead for a
much better experience.

Tested on every monitor we have available and matches native res on most, and the
best mode fallback is used as per previous mode selection on the few fringe cases
left. Experience is crisper displays.

Note that if teneighty is selected, the modes returned absolutely will suck at video
playback performance - mfw_v4lsink will fail to fullscreen at anything above 1366x768
due to lack of bandwidth. 1440x900 may work if you're lucky. mfw_xvimagesink simply
cannot convert YV12 to YUY2 fast enough to work (and double buffering seems broken).
It is therefore still disabled by default.

Also: add a siihdmi.vic= option, so you can give it any CEA VIC from the CEA spec
(look for an entry in drivers/video/cea861_modes.c and use that number) if it's
still in the modelist.

Requesting specific video modes requires some duplication of option parsing and I
feel that's really not going to give people a reasonable experience, so it's not
being done right now. Investigation into exactly what the mitigating factor for
a lower_margin < 2 actually working is underway so we can cull less modes and give
people much better monitor experience once we get XRandR working.
2011-09-16 21:38:49 -05:00
Matt Sealey
632be9672e Add use counter to the overlay (inspired by a BoundaryDevices patch) 2011-09-16 21:25:40 -05:00
Matt Sealey
ddad8c0105 siihdmi: remove broken _remove_mode function in favor of the original, working open-coded solution 2011-09-15 23:14:27 -05:00
Matt Sealey
7d1449b512 Use IT modes over CEA modes by default 2011-09-14 12:25:27 -05:00
Matt Sealey
9876e46062 fb: scale triple buffers down to double buffers to reduce likelihood of extra memory allocations 2011-08-25 10:49:22 -05:00
Matt Sealey
099ebbe1f9 fb: only change alignment for non-overlay vars. fixes stride issues on v4lsink. 2011-07-30 16:33:10 -05:00
Matt Sealey
be72671768 siihdmi: when GNOME decides that it should "put display to sleep" it sends the POWERDOWN blank type and we were dutifully powering the SII9022 down to D2 state. Unfortunately without resetting the chip there's very little way to bring it back (and certainly "unblank" does not do what is necessary to do so). So, just live with a standard screen blank for now. 2011-07-29 18:15:03 -05:00
Matt Sealey
5f019c06ae fb: map reserved memory as writecombine to match non-reserved allocations 2011-07-29 12:45:05 -05:00
Matt Sealey
272436b5e1 siihdmi: don't turn the chip off just because there's no receiver sense for quirky monitors like the Samsung SyncMaster E1920 2011-07-28 19:03:22 -05:00
Matt Sealey
4ffd877f1b display: go back to reserving a framebuffer so the base address doesn't move around on boot and make X go crazy.
8MB on Smartbook, 32MB on Smarttop. Dynamically allocating the framebuffer for 1920x1080-32 didn't work with the
dynamic method anyway (sigh) due to memory fragmentation.
Also, align framebuffer stride to 32 bytes to fix Z430 acceleration in X
2011-07-28 17:59:54 -05:00
Matt Sealey
46cf9c5817 siihdmi: don't use a timeout to enter the hotplug event handler, fixes some twitchy displays (Samsung SyncMaster E1920 in particular) 2011-07-28 17:58:50 -05:00
Matt Sealey
1f11661da3 Move modedb file to drivers/video with the other modedbs 2011-07-12 11:24:56 -05:00
Matt Sealey
39e907d4bc siihdmi: move some audio muting around based on Silicon Image example code
siihdmi: don't reconfigure the SII9022 just because there was a mode change if the mode is identical
ipuv3fb: default to a real 640x480 mode and not a "dummy" xres/yres
modedb: move cea modes to an extern so it only gets included once in the kernel
also: whitespace police
2011-07-12 11:02:58 -05:00
Matt Sealey
82423290ad siihdmi: remove hotplug option, enabled by default now for everyone 2011-07-04 17:57:05 -05:00
Matt Sealey
1f0c20d638 siihdmi: backport 2.6.35 driver to .31 - hotplug is the biggest major feature 2011-07-04 14:26:27 -05:00
Matt Sealey
2e6cfa8350 IPU Triple Buffering support 2011-06-28 17:20:21 -05:00
Jason Chen
dbfb1fe4ac ENGR00141552 ipuv3: fix display pin's power leak
If you disable display, the display port's pin may keep high voltage which
may cause power leakage. Fix this issue by make all pin go into low level
after display disable.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 165df9e8d525082e70a165516e2bcd1d0529b148)
2011-06-28 15:17:45 -05:00
Matt Sealey
2811c4a4ef Remove preallocation of framebuffer and GPU memory in favor of being nice and dynamic. Note that GPU memory reserved is entirely down to the MMU now, and framebuffer memory is "size of framebuffer" rounded up to 1MB block.
Everything still works.

Includes a Wild mashup of Freescale ENGR00143019 which concludes GPU MMU support for the platform.
2011-06-28 15:08:08 -05:00
Matt Sealey
54f04c4c62 ENGR00143309: fix yres_virtual to be 3*yres 2011-06-27 16:59:07 -05:00
Matt Sealey
acd39fb113 Revert "Disable IPU output format matching, will be 16-bit for every one now."
FlashPlayer 11.05 BSP has been fixed to support 32-bit modes so it will function
correctly on Smarttop now. GPU performance hit is still noticable but the extra
colour definition more than makes up for it. Smartbook is not affected.

This reverts commit 1ce3ee7a5a.
2011-06-14 14:26:41 -05:00
Matt Sealey
b5f32fb4c5 siihdmi: don't match resolution in siihdmi_find_best_mode because it breaks the preferred mode when teneighty=seventwenty=0 2011-06-13 22:13:02 -05:00
Matt Sealey
9c5512554f siihdmi: rework mode selection
* 720p and 1080p are now attempted on DVI monitors on the revelation that some DVI monitors can display real CEA-style modes
* use the fb_find_best_nearest_mode function to better select resolutions and refresh rates
* cleanups
2011-06-13 20:23:13 -05:00