From eb2b376271890b3ac7f249d25a4d8ffb37f84f66 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sun, 13 Mar 2022 00:18:09 +0000 Subject: [PATCH] various fgx drivers: fix cloning accelerants, allow for modelist cloning. --- src/add-ons/accelerants/common/create_display_modes.cpp | 2 +- src/add-ons/accelerants/matrox/ProposeDisplayMode.c | 3 ++- src/add-ons/accelerants/neomagic/ProposeDisplayMode.c | 3 ++- src/add-ons/accelerants/nvidia/ProposeDisplayMode.c | 2 +- src/add-ons/accelerants/skeleton/ProposeDisplayMode.c | 3 ++- src/add-ons/accelerants/via/ProposeDisplayMode.c | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/add-ons/accelerants/common/create_display_modes.cpp b/src/add-ons/accelerants/common/create_display_modes.cpp index e85042234f..4c99c0dcf6 100644 --- a/src/add-ons/accelerants/common/create_display_modes.cpp +++ b/src/add-ons/accelerants/common/create_display_modes.cpp @@ -522,7 +522,7 @@ create_display_modes(const char* name, edid1_info* edid, & ~(B_PAGE_SIZE - 1); display_mode *list; area_id area = create_area(name, (void **)&list, B_ANY_ADDRESS, - size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); + size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (area < B_OK) return area; diff --git a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c index fef0a825e9..eef2f234be 100644 --- a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c @@ -488,7 +488,8 @@ status_t create_mode_list(void) { max_size = (((MODE_COUNT * 4) * sizeof(display_mode)) + (B_PAGE_SIZE-1)) & ~(B_PAGE_SIZE-1); /* create an area to hold the info */ si->mode_area = my_mode_list_area = - create_area("MGA accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); + create_area("MGA accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, + B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (my_mode_list_area < B_OK) return my_mode_list_area; /* walk through our predefined list and see which modes fit this device */ diff --git a/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c b/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c index fdea8f1217..85bd1de833 100644 --- a/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c @@ -356,7 +356,8 @@ status_t create_mode_list(void) { max_size = (((MODE_COUNT * 4) * sizeof(display_mode)) + (B_PAGE_SIZE-1)) & ~(B_PAGE_SIZE-1); /* create an area to hold the info */ si->mode_area = my_mode_list_area = - create_area("nm accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); + create_area("nm accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, + B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (my_mode_list_area < B_OK) return my_mode_list_area; /* walk through our predefined list and see which modes fit this device */ diff --git a/src/add-ons/accelerants/nvidia/ProposeDisplayMode.c b/src/add-ons/accelerants/nvidia/ProposeDisplayMode.c index edd69180ee..a9a00dca8e 100644 --- a/src/add-ons/accelerants/nvidia/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/nvidia/ProposeDisplayMode.c @@ -632,7 +632,7 @@ create_mode_list(void) /* create an area to hold the info */ si->mode_area = my_mode_list_area = create_area("NV accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, B_NO_LOCK, - B_READ_AREA | B_WRITE_AREA); + B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (my_mode_list_area < B_OK) return my_mode_list_area; diff --git a/src/add-ons/accelerants/skeleton/ProposeDisplayMode.c b/src/add-ons/accelerants/skeleton/ProposeDisplayMode.c index 018230a433..217f761e3b 100644 --- a/src/add-ons/accelerants/skeleton/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/skeleton/ProposeDisplayMode.c @@ -538,7 +538,8 @@ status_t create_mode_list(void) max_size = (((MODE_COUNT * 4) * sizeof(display_mode)) + (B_PAGE_SIZE-1)) & ~(B_PAGE_SIZE-1); /* create an area to hold the info */ si->mode_area = my_mode_list_area = - create_area("NV accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); + create_area("NV accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, + B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (my_mode_list_area < B_OK) return my_mode_list_area; /* walk through our predefined list and see which modes fit this device */ diff --git a/src/add-ons/accelerants/via/ProposeDisplayMode.c b/src/add-ons/accelerants/via/ProposeDisplayMode.c index 6637c847f6..8ae2e2a67e 100644 --- a/src/add-ons/accelerants/via/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/via/ProposeDisplayMode.c @@ -540,7 +540,8 @@ status_t create_mode_list(void) max_size = (((MODE_COUNT * 4) * sizeof(display_mode)) + (B_PAGE_SIZE-1)) & ~(B_PAGE_SIZE-1); /* create an area to hold the info */ si->mode_area = my_mode_list_area = - create_area("NV accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); + create_area("NV accelerant mode info", (void **)&my_mode_list, B_ANY_ADDRESS, max_size, + B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA); if (my_mode_list_area < B_OK) return my_mode_list_area; /* walk through our predefined list and see which modes fit this device */