From 444e9a147be8f4ba3b858dde355dbcf184b71adb Mon Sep 17 00:00:00 2001
From: Rudolf Cornelissen
Date: Sat, 21 Jan 2006 17:05:07 +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. Updated docs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16026 a95241bf-73f2-0310-859d-f6bbb57e9c96
---
.../kernel/drivers/graphics/matrox/UPDATE.html | 12 ++++++++++++
src/add-ons/kernel/drivers/graphics/matrox/driver.c | 5 ++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html b/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html
index 5ab6edb43b..77661e26c0 100644
--- a/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html
+++ b/src/add-ons/kernel/drivers/graphics/matrox/UPDATE.html
@@ -4,6 +4,18 @@
Changes done for each driverversion:
+head (svn 0.27, Rudolf)
+
+- G200-G550:
+
+- The overlay engine code now respects the B_OVERLAY_COLOR_KEY flag instead of forcing keying ON.
+
+ - General:
+
+- Hook GET_ACCELERANT_DEVICE_INFO now returns more detailed info about the card in use;
+
- Hooks INIT_ACCELERANT and CLONE_ACCELERANT now enforce their correct use; returning error B_NOT_ALLOWED in case of errors.
+
+
mga_driver 0.26 (Rudolf)
- G200-G550:
diff --git a/src/add-ons/kernel/drivers/graphics/matrox/driver.c b/src/add-ons/kernel/drivers/graphics/matrox/driver.c
index 4206c4914a..6b4f65722b 100644
--- a/src/add-ons/kernel/drivers/graphics/matrox/driver.c
+++ b/src/add-ons/kernel/drivers/graphics/matrox/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 */
@@ -791,6 +791,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;
+
/* map the device */
result = map_device(di);
if (result < 0) goto free_shared;