xfree86: remove bus state change notification callback
No one is using bus notifications now. We hope that the kernel take care of this properly. For other not-so-urgent-notifications (ACPI wakeups, etc) we can just register a handler on server's scheduler (using xf86AddGeneralHandler). And for external applications, the "trend" is to use HAL to kick notifications. So we're already provided of enough notification schemes. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
parent
eb031d4013
commit
792dee3854
|
@ -123,8 +123,6 @@ extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base
|
||||||
extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
|
extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
|
||||||
extern _X_EXPORT void xf86EnterServerState(xf86State state);
|
extern _X_EXPORT void xf86EnterServerState(xf86State state);
|
||||||
extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
|
extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
|
||||||
extern _X_EXPORT void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg);
|
|
||||||
extern _X_EXPORT Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func);
|
|
||||||
|
|
||||||
extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
|
extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
|
||||||
extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
|
extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
|
||||||
|
|
|
@ -62,10 +62,6 @@ static Bool xf86ResAccessEnter = FALSE;
|
||||||
|
|
||||||
static Bool doFramebufferMode = FALSE;
|
static Bool doFramebufferMode = FALSE;
|
||||||
|
|
||||||
/* state change notification callback list */
|
|
||||||
static StateChangeNotificationPtr StateChangeNotificationList;
|
|
||||||
static void notifyStateChange(xf86NotifyState state);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call the bus probes relevant to the architecture.
|
* Call the bus probes relevant to the architecture.
|
||||||
*
|
*
|
||||||
|
@ -414,7 +410,6 @@ xf86AccessEnter(void)
|
||||||
* to any bus and let the RAC code to "open" the right bridges.
|
* to any bus and let the RAC code to "open" the right bridges.
|
||||||
*/
|
*/
|
||||||
EntityEnter();
|
EntityEnter();
|
||||||
notifyStateChange(NOTIFY_ENTER);
|
|
||||||
xf86EnterServerState(SETUP);
|
xf86EnterServerState(SETUP);
|
||||||
xf86ResAccessEnter = TRUE;
|
xf86ResAccessEnter = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -433,7 +428,6 @@ xf86AccessLeave(void)
|
||||||
{
|
{
|
||||||
if (!xf86ResAccessEnter)
|
if (!xf86ResAccessEnter)
|
||||||
return;
|
return;
|
||||||
notifyStateChange(NOTIFY_LEAVE);
|
|
||||||
EntityLeave();
|
EntityLeave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,7 +499,6 @@ xf86EnterServerState(xf86State state)
|
||||||
/* When servicing a dumb framebuffer we don't need to do anything */
|
/* When servicing a dumb framebuffer we don't need to do anything */
|
||||||
if (doFramebufferMode) return;
|
if (doFramebufferMode) return;
|
||||||
|
|
||||||
notifyStateChange(NOTIFY_ENABLE);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,7 +520,6 @@ xf86PostProbe(void)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n");
|
xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n");
|
||||||
notifyStateChange(NOTIFY_ENABLE);
|
|
||||||
doFramebufferMode = TRUE;
|
doFramebufferMode = TRUE;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -587,46 +579,6 @@ xf86FindPrimaryDevice(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg)
|
|
||||||
{
|
|
||||||
StateChangeNotificationPtr ptr =
|
|
||||||
(StateChangeNotificationPtr)xnfalloc(sizeof(StateChangeNotificationRec));
|
|
||||||
|
|
||||||
ptr->func = func;
|
|
||||||
ptr->arg = arg;
|
|
||||||
ptr->next = StateChangeNotificationList;
|
|
||||||
StateChangeNotificationList = ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func)
|
|
||||||
{
|
|
||||||
StateChangeNotificationPtr *ptr = &StateChangeNotificationList;
|
|
||||||
StateChangeNotificationPtr tmp;
|
|
||||||
|
|
||||||
while (*ptr) {
|
|
||||||
if ((*ptr)->func == func) {
|
|
||||||
tmp = (*ptr);
|
|
||||||
(*ptr) = (*ptr)->next;
|
|
||||||
xfree(tmp);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
ptr = &((*ptr)->next);
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
notifyStateChange(xf86NotifyState state)
|
|
||||||
{
|
|
||||||
StateChangeNotificationPtr ptr = StateChangeNotificationList;
|
|
||||||
while (ptr) {
|
|
||||||
ptr->func(state,ptr->arg);
|
|
||||||
ptr = ptr->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Multihead accel sharing accessor functions and entity Private handling */
|
/* Multihead accel sharing accessor functions and entity Private handling */
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -62,13 +62,6 @@ typedef struct {
|
||||||
IOADDRESS domainIO;
|
IOADDRESS domainIO;
|
||||||
} EntityRec, *EntityPtr;
|
} EntityRec, *EntityPtr;
|
||||||
|
|
||||||
/* state change notification callback */
|
|
||||||
typedef struct _stateChange {
|
|
||||||
xf86StateChangeNotificationCallbackFunc func;
|
|
||||||
pointer arg;
|
|
||||||
struct _stateChange *next;
|
|
||||||
} StateChangeNotificationRec, *StateChangeNotificationPtr;
|
|
||||||
|
|
||||||
#define ACCEL_IS_SHARABLE 0x100
|
#define ACCEL_IS_SHARABLE 0x100
|
||||||
#define IS_SHARED_ACCEL 0x200
|
#define IS_SHARED_ACCEL 0x200
|
||||||
#define SA_PRIM_INIT_DONE 0x400
|
#define SA_PRIM_INIT_DONE 0x400
|
||||||
|
|
|
@ -608,18 +608,6 @@ typedef enum {
|
||||||
OPERATING
|
OPERATING
|
||||||
} xf86State;
|
} xf86State;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
NOTIFY_SETUP_TRANSITION,
|
|
||||||
NOTIFY_SETUP,
|
|
||||||
NOTIFY_OPERATING,
|
|
||||||
NOTIFY_OPERATING_TRANSITION,
|
|
||||||
NOTIFY_ENABLE,
|
|
||||||
NOTIFY_ENTER,
|
|
||||||
NOTIFY_LEAVE
|
|
||||||
} xf86NotifyState;
|
|
||||||
|
|
||||||
typedef void (*xf86StateChangeNotificationCallbackFunc)(xf86NotifyState state,pointer);
|
|
||||||
|
|
||||||
/* DGA */
|
/* DGA */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user