Date: Sat, 09 Oct 2004 20:07:31 -0700 From: Nate Lawson <nate@root.org> To: Bruce M Simpson <bms@spc.org> Cc: Jordan Sissel <psionic@gmail.com> Subject: Re: Radeon AGP suspend/resume support Message-ID: <4168A773.3020705@root.org> In-Reply-To: <20041008223600.GL718@empiric.icir.org> References: <5ad23a300410071928791fa9c@mail.gmail.com> <20041008030317.GV664@empiric.icir.org> <5ad23a3004100720467646e1ea@mail.gmail.com> <20041008102758.GH718@empiric.icir.org> <20041008223600.GL718@empiric.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020201060902030102030204 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Bruce M Simpson wrote: > There are two problems with this: > 1) This uses a NetBSD specific interface, which, whilst broadly similar > to FreeBSD's apm support, is not ABI compatible with ours. > 2) The ACPI apm shim does not dispatch such events. They are only > dispatched within the system if 'real' BIOS APM support is in the > kernel. This cannot co-exist with ACPI. Furthermore they are only > announced on the /dev/apmctl device; there are some comments in the > code to this effect. Oops, forgot the attachment for FreeBSD compat defines. Here it is (untested). -Nate --------------020201060902030102030204 Content-Type: text/plain; name="x_apm.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x_apm.diff" --- bsd_apm.c.orig Sat Oct 9 12:14:26 2004 +++ bsd_apm.c Sat Oct 9 12:24:32 2004 @@ -8,12 +8,36 @@ #include "xf86_OSproc.h" #include "xf86_OSlib.h" +#ifdef __FreeBSD__ +#include <machine/apm_bios.h> +#else #include <machine/apmvar.h> +#endif #define APM_DEVICE "/dev/apm" static pointer APMihPtr = NULL; static void bsdCloseAPM(void); + +/* Compat defines for FreeBSD APM. */ +#ifdef __FreeBSD__ +#define APM_STANDBY_REQ PMEV_STANDBYREQ +#define APM_SUSPEND_REQ PMEV_SUSPENDREQ +#define APM_NORMAL_RESUME PMEV_NORMALRESUME +#define APM_CRIT_RESUME PMEV_CRITRESUME +#define APM_BATTERY_LOW PMEV_BATTERYLOW +#define APM_POWER_CHANGE PMEV_POWERCHANGE +#define APM_UPDATE_TIME PMEV_UPDATETIME +#define APM_CRIT_SUSPEND_REQ PMEV_CRITSUSPENDREQ +#define APM_USER_STANDBY_REQ PMEV_USERSTANDBYREQ +#define APM_USER_SUSPEND_REQ PMEV_USERSUSPENDREQ +#define APM_SYS_STANDBY_RESUME PMEV_STANDBYRESUME +#define APM_CAPABILITY_CHANGE PMEV_CAPABILITIESCHANGE + +#define APM_IOC_NEXTEVENT APMIO_NEXTEVENT +#define APM_IOC_STANDBY APMIO_STANDBY +#define APM_IOC_SUSPEND APMIO_SUSPEND +#endif /* __FreeBSD__ */ static struct { u_int apmBsd; --------------020201060902030102030204--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4168A773.3020705>