From 8bde8143ebfe127c5631e4688cb4d44b99ebf7ad Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 21 Jan 2006 14:49:39 +0000 Subject: [PATCH] driver now enforces correct order of use of INIT_ACCELERANT and CLONE_ACCELERANT: bailing out with B_NOT_ALLOWED if incorrect use is detected. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16020 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/graphics/nvidia/driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/driver.c b/src/add-ons/kernel/drivers/graphics/nvidia/driver.c index d92be2d528..1758295d0e 100644 --- a/src/add-ons/kernel/drivers/graphics/nvidia/driver.c +++ b/src/add-ons/kernel/drivers/graphics/nvidia/driver.c @@ -4,7 +4,7 @@ Other authors: Mark Watson; - Rudolf Cornelissen 3/2002-11/2005. + Rudolf Cornelissen 3/2002-1/2006. */ /* standard kernel driver stuff */ @@ -984,6 +984,9 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) { si->device = di->pcii.device; si->function = di->pcii.function; + /* ensure that the accelerant's INIT_ACCELERANT function can be executed */ + si->accelerant_in_use = false; + /* note the amount of system RAM the system BIOS assigned to the card if applicable: * unified memory architecture (UMA) */ switch ((((uint32)(si->device_id)) << 16) | si->vendor_id)