Re: Graphics driver and CONFIG_ACPI

2021-11-26 Thread Riza Dindir
Hello,

On Fri, Nov 26, 2021 at 11:09 AM Taylor R Campbell
 wrote:
>
> > Date: Fri, 26 Nov 2021 05:19:57 +
> > From: Riza Dindir 
> >
> > 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.

Will do that. Was not sure of doing that.

>
> 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.

OK. I will be checking out that code, and try building the kernel, and
go from there.

Regards,
Riza


Re: Graphics driver and CONFIG_ACPI

2021-11-26 Thread Taylor R Campbell
> Date: Fri, 26 Nov 2021 05:19:57 +
> From: Riza Dindir 
> 
> 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.


Re: Graphics driver and CONFIG_ACPI

2021-11-25 Thread Riza Dindir
Hello again,

I am having trouble getting information on how to have CONFIG_ACPI defined?

I have been working on getting my radeon devices (Kaveri and OPAL XT)
to work with NetBSD (9.2 - amd64). I have been successful in making
the Kaveri device work on my system. I have found the bios in the ACPI
tables. I also have revised the radeon_acpi_vfct_bios() function. But
this function only works when CONFIG_ACPI is set/defined. So I have
moved that function out of the CONFIG_ACPI condition. I am thinking
that this might not be the correct way of doing this.

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?

Would appreciate any help you can provide.

Thanks in advance.

Regards,
Riza

On Sat, Nov 20, 2021 at 6:00 AM Riza Dindir  wrote:
>
> Hello,
>
> I am trying to make the radeonr7 m265 display device to work on NetBSD
> 9.2 (amd64). In the radeon_bios.c file there is a definition used,
> named CONFIG_ACPI. Some functions are using this definition. I want to
> enable this. Where can I do this? In the configuration file (GENERIC
> for instance) or someplace else?
>
> Regards
> Riza


re: Graphics driver and CONFIG_ACPI

2021-11-20 Thread matthew green
> I am trying to make the radeonr7 m265 display device to work on NetBSD
> 9.2 (amd64). In the radeon_bios.c file there is a definition used,
> named CONFIG_ACPI. Some functions are using this definition. I want to
> enable this. Where can I do this? In the configuration file (GENERIC
> for instance) or someplace else?

CONFIG_ACPI needs work to run last i tried.

you can simply put "options CONFIG_ACPI" into your kernel config
to try it, but last i tried it did not build (it might work if
you remove i915 and nouveau drivesr, or, at least require far
less effort in this case.)


i also encourage you to try the new drm code we're working on,
you can fit the latest copy here:

   https://github.com/riastradh/netbsd-src/tree/rereredrm56


.mrg.