On Tue, Jul 26, 2022 at 04:22:46PM +0000, Bill Chatfield wrote:
> I apologize if this is a stupid question, but would it be possible
> to write a new driver for the i810 that works with drm/dri? I would
> be interested in giving it a try. I don't know what the blockers
> might be though. I know a GPU driver is really hard, but I believe I
> could figure it out. There's a lot of code I could reference. 
> 

Hi,

You'd need to write a *kernel* driver that presents a minimal drm/kms
interface to userland so that the modesetting X driver can be used.
the rkdrm(4) driver is an example of such a driver, although it
doesn't do any video mode management (it only uses the available mode
from the boot loader)

Another approach would be to write a bit-mapped wsdisplay(4) kernel
driver in order to use the wsfb X driver.

In both cases you need to be able to switch the i810 to graphics mode,
probe the output for supported frequencies and handle the resolution
in terms of VESA modes and present the framebuffer as a linear array
of pixels to the kernel. drm/kms offers more flexibility than
wsdisplay if you want to support a wide range of outputs (dual
monitors,... )

That said, I think the reason that it stopped working at some point
with Mesa and Linux DRM drivers is that i810 was a strange beast and
getting these simple functions to work may require some work. At some
point I had 2 machines with different variants of i810 and they each
had their own set of bugs / mis-features.

Also I think this one of the reason why the vesa X driver doesn't work
too well (or at all) on these GPUs, it may be that the BIOS vendor
didn't bother to support anything but text modes correctly. (the vesa
driver relies on the card's BIOS (well the motherboard BIOS in the
i810 case) to do all the modes management I mentionned above).

And I'm not sure there is interest to make the OpenBSD grow by some kB
to support those ancient cards. But it can be a fun project.
-- 
Matthieu Herrb

Reply via email to