Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2018 09:04:57 +0100
From:      Johannes Lundberg <johalun0@gmail.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Need to reserve Intel graphics memory in early boot
Message-ID:  <CAECmPwtxnRZ3Q8T3N2qxx4_Y90_0Uwb9TaqxQ5EWVbyadVtnBw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi

I'm working on getting the graphics drivers up to Linux 4.16 version and
there has been a patch for Intel gpus that require some code in early boot.

The problem is that no all bios report the memory allocated for the gpu,
called stolen memory, correctly so on some configurations the OS can
reclaim this memory during boot that thus it's not accessible to the gpu
driver (at least that is my understanding). Drivers need the stolen memory
for frame buffer compression (fbc) to work (maybe more features as well
depend on stolen memory). The purpose of fbc is to reduce power consumption.

So, what we need to do is get the base and size of the stolen memory and
reserve it before the OS have a chance to claim it. This information will
be stored in a global variable that the drm i915 driver can later read.

The Linux implementation can be found here:
https://elixir.bootlin.com/linux/v4.16/source/arch/x86/kernel/early-quirks.c#L539

The drm and i915 driver code are dual licensed but I'm not sure about the
code in the file above, it might be GPL only.

Anyone feeling up to doing this? Or if you have any pointers as to where
would be a good place to implement this in FreeBSD, I can give it a shot.

Cheers



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAECmPwtxnRZ3Q8T3N2qxx4_Y90_0Uwb9TaqxQ5EWVbyadVtnBw>