Code Monkey home page Code Monkey logo

mach64-drm's Introduction

mach64-drm

Linux DRM module for Mach64 chips

mach64-drm's People

Contributors

benpicco avatar trya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mach64-drm's Issues

Unable to load module (crashes at drm_legacy_pci_init)

Compiled in Alpine Linux x86 running kernel version 4.14.167.

Is this the driver's fault or the kernel's?

[   22.952032] WARNING: CPU: 0 PID: 1945 at /home/buildozer/aports/main/linux-vanilla/src/linux-4.14/drivers/gpu/drm/drm_pci.c:299 drm_legacy_pci_init+0x30/0xaa [drm]
[   22.952036] Modules linked in: mach64(O+) nls_utf8 nls_cp437 vfat fat joydev snd_ymfpci snd_ac97_codec mousedev snd_mpu401_uart pcmcia snd_opl3_lib snd_hwdep snd_rawmidi snd_seq_device rndis_host snd_pcm cdc_ether yenta_socket usbnet snd_timer evdev input_leds psmouse drm serio_raw mii firewire_ohci pcspkr pcmcia_rsrc snd pcmcia_core firewire_core ipv6 soundcore ac97_bus shpchp sony_laptop rfkill af_packet i2c_piix4 i2c_core crc_itu_t intel_agp intel_gtt agpgart thermal video floppy battery button ac crc32c_generic sr_mod cdrom uhci_hcd ehci_pci ehci_hcd ata_generic pata_acpi ata_piix libata loop ext4 crc16 mbcache jbd2 usb_storage usbcore sd_mod scsi_mod
[   22.952167] CPU: 0 PID: 1945 Comm: modprobe Tainted: G        W  O    4.14.167-0-vanilla #1-Alpine
[   22.952180] Hardware name: Sony Corporation     PCG-F809K(DE)       /PCG-F809K(DE)       , BIOS R0204K2 08/28/00
[   22.952188] task: c7240000 task.stack: c7a94000
[   22.952245] EIP: drm_legacy_pci_init+0x30/0xaa [drm]
[   22.952249] EFLAGS: 00010246 CPU: 0
[   22.952253] EAX: 00000000 EBX: c8b72000 ECX: 00000000 EDX: c8ded12d
[   22.952258] ESI: 00000000 EDI: c8edc0a0 EBP: c7a95df4 ESP: c7a95de0
[   22.952262]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[   22.952267] CR0: 80050033 CR2: b7f612c0 CR3: 07a6a000 CR4: 00000690
[   22.952272] Call Trace:
[   22.952290]  ? 0xc8b72000
[   22.952315]  mach64_init+0x1c/0x1000 [mach64]
[   22.952330]  do_one_initcall+0x96/0x13d
[   22.952350]  ? kmem_cache_alloc_trace+0xed/0x14a
[   22.952375]  ? do_init_module+0x21/0x1be
[   22.952386]  do_init_module+0x50/0x1be
[   22.952397]  load_module+0x1a3e/0x1e23
[   22.952416]  SyS_finit_module+0x71/0x87
[   22.952431]  do_fast_syscall_32+0xe5/0x196
[   22.952452]  entry_SYSENTER_32+0x4e/0x7c
[   22.952459] EIP: 0xb7effc09
[   22.952462] EFLAGS: 00000286 CPU: 0
[   22.952467] EAX: ffffffda EBX: 00000004 ECX: 00425e1c EDX: 00000000
[   22.952471] ESI: b7f8df40 EDI: b7efbd30 EBP: 00000000 ESP: bfda8efc
[   22.952475]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b
[   22.952480] Code: 55 89 e5 57 56 53 89 c7 83 ec 08 89 55 ec 68 2d d1 de c8 6a 01 68 2f d1 de c8 e8 15 eb ff ff 83 c4 0c f6 87 bc 00 00 00 02 75 09 <0f> 0b b8 ea ff ff ff eb 69 8d 87 cc 00 00 00 c7 45 f0 00 00 00
[   22.952593] ---[ end trace 92f297a2018e7dc8 ]---

Issues with Kernel 5.4 (?)

Thank you for your work to keep this driver alive. I have recently started a "Retro" branch for AOSC OS, which targets legacy hardware. Things are going well on my Compaq Armada M300. However, I hit a snag when trying to enable DRI support for the laptop.


The bug report below was originally filed over at the Xorg Server upstream, would you be so kind to take a look at the issue below?

  • Linux Kernel version: 5.4.29
  • Xorg Server version: 1.20.6
  • Mesa version: 19.2.3, with mach64_dri.so packaged from 7.11.2.
  • xf86-video-mach64: 6.9.6 (with patch to fix EXA)
  • mach64drm from here
    • Removed DRIVER_IRQ_SHARED from line 76 in mach64_drv.c to fix build on Kernel 5.4.

When attempting to start X with the following configuration (resolution set to 800x600x16 as my laptop only has 4MiB of SGRAM)...

Section "Device"
        Identifier      "card0"
        Driver          "mach64"
        Option          "AccelMethod"   "EXA"
        Option          "ForcePCIMode"  "true"
        Option          "DMAMode"       "async"
EndSection

Section "Screen"
        Identifier      "screen0"
        DefaultDepth    16
        SubSection      "Display"
                Viewport        0 0
                Depth           16
                Modes           "800x600"
        EndSubSection
EndSection

The system freezes on a blank screen, and keyboard is frozen. However, system did not seem to have crashed, as it shuts down normally if I press the power button once. Upon reboot, /var/log/Xorg.0.log shows the following error (full log attached below)...

[   373.248] (EE) MACH64(0): [drm] failed to setup DRM signal handler
[   373.248] (EE) MACH64(0): [dri] DRIScreenInit Failed

The DRI driver seemed to have been detected and loaded, if I understood correctly. However, the two lines above are the final lines that X would print out, before the system "froze" in a blank screen.

The mach64 Kernel DRM driver also appears to have loaded correctly (though I haven't tested it in any other way, suggestions welcome)...

[38.270691] [drm] Initialized mach64 2.0.0 20060718 for 000:00:05.0 on minor 0

X also starts up "correctly," if the resolution was reset to native (1024x768x32), and X would return an error about insufficient memory for setting up a DRI screen.

Xorg.0.log

Issues with Kernel 5.8

This doesn't seem to build against my Kernel 5.8.14. I'm using Arch Linux 32 through the AUR package, but the AUR build script has some other pending issues at the moment, so I'd suggest building against a stock 5.8.x kernel.

It seems like the drm/drm_pci.h header included from mach64_dma.c has been moved or renamed in the kernel headers. I think it was renamed to drm/drm_legacy.h, but even after swapping that header name, I wasn't able to build due to other build errors.

Let me know if you need anything more from me, and thanks for bringing this component back to life!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.