RE: [patch 1/5] drm/via: add VIA Chrome9 chipset support

2009-11-20 Thread BruceChang
Hello Thomas:
 I know this kernel module is made for VIAs own X.org driver and not 
 openchrome but:
  1. I don't think userspace should be able to easily trigger a kernel oops, 
 and
  2. Can't this new VIA Chrome9 DRM interface be made more compatible to the
existing one? Ideally it would simply work with the existing/slightly
modified (with the support from VIA?!) opensource openchrome driver...
Yes, we had discussion for this early this year with openchrome. And the 
conclusion we got at that time is that openchrome and VIA will go in different 
DRM module. 
Thanks and Best Regards
=
Bruce C. Chang(張祖明)
VIA Technologies, Inc. 
Address: 1F, 531, Chung-Cheng Road, Hsin-Tien, 231 Taipei
Tel: +886-2-22185452 Ext 7323
Fax: +886-2-22186282
Skype: Bruce.C.Chang
Email: brucech...@via.com.tw



From: Thomas Schlichter [mailto:thomas.schlich...@web.de]
Sent: 2009/11/19 [星期四] 07:24
To: Bruce Chang
Cc: Benjamin Pan (Fremont); airl...@linux.ie; Joseph Chan; 
a...@linux-foundation.org; dri-devel@lists.sourceforge.net
Subject: Re: [patch 1/5] drm/via: add VIA Chrome9 chipset support



brucech...@via.com.tw wrote:
 Hello Sirs:
 Thank you very much for your help on adding VX800 PCIIDS. I would also
  like to share the DRM patch I have for VIA Chrome9 graph as below. The
  32bit/64bit issue is solved with comp_ioctl which is used by most of the
  GFX chipset. This patch has been verified under Ubuntu 9.04+Upgraded
  kernel 2.6.32-rc5 with (1) 2D source code which is released on
  http://linux.via.com.tw/support/beginDownload.action?eleid=310fid=605
  with EXA (2) 3D driver which is release on
  http://linux.via.com.tw/support/beginDownload.action?eleid=341fid=642. It
  supports CN896/VX800/VX855 chipsets.

I tested this VIA Chrome9 DRM driver under Ubuntu 9.10 and its patched
2.6.31.4 kernel. It loads fine, bus as soon as I start my openchrome Xserver
(compiled for 1.6.4, module version = 0.2.904) I get following Oops:

~~ Here the via_chome9 DRM driver is loaded ~~

Nov 18 23:50:41 netbook kernel: [  729.223543] [drm] Initialized drm 1.1.0 
20060810
Nov 18 23:50:41 netbook kernel: [  729.231046] [drm] via_chrome9 verify 
function enabled.
Nov 18 23:50:41 netbook kernel: [  729.231100] pci :00:01.0: PCI INT A - 
GSI 16 (level, low) - IRQ 16
Nov 18 23:50:41 netbook kernel: [  729.231291] [drm] Initialized via_chrome9 
2.11.1 20080415 for :00:01.0 on minor 0

~~ Here I start the X.org server ~~

Nov 18 23:51:01 netbook kernel: [  749.340827] *pde = 6ef77067
Nov 18 23:51:01 netbook kernel: [  749.340844] Modules linked in: via_chrome9 
drm ppdev agpgart iptable_filter ip_tables acpi_cpufreq
bridge stp x_tables bnep snd_hda_codec_realtek snd_hda_intel snd_hda_codec 
snd_hwdep arc4 snd_pcm_oss ecb snd_mixer_oss snd_pcm
snd_seq_dummy uvcvideo ath5k snd_seq_oss videodev mac80211 led_class 
snd_seq_midi joydev i2c_viapro lp v4l1_compat via_sdmmc btusb ath
snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd soundcore 
psmouse snd_page_alloc cfg80211 serio_raw parport video
output sky2 [last unloaded: drm]
Nov 18 23:51:01 netbook kernel: [  749.340906]
Nov 18 23:51:01 netbook kernel: [  749.340913] Pid: 2407, comm: Xorg Not 
tainted (2.6.31.4-via-pdc-short #5) NC20/NB20 
Nov 18 23:51:01 netbook kernel: [  749.340919] EIP: 0060:[f822acf2] EFLAGS: 
00013246 CPU: 0
Nov 18 23:51:01 netbook kernel: [  749.340928] EIP is at 
via_chrome9_ioctl_allocate_event_tag+0x22/0x60 [via_chrome9]
Nov 18 23:51:01 netbook kernel: [  749.340934] EAX:  EBX: f6a86180 ECX: 
 EDX: f6adfe70
Nov 18 23:51:01 netbook kernel: [  749.340939] ESI: f64bd400 EDI: f8233ac4 EBP: 
f6adfe30 ESP: f6adfe30
Nov 18 23:51:01 netbook kernel: [  749.340944]  DS: 007b ES: 007b FS: 00d8 GS: 
00e0 SS: 0068
Nov 18 23:51:01 netbook kernel: [  749.340957]  f6adff00 f8493600 0001 
f84a3834 f84a2e16 f84a4784 0967 40086443
Nov 18 23:51:01 netbook kernel: [  749.340967] 0 0043 e200 0001 
0043 f822acd0 f6adfe70 f6adfe70 40086443
Nov 18 23:51:01 netbook kernel: [  749.340978] 0 00fa1400 0f01d7e0 c1d6c584 
0085 f6f75730 f6f7567c f64a2bb0 f6f7572c
Nov 18 23:51:01 netbook kernel: [  749.341056]  [f8493600] ? 
drm_ioctl+0x180/0x360 [drm]
Nov 18 23:51:01 netbook kernel: [  749.341067]  [f822acd0] ? 
via_chrome9_ioctl_allocate_event_tag+0x0/0x60 [via_chrome9]
Nov 18 23:51:01 netbook kernel: [  749.341078]  [c01b0363] ? 
filemap_fault+0xb3/0x400
Nov 18 23:51:01 netbook kernel: [  749.341089]  [c023985d] ? 
ext3_file_write+0x2d/0xc0
Nov 18 23:51:01 netbook kernel: [  749.341100]  [c01de34e] ? 
mem_cgroup_update_mapped_file_stat+0x1e/0x70
Nov 18 23:51:01 netbook kernel: [  749.341106]  [c01ae821] ? 
unlock_page+0x41/0x50
Nov 18 23:51:01 netbook kernel: [  749.341118]  [c01c62c8] ? 
__do_fault+0x388/0x470
Nov 18 23:51:01 netbook kernel: [  749.341125]  [c01efa03] ? 
vfs_ioctl+0x73/0x90
Nov 18 23:51:01 netbook kernel

Re: [patch 1/5] drm/via: add VIA Chrome9 chipset support

2009-11-19 Thread Thomas Schlichter
brucech...@via.com.tw wrote:
 Hello Sirs:
 Thank you very much for your help on adding VX800 PCIIDS. I would also
  like to share the DRM patch I have for VIA Chrome9 graph as below. The
  32bit/64bit issue is solved with comp_ioctl which is used by most of the
  GFX chipset. This patch has been verified under Ubuntu 9.04+Upgraded
  kernel 2.6.32-rc5 with (1) 2D source code which is released on
  http://linux.via.com.tw/support/beginDownload.action?eleid=310fid=605
  with EXA (2) 3D driver which is release on
  http://linux.via.com.tw/support/beginDownload.action?eleid=341fid=642. It
  supports CN896/VX800/VX855 chipsets.

I tested this VIA Chrome9 DRM driver under Ubuntu 9.10 and its patched
2.6.31.4 kernel. It loads fine, bus as soon as I start my openchrome Xserver
(compiled for 1.6.4, module version = 0.2.904) I get following Oops:

~~ Here the via_chome9 DRM driver is loaded ~~

Nov 18 23:50:41 netbook kernel: [  729.223543] [drm] Initialized drm 1.1.0 
20060810
Nov 18 23:50:41 netbook kernel: [  729.231046] [drm] via_chrome9 verify 
function enabled. 
Nov 18 23:50:41 netbook kernel: [  729.231100] pci :00:01.0: PCI INT A - 
GSI 16 (level, low) - IRQ 16
Nov 18 23:50:41 netbook kernel: [  729.231291] [drm] Initialized via_chrome9 
2.11.1 20080415 for :00:01.0 on minor 0

~~ Here I start the X.org server ~~

Nov 18 23:51:01 netbook kernel: [  749.340827] *pde = 6ef77067 
Nov 18 23:51:01 netbook kernel: [  749.340844] Modules linked in: via_chrome9 
drm ppdev agpgart iptable_filter ip_tables acpi_cpufreq 
bridge stp x_tables bnep snd_hda_codec_realtek snd_hda_intel snd_hda_codec 
snd_hwdep arc4 snd_pcm_oss ecb snd_mixer_oss snd_pcm 
snd_seq_dummy uvcvideo ath5k snd_seq_oss videodev mac80211 led_class 
snd_seq_midi joydev i2c_viapro lp v4l1_compat via_sdmmc btusb ath 
snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd soundcore 
psmouse snd_page_alloc cfg80211 serio_raw parport video 
output sky2 [last unloaded: drm]
Nov 18 23:51:01 netbook kernel: [  749.340906] 
Nov 18 23:51:01 netbook kernel: [  749.340913] Pid: 2407, comm: Xorg Not 
tainted (2.6.31.4-via-pdc-short #5) NC20/NB20  
Nov 18 23:51:01 netbook kernel: [  749.340919] EIP: 0060:[f822acf2] EFLAGS: 
00013246 CPU: 0
Nov 18 23:51:01 netbook kernel: [  749.340928] EIP is at 
via_chrome9_ioctl_allocate_event_tag+0x22/0x60 [via_chrome9]
Nov 18 23:51:01 netbook kernel: [  749.340934] EAX:  EBX: f6a86180 ECX: 
 EDX: f6adfe70
Nov 18 23:51:01 netbook kernel: [  749.340939] ESI: f64bd400 EDI: f8233ac4 EBP: 
f6adfe30 ESP: f6adfe30
Nov 18 23:51:01 netbook kernel: [  749.340944]  DS: 007b ES: 007b FS: 00d8 GS: 
00e0 SS: 0068
Nov 18 23:51:01 netbook kernel: [  749.340957]  f6adff00 f8493600 0001 
f84a3834 f84a2e16 f84a4784 0967 40086443
Nov 18 23:51:01 netbook kernel: [  749.340967] 0 0043 e200 0001 
0043 f822acd0 f6adfe70 f6adfe70 40086443
Nov 18 23:51:01 netbook kernel: [  749.340978] 0 00fa1400 0f01d7e0 c1d6c584 
0085 f6f75730 f6f7567c f64a2bb0 f6f7572c
Nov 18 23:51:01 netbook kernel: [  749.341056]  [f8493600] ? 
drm_ioctl+0x180/0x360 [drm]
Nov 18 23:51:01 netbook kernel: [  749.341067]  [f822acd0] ? 
via_chrome9_ioctl_allocate_event_tag+0x0/0x60 [via_chrome9]
Nov 18 23:51:01 netbook kernel: [  749.341078]  [c01b0363] ? 
filemap_fault+0xb3/0x400
Nov 18 23:51:01 netbook kernel: [  749.341089]  [c023985d] ? 
ext3_file_write+0x2d/0xc0
Nov 18 23:51:01 netbook kernel: [  749.341100]  [c01de34e] ? 
mem_cgroup_update_mapped_file_stat+0x1e/0x70
Nov 18 23:51:01 netbook kernel: [  749.341106]  [c01ae821] ? 
unlock_page+0x41/0x50
Nov 18 23:51:01 netbook kernel: [  749.341118]  [c01c62c8] ? 
__do_fault+0x388/0x470
Nov 18 23:51:01 netbook kernel: [  749.341125]  [c01efa03] ? 
vfs_ioctl+0x73/0x90
Nov 18 23:51:01 netbook kernel: [  749.341131]  [c01efbca] ? 
do_vfs_ioctl+0x6a/0x5b0
Nov 18 23:51:01 netbook kernel: [  749.341138]  [c01c7328] ? 
handle_mm_fault+0x138/0x8b0
Nov 18 23:51:01 netbook kernel: [  749.341144]  [c01e235f] ? 
rw_verify_area+0x5f/0xe0
Nov 18 23:51:01 netbook kernel: [  749.341154]  [c015cce3] ? 
hrtimer_interrupt+0x183/0x210
Nov 18 23:51:01 netbook kernel: [  749.341160]  [c01e2507] ? 
vfs_write+0x127/0x190
Nov 18 23:51:01 netbook kernel: [  749.341170]  [c056782b] ? 
do_page_fault+0x19b/0x380
Nov 18 23:51:01 netbook kernel: [  749.341176]  [c01f016f] ? 
sys_ioctl+0x5f/0x80
Nov 18 23:51:01 netbook kernel: [  749.341183]  [c01033ac] ? 
syscall_call+0x7/0xb
Nov 18 23:51:01 netbook kernel: [  749.341258] ---[ end trace 25ad901e84ee46d5 
]---
Nov 18 23:51:16 netbook kernel: [  764.057266] *pde = 6e4f1067 
Nov 18 23:51:16 netbook kernel: [  764.057282] Modules linked in: via_chrome9 
drm ppdev agpgart iptable_filter ip_tables acpi_cpufreq 
bridge stp x_tables bnep snd_hda_codec_realtek snd_hda_intel snd_hda_codec 
snd_hwdep arc4 snd_pcm_oss ecb snd_mixer_oss snd_pcm 
snd_seq_dummy uvcvideo ath5k snd_seq_oss videodev mac80211 led_class 
snd_seq_midi joydev i2c_viapro