tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Graphics driver and CONFIG_ACPI



> Date: Fri, 26 Nov 2021 05:19:57 +0000
> From: Riza Dindir <riza.dindir%gmail.com@localhost>
> 
> I do not know where to define CONFIG_ACPI. It is not being defined (as
> it seems) for radeon, but for the i915 device it is being defined. I
> could do the same thing as it is done in the i915 driver code, but
> again, I am not sure about that either.
> 
> Does anybody have an idea on where this definition (CONFIG_ACPI)
> should be defined, for radeon?

Since there's not a lot of upstream code using CONFIG_ACPI but it
tends to require manual effort to port (the Linux acpica API
is...annoyingly different from everyone else's, like changing the case
of every name and using structs instead of unions or vice versa so
it's not a simple matter of adding some typedefs and wrapper
functions), what I've done is just define it conditionally based on
NACPICA in the places where I have made the necessary adjustments.

In this case, I'd probably just put it in radeon.h:

#include "acpica.h"
#if NACPICA > 0
#define	CONFIG_ACPI 1
#endif

It's not a great system but it serves for now.  If it starts getting
out of hand we can find another way to do it.

FYI: Current development on the kernel graphics stack is happening at
https://github.com/riastradh/netbsd-src in the re4drm56 branch (which
is kind of messy and is rebased and squashed often, so be prepared for
forced updates, although might be merged soon).  For radeon there's
not many differences because new upstream development is mostly
happening on amdgpu, but you might want to work on re4drm56 to avoid
duplicating effort.


Home | Main Index | Thread Index | Old Index