1. 24 9月, 2010 5 次提交
  2. 23 7月, 2010 2 次提交
    • F
      viafb: PLL value cleanup · 1f844350
      Florian Tobias Schandinat 提交于
      viafb: PLL value cleanup
      
      This is a big change of how PLL values are handled on the road to
      dynamic PLL value generation. The table was converted automatically in
      the relevant parameters for frequency generation. Sadly there were some
      bits set whose meaning is unknown. Those differences are documented
      but ignored as the unichrome code implies that they are not important
      (a big thanks to Luc for his amazing work).
      The PLL values for 31490000 and 133308000 are deleted as they were more
      than 5% off and not used anyway. The values for CX700@60466000 and
      VX855@153920000 are corrected as they were wrong and easily correctable
      as enough correct values was available because CX700 and VX855 support
      the same values only with a little difference in hardware format.
      All remaining values are not more than 2% off.
      Additionally the surrounding code is changed as needed especially the
      byte order of the values written to hardware to allow nicer conversion
      functions.
      This is mostly a change preparing for dynamic PLL generation and the two
      corrected values aside no runtime change is expected.
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      1f844350
    • F
      viafb: simplify lcd size "detection" · cc3fd679
      Florian Tobias Schandinat 提交于
      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: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      cc3fd679
  3. 12 5月, 2010 1 次提交
  4. 08 5月, 2010 6 次提交
  5. 21 4月, 2010 3 次提交
  6. 13 3月, 2010 8 次提交
    • F
      viafb: support color depth 15 and 30 · e17cea3c
      Florian Tobias Schandinat 提交于
      Add support for the color depth 15 on IGA1 and 30 on IGA1 and IGA2.  To
      allow the usage of those the driver now refuses color depth that are
      totally off and otherwise the selection in viafb_check_var is used.
      Therefore the first call to this for the first framebuffer was delayed a
      bit.  It only enables the new formats if they are requested exactly
      (viafb_bpp=15|30).
      
      As this is a new feature, no regressions are expected.  The color depth 15
      was successfully tested.  Didn't get anything usable for 30 but that might
      be the programs fault.  I would like to get some feedback whether it works
      as expected or not if somebody knows a program/configuration where it
      should.
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e17cea3c
    • F
      viafb: rework color setting · 415559fb
      Florian Tobias Schandinat 提交于
      This is a rewritten version of viafb_setcolreg.  The hardware register
      writes were split up and moved to hw.c where they belong as this is really
      low level stuff.  It was made dual fb aware.
      
      Furthermore viafb_setcmap was removed as the problem with 8bpp originated
      from a bug in writing multiple color registers at once.  The removal of
      viafb_setcmap might introduce a small performance regression but its
      certainly better to receive the correct result a bit slower than a garbled
      picture fast.  It should give us a working 8bpp mode and is more
      extensible than the old hardcoded code.  No other regressions are expected
      but as the hardware might be a bit picky it might cause some regressions
      in 8bpp mode on some hardware although I doubt that.
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      415559fb
    • F
      viafb: rework color checking · bd140691
      Florian Tobias Schandinat 提交于
      Make color checking a bit more tolerant in what values it allows and more
      fine grained to later support 15 and 30 bits formats.  It splits the
      filling of the color information in var to a seperate function and sets
      some color related values in var that where previously untouched.
      
      This could be a bug fix but at least I don't know any applications that
      was fooled by not correctly setting the fields in var.  At least no
      regressions are expected.
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bd140691
    • F
      viafb: remove dead code due to IGA1_IGA2 · 4bbac05f
      Florian Tobias Schandinat 提交于
      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: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4bbac05f
    • F
      viafb: split color mode setting up · daacccd1
      Florian Tobias Schandinat 提交于
      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: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      daacccd1
    • F
      viafb: video address setting revisited · ee79d54d
      Florian Tobias Schandinat 提交于
      Set always the correct video address.  Especially do panning right on
      multiple IGAs.
      
      This should have no effect on single monitor mode (no SAMM, no dual fb).
      For SAMM without dual fb this might break something as I really cannot
      image what we are supposed to do for different resolutions with a single
      framebuffer as we can't get data out of nowhere (no, they are not set up
      in something one would call "expanded").  Previously I got for that funny
      colored pictures as the second IGA pointed to video memory that was never
      written to.  After the patch it'll work as cloning if the first and second
      mode are identical (this was working already without SAMM).  Finally for
      dual fb this should push us a step in the right direction.
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ee79d54d
    • F
      viafb: some dvi cleanup · c5f06f5c
      Florian Tobias Schandinat 提交于
      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: NFlorian 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c5f06f5c
    • F
      viafb: split global index up · dd73d686
      Florian Tobias Schandinat 提交于
      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: NFlorian 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd73d686
  7. 23 9月, 2009 6 次提交
  8. 08 8月, 2009 1 次提交
    • F
      viafb: fix rmmod bug · 52159444
      Florian Tobias Schandinat 提交于
      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: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Scott Fang <ScottFang@viatech.com.cn>
      Cc: Joseph Chan <JosephChan@via.com.tw>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      52159444
  9. 17 10月, 2008 1 次提交