Commit Graph

2049 Commits

Author SHA1 Message Date
Axel Dörfler 94f8a931c8 B_SET_INDEXED_COLORS is now working correctly for B_CMAP8, IOW you can now use
8 bit modes with this driver as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-05 16:17:11 +00:00
Axel Dörfler 2bbc6df8dc * The kernel now remembers the signal that killed a thread (if it was killed).
* As suggested by Korli, the signal is now encoded in the "reason" field of
  wait_for_child().
* waitpid() now sets the status passed in so that the signal can be read out
  (but it still doesn't do it's full job).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-05 15:33:34 +00:00
Axel Dörfler 65bd831cbb * KDiskDeviceManager::_ScanPartition() can now run synchronously (and execute the
scan job in the calling thread).
* KDiskDeviceManager::InitialDeviceScan() now runs synchronously, so that
  get_boot_partitions() doesn't need to do this ugly wait hack.
* KDiskDeviceManager::CreateFileDevice() can now run synchronously as well, which
  fixes a deadlock in fs_mount() - note, mounting file devices still doesn't work,
  though as Haiku's BFS doesn't allow this right now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-05 10:54:10 +00:00
Axel Dörfler 6a3543db2a * Finally the overlay looks like an overlay. It took me almost a day to realize that
the Intel chip obviously cannot do overlays in B_RGB16 - even though it pretends
  to be able to do that.
* B_YCbCr422 seems to work, though, I haven't tested any other spaces for now, and
  I somewhat doubt they will work. It's all green, though, and the scaling doesn't
  seem to be correct - that we be solvable, though :)
* There aren't any bounds checks (so don't move the window out of the screen), and
  also the overlay_view offsets are ignored.
* Scaling and moving is now detected, and there is always as little work done as
  possible to reduce the workload on buffer switches (the most common case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-04 09:08:26 +00:00
Axel Dörfler f4c4106a40 * Doh, I had done all bitfields in the wrong direction (msb to lsb, but it's actually
lsb to msb).
* The result is that there is now *something* to see when overlay is turned on. In
  fact the whole screen goes dark besides a few pixels on the top - now isn't that
  something? :-)
* The overlay is also turned off again correctly - which also revealed a bug in our
  app_server: B_CONFIGURE_OVERLAY is not always called with window=NULL/view=NULL
  to turn off overlay (might be an incorrect handling of BView::ClearOverlay()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-02 21:16:17 +00:00
Axel Dörfler 3e54c13abc * Fixed BDirectory::SetTo(BDirectory*, path) constructor in case the target
directory was "this".
* Fixed storage_support.h header - didn't include all needed headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-01 16:55:46 +00:00
Axel Dörfler 573c4336a3 Implemented quite a hack to solve the lockless get_memory_map() problem (bug #349):
when called with interrupts turned off, get_memory_map() will now call the new
vm_translation_map_ops::query_interrupt() call.
Under PPC, this is trivial (at least right now), but on x86 we need to make sure
we have access to the page table entry, ie. we need to create an area that points
to its own page table entry, so that we can map in the page table entry containing
the address we're looking for. It's not really nice, feel free to come up with
a cleaner solution :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-30 17:45:33 +00:00
Axel Dörfler 77a08c68e8 Changed the way handlers for edge triggered interrupt are called: now, we
always call all handlers in this case, but we still try to return the correct
return code (ie. B_HANDLED_INTERRUPT and B_INVOKE_SCHEDULER).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-30 13:56:21 +00:00
Michael Lotz 17fee3eab7 Removed the extra info struct in the cpu_ent union and made said union a struct instead. Same as r1137 in NewOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-29 22:38:19 +00:00
Michael Lotz 2a03240eb1 Reverted my last change as it turned out that the lazy FPU state handling was not SMP safe afterall and the performance gain is questionable. Maybe it'll be implemented correctly in the future. Sorry for any inconvenience this may have cost.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-29 22:10:04 +00:00
Stefano Ceccherini 7dce0c352e Removed unused stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-28 20:22:28 +00:00
Axel Dörfler 7740a4c15b Enabling overlay requires a command ring buffer, and we're setting one (very
small) up for this specific task - this will later be used for the acceleration
engine as well.
Some more work on overlay initialization, doesn't do anything yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-28 16:50:39 +00:00
Michael Lotz 7eee76e65a Implemented lazy FPU state save/restore. In the end mostly ported from NewOS. SMP safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-27 22:02:48 +00:00
Axel Dörfler f90e454336 * More or less rewrote BTranslatorRoster - it now has a private implementation
class, and only wraps around that one.
* Translating is no longer serialized, you can translate more than one object
  at a time now.
* A BTranslator that is released (ie. deleted) will no longer let its BTranslatorRoster
  crash.
* Removed BTranslatorRoster::Version() - this kind of call definitely makes no
  sense at all. It's still exported from the sources, though, for backwards
  compatibility.
* Simplified and improved code.
* Images are now unloaded only once.
* Added new method IsTranslator() that will be used by the DataTranslations preferences
  application.
* Began implementing new methods StartWatching()/StopWatching() that will notify
  you if new translators are installed or old ones removed (this will also be used
  by DataTranslations once it's ready).
* The private BTranslatorRoster class will now add itself to the existing BApplication,
  in order to provide automatic updating of the translators if needed (not yet implemented
  though).
* Not heavily tested yet, there might be some regressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-27 18:40:28 +00:00
Axel Dörfler 22d4db9280 * Added overlay register definitions.
* The overlay register update buffer is now created and exported, ready
  to be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 17:50:30 +00:00
Axel Dörfler b907a5acab Implemented overlay management. The hardware doesn't notice them yet, though :)
(but the app_server thinks they're working).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 12:55:07 +00:00
Axel Dörfler 93820f1ea7 Renamed moreUTF8.h to utf8_functions.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 10:16:19 +00:00
Axel Dörfler e55d041b59 Finally removed SERVER_{TRUE|FALSE} and lots of other unused constants from ServerProtocol.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 09:33:08 +00:00
Axel Dörfler 23ae77aa56 * Removed ColorSet, it's no longer needed or used.
* The Decorator are temporarily using ui_color() - this needs to be changed
  to use the DesktopSettings (when the decorator stuff gets refactored); right
  now, the colors are fixed.
* Added B_WINDOW_TEXT_COLOR, B_WINDOW_INACTIVE_TAB_COLOR, and
  B_WINDOW_INACTIVE_TEXT_COLOR to the UI colors, B_WINDOW_TAB_COLOR is no
  longer deprecated. Note, however, that not every decorator may use these
  colors.
* Removed unused and wrong (ie. hard-coded paths) stuff from ServerConfig.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 09:03:28 +00:00
Axel Dörfler 6d5488e18a * There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
  etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
  the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-25 20:12:06 +00:00
Axel Dörfler 5da6291b99 * Now using Thomas memory manager to manage the graphics memory; allocation
of graphics memory is now possible.
* Changed driver name to start with "intel_extreme" to have a nicer device
  name.
* Renamed frame_buffer* stuff to graphics_memory* as the frame buffer just
  happens to be located somewhere in the graphics memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 18:18:46 +00:00
Axel Dörfler 9095e05d8d * Renamed memmgr.c|h to memory_manager.c|h.
* The functions now check the acquire_sem() result.
* mem_freetag() will return an status code now, too.
* Moved the mem_block and mem_info definitions into the source file; no
  reason to have them public.
* You can now give the memory manager a name which it will use for its
  heap area and lock.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 15:09:46 +00:00
Axel Dörfler 621a832488 * Renamed ViewAux.h header to ViewPrivate.h.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-23 15:55:15 +00:00
Stephan Aßmus 8087170c53 * a bit of code clean up
* some fixes to make screen_blanker wait_for_thread() instead of
  killing the screen saver thread, BScreenSaver::Stop() is now called
  as well as its destructor


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 20:18:52 +00:00
Stefano Ceccherini 05e515d56c hopefully improved menu tracking. Among other things, this fixes bug 461
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 17:56:21 +00:00
Axel Dörfler 21c8c925d8 * With Rudolf's information about relocating overlays, I changed the way memory
is managed for those bitmaps:
  - the shared client memory mechanism is used to allocate a small overlay_client_data
    structure that contains the actual buffer and a semaphore that you have acquire in
    order to access it.
  - LockBits()/UnlockBits() now have a function: you need to call them before accessing
    the overlay buffer, and you need to keep that lock until you're done with it.
* The overlay cookie is now an extra member of the ServerBitmap class.
* Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated
  with the bitmap.
* ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay
  color instead of any contents (this is currently in ugly pink, but will become some
  dark color later on).
* All what's missing from actually being able to use overlays now is to configure
  them so that they are shown on screen. VLC will now show an empty pink window when
  overlay video is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 16:41:12 +00:00
Axel Dörfler 704c03b9e6 Got rid of that unused and superfluous TokenSpace callback stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 16:29:44 +00:00
Axel Dörfler 37b502f28b Implemented some more overlay support - the overlay bitmap is now allocated
via the graphics driver (but not yet shown on screen).
I probably got the meaning of the "overlay count" wrong - I guess that you
can allocate any number of overlay bitmaps, but can only see "overlay count"
on screen at a time (right now, I only allow to create "overlay count" bitmaps).
Stephan?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-21 20:14:41 +00:00
Rudolf Cornelissen 40c6c57a58 updated matrox and nvidia driver to export lower case kerneldriver names for the /dev/ hierarchy. It turns out R5 and dano convert upper case to lower case names, while Haiku just literally uses them... Now fixed inside these drivers by using lowercase instead of uppercase. 'Bug' reported by John Drinkwater.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-21 19:41:47 +00:00
Stefano Ceccherini ce1efe4ce6 forgot to commit this changed header, sorry
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-15 12:55:39 +00:00
Axel Dörfler 97e069713b Added a "reenter" parameter to the {read|write}_pages() functions to give file
systems a chance to know if they have locked already.
This fixes a locking problem in BFS where one thread tried to acquire two read
locks (where someone else trying to acquire a write lock would have caused a
dead lock).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-12 13:34:04 +00:00
Axel Dörfler 2f09691580 Fixed build...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 19:03:44 +00:00
Michael Lotz 39cdae74a7 First steps at getting drag & drop to work properly. Simple drag & drop (draging Tracker items) should work now. Not sure about the negotiated version (with mimetype exchange). Fixed left behind drag bitmaps. Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-10 21:22:05 +00:00
Stephan Aßmus 39c9925fcf * implemented a BRegion pool per WindowLayer which is supposed
to cut down on BRegion related allocations, cannot really tell
  if it speeds things up
* used the new BRegion pool in WindowLayer and ViewLayer whereever
  a BRegion was used on the stack
* fixed the debugging stuff in MultiLocker - it will get you into
  the debugger if you
    - try to nest read locks
    - try to write lock when your are a reader already
    - don't match up nested locks when your a writer
    -> but only if you #define DEBUG 1 in the .cpp, is off by default now
* went over WindowLayer, ServerWindow, Desktop and a few other places
  and fixed the locking for use with the MultiLocker, the "a reader can
  not become a writer" is especially tricky, feel free to review the
  changes
* activated the MultiLocker, I tested this quite a bit, if there are
  problems simply turn on DEBUG and you should drop into the debugger
  right where the problem is... hope all is good


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-07 19:14:25 +00:00
Rudolf Cornelissen 7f6603085d removed NV47 references, replaced with G70. Also added G71, G72 and G73 engines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-07 15:03:25 +00:00
Rudolf Cornelissen a674b4da72 added new nv.setting force_ws to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-06 09:09:13 +00:00
Axel Dörfler 3c4cc54948 disk_device_manager.h no longer includes a private header - ie. that header
is public now, even if it may not yet be public and fixed API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 00:29:07 +00:00
Michael Lotz f51fb4696c Corrected the repeat checks (did not compare the right buffers) and added a length argument to debug_puts() to safe the strlen in the syslog case. Also removed some leftover.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-03 20:48:30 +00:00
Axel Dörfler 020c1aa823 * init_driver() now behaves better in low memory situations.
* Some preparations to support more than one chipset, added i855G (device ID 0x3582)
  to test with - the accelerant_device_info is now filled with that additional data
  as well.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-03 13:21:31 +00:00
Stephan Aßmus 600fbd78e4 * BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
  up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
  actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
  have retrieved a cursor until they have called Acquire() on the
  cursor. (Axel: what good is using atomic* stuff in Acquire() and
  Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 16:56:10 +00:00
Stefano Ceccherini 4185bd8b34 Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 13:06:47 +00:00
Axel Dörfler 606e0d364e * Factored out the vnode disconnection code from fs_unmount() to a separate
function, and added a vfs_disconnect_vnode() for other kernel components.
* devfs_unpublish_device() can now optionally make use of this call.
* Fixed the type check of devfs' unpublish_node().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 01:13:12 +00:00
Axel Dörfler 065aa7f66c Added a basic unpublishing function for drivers, not yet tested, though (and even
though it looks so simple, I see no reason why it shouldn't work 8-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 00:13:44 +00:00
Axel Dörfler e7d4bde0b8 Accidently broke ConstIterator::Rewind().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 22:13:36 +00:00
Axel Dörfler ecdaf9dea8 * The boot loader now adds all block devices in case the BIOS doesn't give enough
information to identify the boot volume - if we want to be able to map all BIOS
  drive IDs to the disks in the system, we need to do this always, though.
* Forgot to commit the updated disk_identifier.h in the last commit...
* Removed the unused dumpBlock() function from devices.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 14:50:37 +00:00
Axel Dörfler c918a987a0 * Removed my old doubly linked list implementation, and stay with Ingo's.
* Adapt other sources where needed (the boot loader's RootFileSystem still
  used the old implementation).
* Implemented RootFileSystem::Rewind().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 10:27:05 +00:00
Axel Dörfler c14a34a65f * Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-26 15:58:43 +00:00
Axel Dörfler e404297e56 Very basic driver for the "Intel Extreme Graphics 2" chips, only supports i865G for now.
Only mode switches do work, doesn't yet make sure the mode is valid, though.
At this point, this driver only works on Haiku, the R5 app_server is crashing for some
reason I need to investigate some day (maybe tomorrow :)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-24 21:46:40 +00:00
Stephan Aßmus af3ac4e80f replaced usage of floor() and ceil() to convert from
BRect to clipping_rect with simple C casts. I think this
is more adequate, since clipping_rects are used for
pixel indices. This change fixes some graphics problems too,
it appears that cursor coords are fractional on Haiku, even
with a normal mouse. In Playground, this resulted in the
hit points being rendered wrongly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:26:17 +00:00
Axel Dörfler db823da57e * Even though our current heap is a temporary solution, the heap size depends
now on the amount of memory installed in the system. Ie. if you have only
  128 MB the kernel heap will be only half in size.
* Minor cleanup in vm_page.c, renamed some variables to match our style guide.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 15:02:21 +00:00