summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2009-08-19 18:20:54 +0300
committerTiago Vignatti <tiago.vignatti@nokia.com>2009-08-20 13:57:45 +0300
commit792dee3854cbede64e17fdc4736831edad295706 (patch)
tree9b42e8e8fe43580eede20fc9238ebf0b9a380216
parenteb031d4013d36f6aef4aba45840762ae8635cc13 (diff)
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>
-rw-r--r--hw/xfree86/common/xf86.h2
-rw-r--r--hw/xfree86/common/xf86Bus.c48
-rw-r--r--hw/xfree86/common/xf86Bus.h7
-rw-r--r--hw/xfree86/common/xf86str.h12
4 files changed, 0 insertions, 69 deletions
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 51c91a21f..c59d4b110 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -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 void xf86EnterServerState(xf86State state);
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 void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index d7e8d0d61..166f439d6 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -62,10 +62,6 @@ static Bool xf86ResAccessEnter = 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.
*
@@ -414,7 +410,6 @@ xf86AccessEnter(void)
* to any bus and let the RAC code to "open" the right bridges.
*/
EntityEnter();
- notifyStateChange(NOTIFY_ENTER);
xf86EnterServerState(SETUP);
xf86ResAccessEnter = TRUE;
}
@@ -433,7 +428,6 @@ xf86AccessLeave(void)
{
if (!xf86ResAccessEnter)
return;
- notifyStateChange(NOTIFY_LEAVE);
EntityLeave();
}
@@ -505,7 +499,6 @@ xf86EnterServerState(xf86State state)
/* When servicing a dumb framebuffer we don't need to do anything */
if (doFramebufferMode) return;
- notifyStateChange(NOTIFY_ENABLE);
return;
}
@@ -527,7 +520,6 @@ xf86PostProbe(void)
return;
} else {
xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n");
- notifyStateChange(NOTIFY_ENABLE);
doFramebufferMode = TRUE;
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 */
int
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 844fd8682..b22e2e772 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -62,13 +62,6 @@ typedef struct {
IOADDRESS domainIO;
} EntityRec, *EntityPtr;
-/* state change notification callback */
-typedef struct _stateChange {
- xf86StateChangeNotificationCallbackFunc func;
- pointer arg;
- struct _stateChange *next;
-} StateChangeNotificationRec, *StateChangeNotificationPtr;
-
#define ACCEL_IS_SHARABLE 0x100
#define IS_SHARED_ACCEL 0x200
#define SA_PRIM_INIT_DONE 0x400
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 9cb66eb81..3e96941af 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -608,18 +608,6 @@ typedef enum {
OPERATING
} 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 */
typedef struct {