The matrox graphics driver now also works under Haiku when the target haiku has been set (tested).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12448 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b8d27287f9
commit
807ba996da
@ -34,6 +34,11 @@
|
||||
|
||||
#define MAX_DEVICES 8
|
||||
|
||||
#ifndef __HAIKU__
|
||||
# undef B_USER_CLONEABLE_AREA
|
||||
# define B_USER_CLONEABLE_AREA 0
|
||||
#endif
|
||||
|
||||
#define DEVICE_FORMAT "%04X_%04X_%02X%02X%02X" // apsed
|
||||
|
||||
/* Tell the kernel what revision of the driver API we support */
|
||||
@ -344,10 +349,10 @@ static status_t map_device(device_info *di)
|
||||
(void *) di->pcii.u.h0.base_registers[registers],
|
||||
di->pcii.u.h0.base_register_sizes[registers],
|
||||
B_ANY_KERNEL_ADDRESS,
|
||||
(si->use_clone_bugfix ? B_READ_AREA|B_WRITE_AREA : 0),
|
||||
B_USER_CLONEABLE_AREA | (si->use_clone_bugfix ? B_READ_AREA|B_WRITE_AREA : 0),
|
||||
(void **)&(di->regs));
|
||||
si->clone_bugfix_regs = (uint32 *) di->regs;
|
||||
|
||||
|
||||
/* if mapping registers to vmem failed then pass on error */
|
||||
if (si->regs_area < 0) return si->regs_area;
|
||||
|
||||
@ -449,7 +454,7 @@ static status_t map_device(device_info *di)
|
||||
(void *) di->pcii.u.h0.base_registers[frame_buffer],
|
||||
di->pcii.u.h0.base_register_sizes[frame_buffer],
|
||||
B_ANY_KERNEL_BLOCK_ADDRESS | B_MTR_WC,
|
||||
B_READ_AREA + B_WRITE_AREA,
|
||||
B_READ_AREA | B_WRITE_AREA,
|
||||
&(si->framebuffer));
|
||||
|
||||
/*if failed with write combining try again without*/
|
||||
@ -459,7 +464,7 @@ static status_t map_device(device_info *di)
|
||||
(void *) di->pcii.u.h0.base_registers[frame_buffer],
|
||||
di->pcii.u.h0.base_register_sizes[frame_buffer],
|
||||
B_ANY_KERNEL_BLOCK_ADDRESS,
|
||||
B_READ_AREA + B_WRITE_AREA,
|
||||
B_READ_AREA | B_WRITE_AREA,
|
||||
&(si->framebuffer));
|
||||
}
|
||||
|
||||
@ -644,7 +649,9 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
|
||||
di->pcii.vendor_id, di->pcii.device_id,
|
||||
di->pcii.bus, di->pcii.device, di->pcii.function);
|
||||
/* create this area with NO user-space read or write permissions, to prevent accidental dammage */
|
||||
di->shared_area = create_area(shared_name, (void **)&(di->si), B_ANY_KERNEL_ADDRESS, ((sizeof(shared_info) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1)), B_FULL_LOCK, 0);
|
||||
di->shared_area = create_area(shared_name, (void **)&(di->si), B_ANY_KERNEL_ADDRESS,
|
||||
((sizeof(shared_info) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1)), B_FULL_LOCK,
|
||||
B_USER_CLONEABLE_AREA);
|
||||
if (di->shared_area < 0) {
|
||||
/* return the error */
|
||||
result = di->shared_area;
|
||||
|
Loading…
Reference in New Issue
Block a user