History log of /drivers/video/via/dvi.c
Revision Date Author Comments
9864ca20c50c2fcaba63767a336e16c88b46d7ad 17-Feb-2012 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: modetable conversion

This patch converts the modetables used in viafb to
- remove the strange thing that sync_end and blanking_end contained
the length and not the absolute value
- remove hundreds of useless defines
- use fb_videomode and not our own definition so modes defined in
the subsystem and received via EDID are compatible with ours

As the modes are now stored in a flat structure and no longer in a
tree like thing the lookup time was increased but as it is a rare
event anyway it shouldn't matter. Otherwise the behaviour should be
the same as before.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
532f9169db21fbffd07cc44075c7ea1859c07806 19-Oct-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: make single framebuffer multiple adapter mode work

This patch implementes this mode (viafb_SAMM_ON set and
viafb_dual_fb not set) in a useful way for CRT and DVI devices.
The same content is shown on both devices in different video modes.
The first (primary) resolution must not be bigger than the secondary
one and determines the visible region. The same content is shown
centered on the secondary output.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
ebb29fb47e198787b8b47a74cb10334cd9647a9d 07-Aug-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: use information in var for modesetting

This patch starts to use the information in var for modesetting for
CRT and DVI devices. This is the right thing as it allows us to use
more generic modes than the ones predefined by VIA. We do not yet
allow more generic modes as check_var still limits them to the
predefined ones but with this patch applied it would be really easy
to do so. A problem was VIAs SAMM mode as it has 2 different modes
but just one frame buffer device. This is solved by creating a
pseudo var which contains enough information to use it for
modesetting. Hopefully one day we can use information in var for all
modes that do not involve hardware scaling.
Well I'd like to say that the chance of regressions is low but it is
quite likely that the behaviour in some cases changed especially
when SAMM is involved. I hope we made it better than before in
particular the DVI frequency check was probably broken before and
hopefully works better now.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
92746c3c82135b13d7fb1bbdebbabb0faedd8433 02-Jun-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: simplify viafb_fill_crtc_timing

As the first argument is just part of the structure passed as the
second argument there is no need for it at all.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
cd00b1154d3c7d711e83c3c17b831aafe6377532 27-Mar-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: replace custom return values

This patch replaces OK/FAIL by true/false which is simpler and saner.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
c91faa61697a60ee5cc653db9b6fd3c7049890a6 22-Mar-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove unused max_hres/vres

This patch removes the max_hres and max_vres which are not used at
the moment. In general they could be useful but it would be better
to get them via any standard EDID implementation and not the buggy
incomplete one currently used which is also removed as far as
possible.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
fd3cc69848b7e1873e5f12bbcdd572b20277ecf3 11-Mar-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove duplicated clock storage

The clocks can be easily recalculated by the timing and refresh value.
This brings us one step closer to removing VIAs modetable and use
generic ones and being easier extensible.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
6f9422d4e407bd63a9bd665ea09e57c1e3800c47 07-Sep-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: introduce per output device power management

This patch moves common parts of dvi.c, lcd.c and vt1636.c to hw.c to
start a per output device power management. There should be no runtime
changes aside that this patch enables the proc interface to enable/disable
devices when needed which greatly increases the chances that changes to
the output device configuration will work. However the power management is
not yet complete so it might fail on some configurations. As this area is
quite complex and touches undocumented things there is a slight chance of
regressions.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
cd7e9103e983ff0f518ac0e85cee265027ccbfa4 12-Aug-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: merge the remaining output path with enable functions

This patch merges the remaining functionality of the output path
function in the associated enabling functions. This is very natural as
most of the remaining code does actually enable the device.
Just some more or less intelligent code merge. If no stupid mistakes
occured there should be no regressions.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
f4ab2f7a21338ae0f59ad925c23545e790cd51e3 09-Aug-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: propagate __init and __devinit

There are a lot of init functions which are not marked as such.
Fix this.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
414d3ce1b34384dd42e31536075583b9edb3cab6 08-Aug-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: unify output path configuration

Move all output path routing directly in the viafb_setmode. This
gives a better overview and allows to factor similar parts out.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
ec66841e495b9ab4f92bdf91efe8cf56e1471fbd 05-May-2010 Jonathan Corbet <corbet@lwn.net> viafb: move some include files to include/linux

These are the files which should be available to subdevices compiled
outside of drivers/video/via.

Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
24b4d82e4715841848a499534ed5cb7db3d6bca3 22-Apr-2010 Jonathan Corbet <corbet@lwn.net> viafb: Separate global and fb-specific data

This patch moves data of interest into a new viafb_dev structure which
describes the device as a whole; the idea here is to create a separation
between what all devices may need and what the framebuffer device in
particular needs.

I've also made some small steps toward thinning out the global.h mess.

Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
f045f77bc0bf238a871b10bea9e425329a8e4abc 02-Dec-2009 Jonathan Corbet <corbet@lwn.net> viafb: Move core stuff into via-core.c

The first step toward turning viafb into a multifunction driver. This
patch creates a new via-core.c file which serves as the main PCI driver;
everything else comes below that. Some work has been done to rationalize
the i2c drivers in this new scheme.

Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
277d32a36cba0b42c9c6836ff07f9b978566e95c 22-May-2009 Harald Welte <laforge@gnumonks.org> viafb: rework the I2C support in the VIA framebuffer driver

This patch changes the way how the various I2C busses are used internally
inside the viafb driver: Previosuly, only a single i2c_adapter was created,
even though two different hardware I2C busses are accessed: A structure member
in a global variable was modified to indicate the bus to be used.

Now, all existing hardware busses are registered with the i2c core, and the
viafb_i2c_{read,write}byte[s]() function take the adapter number as function
call parameter, rather than referring to the global structure member.

[jc: even more painful merge with mainline changes ->2.6.34]
[jc: painful merge with OLPC changes]

Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2c0e0c88422033c9b6162bf7875aecdd095130b7 11-Mar-2010 Joe Perches <joe@perches.com> drivers/video/via: fix continuation line formats

String constants that are continued on subsequent lines with \ will cause
spurious whitespace in the resulting output.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c5f06f5cddd6681b978ffdb53755e28eefccb1bb 11-Mar-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: some dvi cleanup

Remove some unused variables, move some dvi code around and store the
detected maximum resolution for later use. The vertical resolution is
handled as the old code did it but I hope it can be read from the hardware
some day.

No runtime change expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9b24b00c364bb3bfa717ba2ead258a527b20cc5f 11-Mar-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove the remaining VIA_RES_* uses

Remove the rest of the VIA_RES_* use cases. Obviously this was no longer
useful. Keep the related infrastructure/functions for later use.

No runtime impact expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dd73d6868b9ecb4841def0c6ff0a25da27db33ba 11-Mar-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: split global index up

This is the first step to remove an artificial global index that was used
in two ways:

1. As a pseudo index in the mode table. Pseudo as you had to search
through the table to find the referenced entry. This was replaced by
using a pointer to the entry.

2. As a shortcut to compare a combination of horizontal and vertical
resolution at the same time.

This was replaced by a "(hres<<16) | vres" which is good enough for
now and the near future. If vres or hres become greater than 2^16 this
might indeed cause problems but this solution allows to split this
indexing mess up without the requirement to do even more code changes.

This is a big change that will allow more clean ups. It should be a bit
faster but that is probably not relevant for normal operation. No
regressions expected but as this is a relatively big step heavy testing is
appreciated.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
af901ca181d92aac3a7dc265144a9081a86d8f39 14-Nov-2009 André Goddard Rosa <andre.goddard@gmail.com> tree-wide: fix assorted typos all over the place

That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
c4df5489e40e55f2962b9e8100ebc0d4d1374415 23-Sep-2009 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: improve viafb_par

This patch introduces viafb_shared and is the beginning of a smooth
transition to use it.

viafb_shared should contain all general, non-surface specific data that
should be shared along all viafb framebuffers while viafb_par should only
contain things that are specific to each surface or in other words extend
fb_info. This change is intended to clean the dual/multi framebuffer
handling up.

This removes the annoyance that viafbinfo1->par points to a different
structure than viaparinfo1.

As the last change is fundamental it is difficult to ensure that all parts
of the driver do not depend on the previous brokenness but the chance of
regressions is very low.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c09c782f3e7d38e1f3842822209bb6faff4a2b1b 16-Oct-2008 Joseph Chan <JosephChan@via.com.tw> viafb: dvi.c, dvi.h, global.c and global.h

dvi.c, dvi.h: TMDS generic process and setting.
global.c, global.h: define global variabls.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>