13 May, 2009

1 commit

  • Fix a bug in viafb on x86_64 builds (e.g. for VIA Nano CPU).

    You cannot make the assumption that sizeof(unsigned int) ==
    sizeof(unsigned long), so the parsing of the default mode (640x480) fails,
    leading to a division by zero during insmod of the driver.

    Signed-off-by: Harald Welte
    Cc:
    Cc:
    Cc: Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harald Welte
     

01 Apr, 2009

1 commit


31 Mar, 2009

1 commit

  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

07 Jan, 2009

1 commit

  • Fix this sparse warnings:

    drivers/video/via/viafbdev.c:871:3: warning: returning void-valued expression
    drivers/video/via/viafbdev.c:938:3: warning: returning void-valued expression
    drivers/video/via/viafbdev.c:995:3: warning: returning void-valued expression

    Signed-off-by: Hannes Eder
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hannes Eder
     

05 Jan, 2009

1 commit

  • The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits;
    CURSOR_SIZE is defined as (8 * 1024). Using up twice 1k on stack is too
    much for 4k-stack (though it works with 8k-stacks). Make those two
    variables kzalloc'ed to preserve stack space.

    Also merge the whole lot of local struct's in viafb_ioctl into a union so
    the stack usage gets minimized here as well. (struct's are only accessed
    in their indicidual IOCTL case) This second part is only compile-tested as
    I know of no userspace app using the IOCTLs.

    Signed-off-by: Bruno Prémont
    Cc:
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bruno Prémont
     

20 Nov, 2008

1 commit

  • When unloading viafb module it does not remove it's /proc/viafb/ subtree
    which causes multiple viafb directories to appear below proc when
    mobprobing viafb and also lets kernel WARN() on duplicate proc entries:

    [ 145.458387] WARNING: at /usr/src/linux-2.6.28-rc3-git6/fs/proc/generic.c:551 proc_register+0xe6/0x160()
    [ 145.458945] proc_dir_entry '/proc/viafb' already registered
    [ 145.459278] Modules linked in: viafb(+) i2c_algo_bit cfbcopyarea cfbimgblt cfbfillrect snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sg via_agp agpgart [last unloaded: drm]
    [ 145.460647] Pid: 1904, comm: modprobe Tainted: G W 2.6.28-rc3-git6 #4
    [ 145.461064] Call Trace:
    [ 145.461248] [] ? dump_stack+0x1/0x80
    [ 145.461533] [] warn_slowpath+0x63/0x80
    [ 145.461851] [] ? idr_get_empty_slot+0xe9/0x250
    [ 145.462186] [] ? ida_get_new_above+0xf0/0x150
    [ 145.462528] [] proc_register+0xe6/0x160
    [ 145.462827] [] proc_mkdir_mode+0x36/0x50
    [ 145.463135] [] proc_mkdir+0xf/0x20
    [ 145.463457] [] viafb_init+0x73c/0xc86 [viafb]
    [ 145.463823] [] ? viafb_init+0x0/0xc86 [viafb]
    [ 145.464147] [] do_one_initcall+0x2d/0x160
    [ 145.464460] [] ? sysfs_add_file+0x13/0x20
    [ 145.464786] [] ? vfree+0x21/0x30
    [ 145.465049] [] ? load_module+0x1215/0x1500
    [ 145.465381] [] ? __alloc_pages_internal+0x95/0x400
    [ 145.465755] [] sys_init_module+0x83/0x1a0
    [ 145.466065] [] ? sys_read+0x3d/0x70
    [ 145.466354] [] sysenter_do_call+0x12/0x25
    [ 145.466653] ---[ end trace c84b37826e16748c ]---

    Signed-off-by: Bruno Prémont
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bruno Prémont
     

31 Oct, 2008

1 commit


17 Oct, 2008

12 commits

  • via_utility.c, via_utility.h: support user mode application with
    additional information vt1636.c, vt1636.h: setting for chip vt1636

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • via_i2c.c, via_i2c.h: Implement i2c specification.
    viamode.c, viamode.c: all support modes information.

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • Remove the macro MMIO_OUT32, and replace it with writel() function.
    And replace "u32" with "unsigned long" in writel() function (original
    MMIO_OUT32 marco) for avoiding warning message in 64bit OS.

    Signed-off-by: Joseph Chan
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • Correct by following Jiri Slaby's suggestions.

    Initialization, remove and some other important functions of viafb.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • tbl1636.c, tbl1636.h: patch setting for VT1636.
    tblDPASetting.c, tblDPASetting.h: patch for graphic clock skew.

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • Makefile for drivers/video/via/
    share.h: shared macro for viafb

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

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

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • iface.c, iface.h: support getting video memory from backdoor.
    ioctl.c, ioctl.h: support user mode application with additional information

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • Display HW setting and other chips initialization.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • 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
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • Header file of information about via chipsets and debug function.

    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan
     
  • 2D and HW cursor stuff of viafb driver.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joseph Chan
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Chan