Back in the late 90s to early 2000s, SiS graphics chips were fairly common and found in many low-end devices. Today, the chips are still capable enough for simple graphics needs, but the graphics cards were on PCI and AGP buses. They are not usable in modern computers.

However, there exist USB-based graphics cards with a SiS 315 graphics chip. Those are around on Ebay et al [1] and easily usable with current computers. I already do have a driver for the old PCI-based SiS drivers and have long been struggling to find something useful to do with it. Converting it to serve USB devices would finally make it useful.

The goal for Hackweek 20 is to dedust my SiS driver and make it work with the 315 chip. That might take a bit or not; I'm not sure yet. Afterwards, the PCI I/O needs to be replaced with corresponding USB operations.

There are quite a few resources. My PCI driver is at [2]. For the USB devices, there exists an old userspace driver at [3] and a kernel stub at [4]. A general description of the device can be found in the Wayback Machine. [5]

If successful, the driver is supposed to be included in the upstream kernel.

[1] https://www.amazon.com/Tritton-TRI-UV100-SEE2-SVGA-Adapter/dp/B0003NFY1E

[2] https://gitlab.freedesktop.org/tzimmermann/linux/tree/sisvga

[3] https://gitlab.freedesktop.org/xorg/driver/xf86-video-sisusb

[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/misc/sisusbvga?h=v5.11

[5] https://web.archive.org/web/20100610174735/http://www.winischhofer.eu/linuxsisusbvga.shtml

Looking for hackers with the skills:

kernel graphics drm usb

This project is part of:

Hack Week 20

Activity

  • over 3 years ago: fos liked this project.
  • over 3 years ago: ptesarik liked this project.
  • over 3 years ago: tdz liked this project.
  • over 3 years ago: tdz started this project.
  • over 3 years ago: tdz added keyword "kernel" to this project.
  • over 3 years ago: tdz added keyword "graphics" to this project.
  • over 3 years ago: tdz added keyword "drm" to this project.
  • over 3 years ago: tdz added keyword "usb" to this project.
  • over 3 years ago: tdz originated this project.

  • Comments

    • tdz
      over 3 years ago by tdz | Reply

      Day 1: Today I returned to my old driver for SiS PCI devices, which used to work 3yrs ago. Admittedly, the driver has bit-rotted quite a bit. I since updated it and added atomic modesetting. But I never really tested these changes. I can get the modes from the monitor via EDID functionality and the driver now detects the VRAM size correctly. My monitor reports a signal error, which indicates a bug when programming display resolution or timing. Fixing the driver is what I currently do. I'll also have to update it for the 315 chip. My hope is that I can then replace the PCI-bus functionality with USB and have a semi-working USB driver later this week.

    • tdz
      over 3 years ago by tdz | Reply

      Day 2: I'm still working on getting the old PCI-based SiS driver to work correctly within the current kernel. I managed to get the display mode set and improved color-format settings. The display still looks wrong, but it's getting better. I give it one more day. No matter what the state is tomorrow, I'll push for USB support on Thursday.

    • tdz
      over 3 years ago by tdz | Reply

      Day 3: The old driver uses the device VRAM directly. Today I converted it to DRM's SHMEM helpers. This is necessary to work with the USB device. SHMEM buffers will serve as shadow framebuffers that the driver can copy over USB into the device's memory.

    • tdz
      over 3 years ago by tdz | Reply

      Day 4: I began to turn the PCI driver into a USB driver. Each PCI I/O operation has to be converted to a USB bulk message. The rsp code is already in the old kernel stub driver somewhere. The PCI device is a VGA card and therefore POSTed by the BIOS. For the USB device, I expect that there might be an additional POST process necessary. The old userspace driver should have the rsp code somewhere. No way I'll be able to finish all of this by the end of the week.

    • tdz
      over 3 years ago by tdz | Reply

      Day 5: After some back and forth, I'm able to communicate with the USB device. No mode setting yet, just basic communication. I extracted this form the old sisusb driver in the kernel. I'll probably continue this project during the next hackweek.

    Similar Projects

    Create a DRM driver for VGA video cards by tdz

    Yes, those VGA video cards. The goal of this project is to implement a DRM graphics driver for such devices. While actual hardware is hard to obtain or even run today, qemu emulates VGA output.

    VGA has a number of limitations, which make this project interesting.

    • There are only 640x480 pixels (or less) on the screen. That resolution is also a soft lower limit imposed by DRM. It's mostly a problem for desktop environments though.
    • Desktop environments assume 16 million colors, but there are only 16 colors with VGA. VGA's 256 color palette is not available at 640x480. We can choose those 16 colors freely. The interesting part is how to choose them. We have to build a palette for the displayed frame and map each color to one of the palette's 16 entries. This is called dithering, and VGA's limitations are a good opportunity to learn about dithering algorithms.
    • VGA has an interesting memory layout. Most graphics devices use linear framebuffers, which store the pixels byte by byte. VGA uses 4 bitplanes instead. Plane 0 holds all bits 0 of all pixels. Plane 1 holds all bits 1 of all pixels, and so on.

    The driver will probably not be useful to many people. But, if finished, it can serve as test environment for low-level hardware. There's some interest in supporting old Amiga and Atari framebuffers in DRM. Those systems have similar limitations as VGA, but are harder to obtain and test with. With qemu, the VGA driver could fill this gap.

    Apart from the Wikipedia entry, good resources on VGA are at osdev.net and FreeVGA


    Kill DMA and DMA32 memory zones by ptesarik

    Description

    Provide a better allocator for DMA-capable buffers, making the DMA and DMA32 zones obsolete.

    Goals

    Make a PoC kernel which can boot a x86 VM and a Raspberry Pi (because early RPi4 boards have some of the weirdest DMA constraints).

    Resources

    • LPC2024 talk:
    • video:


    Modernize ocfs2 by goldwynr

    Ocfs2 has gone into a stage of neglect and disrepair. Modernize the code to generate enough interest.

    Goals: * Change the mount sequence to use fscontext * Move from using bufferhead to bio/folios * Use iomap * Run it through xfstests


    Contributing to Linux Kernel security by pperego

    Description

    A couple of weeks ago, I found this blog post by Gustavo Silva, a Linux Kernel contributor.

    I always strived to start again into hacking the Linux Kernel, so I asked Coverity scan dashboard access and I want to contribute to Linux Kernel by fixing some minor issues.

    I want also to create a Linux Kernel fuzzing lab using qemu and syzkaller

    Goals

    1. Fix at least 2 security bugs
    2. Create the fuzzing lab and having it running

    Resources

    The dashboard

    The serie of blog posts by Gustavo Silva inspiring this project.

    An email with some quick "where to start" instructions The patchset philosophy


    Linux on Cavium CN23XX cards by tsbogend

    Before Cavium switched to ARM64 CPUs they developed quite powerful MIPS based SOCs. The current upstream Linux kernel already supports some Octeon SOCs, but not the latest versions. Goal of this Hack Week project is to use the latest Cavium SDK to update the Linux kernel code to let it running on CN23XX network cards.


    Create DRM drivers for VESA and EFI framebuffers by tdz

    Description

    We already have simpledrm for firmware framebuffers. But the driver is originally for ARM boards, not PCs. It is already overloaded with code to support both use cases. At the same time it is missing possible features for VESA and EFI, such as palette modes or EDID support. We should have DRM drivers for VESA and EFI interfaces. The infrastructure exists already and initial drivers can be forked from simpledrm.

    Goals

    • Initially, a bare driver for VESA or EFI should be created. It can take functionality from simpledrm.
    • Then we can begin to add additional features. The boot loader can provide EDID data. With VGA hardware, VESA can support paletted modes or color management. Example code exists in vesafb.


    New openSUSE-welcome by lkocman

    Project Description

    Let's revisit our existing openSUSE welcome app.

    My goal was to show Leap 16 in a new coat. Welcome app adds to the first time use experience. We've recently added donation button to our existing welcome.

    Some things that I recently wanted to address were EOL and possibly upgrade notification.

    I've already done some experiments with mint welcome app, but not sure if it's better than the existing one.

    There is also a PR to rework existing app https://github.com/openSUSE/openSUSE-welcome/pull/36 (this should be considered as an option too)

    Goal for this Hackweek

    New welcome app, possibly with EOL notification for Leap.

    1) Welcome application(s) with (rebrand changes) maintained under github.com/openSUSE

    2) Application is submitted to openSUSE:Factory && openSUSE:Leap:16.0

    3) Updated needles in openQA (probably post hackweek)

    Resources

    Reddit discussion about the best welcome app out there.

    Github repo for the current welcome app.


    Create a DRM driver for VGA video cards by tdz

    Yes, those VGA video cards. The goal of this project is to implement a DRM graphics driver for such devices. While actual hardware is hard to obtain or even run today, qemu emulates VGA output.

    VGA has a number of limitations, which make this project interesting.

    • There are only 640x480 pixels (or less) on the screen. That resolution is also a soft lower limit imposed by DRM. It's mostly a problem for desktop environments though.
    • Desktop environments assume 16 million colors, but there are only 16 colors with VGA. VGA's 256 color palette is not available at 640x480. We can choose those 16 colors freely. The interesting part is how to choose them. We have to build a palette for the displayed frame and map each color to one of the palette's 16 entries. This is called dithering, and VGA's limitations are a good opportunity to learn about dithering algorithms.
    • VGA has an interesting memory layout. Most graphics devices use linear framebuffers, which store the pixels byte by byte. VGA uses 4 bitplanes instead. Plane 0 holds all bits 0 of all pixels. Plane 1 holds all bits 1 of all pixels, and so on.

    The driver will probably not be useful to many people. But, if finished, it can serve as test environment for low-level hardware. There's some interest in supporting old Amiga and Atari framebuffers in DRM. Those systems have similar limitations as VGA, but are harder to obtain and test with. With qemu, the VGA driver could fill this gap.

    Apart from the Wikipedia entry, good resources on VGA are at osdev.net and FreeVGA


    Finish gfxprim application multiplexor (window manager) by metan

    Project Description

    I've implemented drivers for a few e-ink displays during the last hackweek and made sure that gfxprim widgets run nicely on e-ink as well. The missing piece to have a portable e-ink computer/reader/music player/... is a application that can switch between currently running applications and that can start new applications as well. Half of the solution is ready, there is a proxy gfxprim backend where applications render into a piece of a shared memory and input events (e.g. keyboard, mouse) can be multiplexed. What is missing is an interface (possibly touchscreen friendly as well) to make it user friendly.

    Goal for this Hackweek

    Make nekowm usable "window manager".

    Resources


    Create a DRM driver for VGA video cards by tdz

    Yes, those VGA video cards. The goal of this project is to implement a DRM graphics driver for such devices. While actual hardware is hard to obtain or even run today, qemu emulates VGA output.

    VGA has a number of limitations, which make this project interesting.

    • There are only 640x480 pixels (or less) on the screen. That resolution is also a soft lower limit imposed by DRM. It's mostly a problem for desktop environments though.
    • Desktop environments assume 16 million colors, but there are only 16 colors with VGA. VGA's 256 color palette is not available at 640x480. We can choose those 16 colors freely. The interesting part is how to choose them. We have to build a palette for the displayed frame and map each color to one of the palette's 16 entries. This is called dithering, and VGA's limitations are a good opportunity to learn about dithering algorithms.
    • VGA has an interesting memory layout. Most graphics devices use linear framebuffers, which store the pixels byte by byte. VGA uses 4 bitplanes instead. Plane 0 holds all bits 0 of all pixels. Plane 1 holds all bits 1 of all pixels, and so on.

    The driver will probably not be useful to many people. But, if finished, it can serve as test environment for low-level hardware. There's some interest in supporting old Amiga and Atari framebuffers in DRM. Those systems have similar limitations as VGA, but are harder to obtain and test with. With qemu, the VGA driver could fill this gap.

    Apart from the Wikipedia entry, good resources on VGA are at osdev.net and FreeVGA


    Create DRM drivers for VESA and EFI framebuffers by tdz

    Description

    We already have simpledrm for firmware framebuffers. But the driver is originally for ARM boards, not PCs. It is already overloaded with code to support both use cases. At the same time it is missing possible features for VESA and EFI, such as palette modes or EDID support. We should have DRM drivers for VESA and EFI interfaces. The infrastructure exists already and initial drivers can be forked from simpledrm.

    Goals

    • Initially, a bare driver for VESA or EFI should be created. It can take functionality from simpledrm.
    • Then we can begin to add additional features. The boot loader can provide EDID data. With VGA hardware, VESA can support paletted modes or color management. Example code exists in vesafb.