History log of /drivers/video/via/lcd.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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>
/drivers/video/via/lcd.c
91dc1be8f698eb016343d534159a919678e3889c 12-Feb-2012 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: LCD bpp cleanup

This patch removes redundant bits per pixel information by using the
one storged in var directly. Simplifies code without any functional
changes.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
4e5527c9d1f373cb7dda6eec3af1d7b9659cdf85 12-Feb-2012 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: make SAMM to also work on LCD

This patch enables LCD to handle SAMM without dual fb.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
bfe7d5f9396d5f2607454fd9ff89397fa3ba9a32 07-Aug-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: eliminate modetable dependancy of LCD modesetting

This patch removes the need for knowing the modetable structure
within the LCD modesetting function. The magic 60Hz refresh rate was
already there as always the first entry for a resolution was choosen
based on the ascending refresh rate ordering in the modetable.
For all but one this is at least 60Hz, if only higher frequencies
available we choose those like the code before did. The exception is
OLPC but that resolution has only one frequency so we get the same
behaviour there as well.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
f18e3e0ce0dacca497e3f1547095b3f9b111b0f7 23-May-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: kill viafb_load_crtc_timing

This patch replaces calls to viafb_load_crtc_timing with the code.
This should make it easier to fix the oddity that in the modetable
the blank and sync end entries contain the length and we need to add
the start values to get those to be written to the hardware.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
f33f6f0ccc5ff7415da3feb18b1ff966ed2d80d1 24-Apr-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Merge branch 'viafb-pll' into viafb-next

Conflicts:
drivers/video/via/viamode.c

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>
/drivers/video/via/lcd.c
1606f87e98f83512762da6dbc992103ae690ff11 23-Mar-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: call viafb_get_clk_value only in viafb_set_vclock

As no caller is interested in the result call viafb_get_clk_value
directly from viafb_set_vclock to encapsulate the hardware dependend
stuff there.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
2563afa9ec6970f3545906382cc986ee012f60ec 12-Mar-2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Merge branch 'viafb-pll' into viafb-next
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>
/drivers/video/via/lcd.c
dbf85f2326dbb070256ff153853b00f70c27717a 11-Dec-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: kill lcd_panel_id

This patch removes all internal uses of another mostly artificial
value. It does duplicate the information of the maximum resolution and
it is not flexible as only a few resolutions exist. Hence it is better
to remove it and clean the mess up.
No runtime change expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
23e5abd5555b86fd56af6383e7a832b0cf2a2d95 03-Mar-2011 Stephen Hemminger <shemminger@vyatta.com> video via: make local variables static

Many local variables should be declared static.
Found by sparse, compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
b65d6040e3a7cd75d9287f7ddfd115e85fde4b44 03-Mar-2011 Stephen Hemminger <shemminger@vyatta.com> video via: fix iomem access

This driver is not respecting the iomem memory space restrictions
and does direct access. This works on x86 but is non-portable and
should not be done. Converted memcpy() of 2 to readw.
Last post increment of romptr was unnecessary since pointer never
used after that.

Found by sparse, compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
/drivers/video/via/lcd.c
51f4332bb5fef869e8a89895a7bac6b4c03b4946 24-Oct-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: add initial VX900 support

This patch adds basic support for the new VX900 IGP. Almost everything
that was implemented for other IGPs is expected to work also on VX900
after this patch. The only known issue is that on the CRT output mode
setting does not always work.
It is clear that the possibility for regressions is zero.

A big thanks to VIA Technologies for making this possible and
supporting this work.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
c2a07c932dad49b3b80b11132183b8b2ec8ea1aa 07-Sep-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: limit LCD code impact

This patch cleans the LCD code up. It forbids overwritting global
decissions like what IGA should be used as the source and whether to
enable the second display channel. Additionally it removes a bit code
duplication.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
91336712ce579dd8e83bc07bf0a45b7c6963eed2 07-Aug-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove lcdtbl.h

This patch moves the power on/off sequences to lcd.c as they are only
used there. This allows removing lcdtbl.h as the other stuff is not
used.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
cc3fd679a344468e892a109b8de3e2948ce14e0f 02-Jun-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: simplify lcd size "detection"

viafb: simplify lcd size "detection"

Remove all occurences of get_lcd_size_method as only the values
GET_LCD_SIZE_BY_VGA_BIOS and GET_LCD_SIZE_BY_USER_SETTING were used
which had the identical code so there is no need to make things look
more complicated than they actually are.
Just a bit of of cleanup, really no regressions expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
f1ad752a096aca76f93cd7f86815af8093366fdc 23-May-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: add lcd scaling support for some IGPs

viafb: add lcd scaling support for some IGPs

These IGPs should also support lcd scaling but likely this switch was
missed when adding support for them. Fix it, allowing lcd scaling on
CN750, VX800 and VX855. At least this improves the situation for
VX855. (there seems to be another scaling unrelated bug somewhere)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
119b953a80d28821a56567d84dab860b0edc7940 22-May-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: improve lcd code readability

viafb: improve lcd code readability

This changes the code to better reflect that we can (currently) only
perform upscaling.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
4a73d70ebe890fb71dcdd1cfcb788e1432ed0034 22-May-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove duplicated scaling code

viafb: remove duplicated scaling code

The code for P4M900 does the same as for all newer IGPs so there is no
reason to duplicate it. Just reducing the code to maintain.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
c205d932530719d2a6ddb9152650e5bbe80c9400 07-Jun-2009 Chris Ball <cjb@laptop.org> viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5

[jc: extensive merge conflict fixes]
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Signed-off-by: Chris Ball <cjb@laptop.org>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
4bbac05f8c0ab40dcc52ed6dff44e1b0d80fa6e3 11-Mar-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: remove dead code due to IGA1_IGA2

Some code depended on IGA1_IGA2 which was never set (at least with the
symbolic name). Remove this dead code although it might one day be useful
to get a hint on how some things might work. However as this is dead it
is likely full of bugs and would prevent a clean structure (as it has some
very strange things).

Dead code -> no regressions, at least if VIA doesn't do anything very ugly.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/video/via/lcd.c
daacccd1657bdecae8f7c98a8e2b84367a8d4e87 11-Mar-2010 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: split color mode setting up

This patch splits color mode setting up in seperate functions. Some
hardware initialization that was previously mixed with it is moved to
viafb_setmode. As are the calls to the newly created function. This is
yet another little step towards controlling each IGA on its own.

As this patch really aims too mimic the old behaviour no regressions are
expected. However I noticed that 8bpp (or 6bpp?) seems actually a bit
broken before and after the patch.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
e6bf0d2c9a7f1b9b0ac77698017f8f06f9cc0317 16-Dec-2009 Harald Welte <laforge@gnumonks.org> viafb: cosmetic cleanup of function integrated_lvds_enable()

A humble attempt to simplify the coding style to improve readability

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
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>
/drivers/video/via/lcd.c
2d6e8851f608bd0c811f2df83eeff4ad8631e723 23-Sep-2009 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: improve pitch handling

Split the pitch handling up and replaces the calculation from virtual xres
and bpp with fix.line_length which already contains the pitch and does not
add any constrains for the virtual resolution.

Also add a bit to the second pitch which the documentation mentions but
which was ignored by the driver.

Although it is a bit unclear what the right pitch for some LCD modes is
this patch should have no negative runtime impact.

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>
/drivers/video/via/lcd.c
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>
/drivers/video/via/lcd.c
521594442cc62d1c2af8436a05ab5918b7730b19 07-Aug-2009 Florian Tobias Schandinat <FlorianSchandinat@gmx.de> viafb: fix rmmod bug

This fixes a bug caused by changing pointers (viafb_mode, viafb_mode1)
assigned by module_param. It reduces driver complexity by not needlessly
changing these vars as they are only read once and removing now
superfluous code.

On unpatched kernels loading viafb with viafb_mode or viafb_mode1 option
used and afterwards unloading it results in:

kernel BUG at mm/slub.c:2926!
invalid opcode: 0000 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/block/loop0/removable
Modules linked in: snd_hda_codec_realtek snd_hda_intel snd_hda_codec
snd_hwdep snd_pcm rtl8187 snd_timer eeprom_93cx6 mmc_block snd soundcore
via_sdmmc fb snd_page_alloc i2c_algo_bit i2c_viapro ehci_hcd uhci_hcd
cfbcopyarea mmc_core cfbimgblt cfbfillrect video output [last unloaded:
viafb]

Pid: 3355, comm: rmmod Not tainted (2.6.31-rc1 #0)
EIP: 0060:[<c106a759>] EFLAGS: 00010246 CPU: 0
EIP is at kfree+0x80/0xda
EAX: c17c2da0 EBX: dc7edbdc ECX: 0000010f EDX: 00000000
ESI: c102c700 EDI: dc7ed8fa EBP: d703ff2c ESP: d703ff20
DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process rmmod (pid: 3355, ti=d703e000 task=db1412c0 task.ti=d703e000)
Stack:
dc7edbdc 00000014 00000016 d703ff40 c102c700 dc7f45d4 dc7f45d4 00000880
d703ff4c c103e571 00000000 d703ffac c103e751 66616976 da140062 db89ba80
00000328 d702edf8 db89ba80 d703ff9c c105d0f0 00000200 da14f898 00000014
Call Trace:
[<c102c700>] ? destroy_params+0x1e/0x2b
[<c103e571>] ? free_module+0xa2/0xd7
[<c103e751>] ? sys_delete_module+0x1ab/0x1da
[<c105d0f0>] ? do_munmap+0x20a/0x225
[<c10029b4>] ? sysenter_do_call+0x12/0x26
Code: 10 76 7a 8d 87 00 00 00 40 c1 e8 0c c1 e0 05 03 05 1c 87 41 c1 66 83 38 00 79 03 8b 40 0c 8b 10 84 d2 78 12 66 f7 c2 00 c0 75 04 <0f> 0b eb fe e8 6f 5a fe ff eb 47 8b 55 04 8b 58 0c 9c 5e fa 3b
EIP: [<c106a759>] kfree+0x80/0xda SS:ESP 0068:d703ff20

This is caused by the current code changing the pointers assigned by
module_param. During unload it tries to free the memory the pointers
point at which is now part of an internal structure.

The patch simply avoids changing the pointers. This is okay as they are
read only once during the initialization process.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/video/via/lcd.c
ac6c97e20f1befecd791feed57170ec6735dcce7 16-Oct-2008 Joseph Chan <JosephChan@via.com.tw> viafb: lcd.c, lcd.h, lcdtbl.h

lcd.c, lcd.h: LVDS generic process.
lcdtbl.h: patch register for simultaneous case.

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>
/drivers/video/via/lcd.c