This code just sets nonsensical things in the pipe control register, so
disable it and add FIXMEs if someone wants to get it to work someday
(but it's not needed for modesetting an already up and running display).
Also remove some other places where we write to non-existing registers.
Fixes#15628 (for real, this time).
We don't manage to change the transcoder there, either, so just keep
using the selected one (A if no other display is connected, and B if
there is one, it seems).
We were configuring pipe B but the LVDS panel would still display pipe
A. And, we were not configuring pipe B properly, even. The whole
modesetting only worked by occasionally setting some registers for pipe
A ("just in case", said comments).
Now we actually configure the pipe we are using, which makes more sense
and brings us a step closer to multi monitor support.
- Implement watch_input_devices in input_server, as it was TODO. For
now, only one watcher is allowed at a time.
- Use it in Input preferences to get notified about added and removed
devices and update the device list accordingly.
Change-Id: I52018af53738e68271d6d63b5bea31fd7cab1b3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2041
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The hacks to still use actual system headers for zlib didn't quite work.
- Define Z_SOLO, which makes zlib build without any system include
- Remove use of std::max and #include <algorithm> from AVLTree
- Do not include DebugSupport.h because it uses system headers
- Do not include uuid.h and define just what we need
Now it's possible to compile the btrfs_shell on Linux.
Change-Id: I74a14b5f6804db45ab5a9f582ab493d696376fd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2098
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This issue was initially detected by PVS Studio (issue number V547) and fixed
as part of Google Code-in 2019.
The initial problem was the calculate_cpu_conversion_factor function
which had been copied in the BIOS and EFI versions of the boot code.
Further investigation led to more duplicated or very similar functions
being identified.
Introduce an arch_cpu.h for the x86 boot platform to group these things
in a single place, and adjust the BIOS and EFI code to call into that.
Note that the BIOS and EFI code is still a little platform specific,
ideally there should be a boot_arch_cpu_init() function for each
architecture as already done for openfirmware and u-boot.
Also remove some irrelevant comments from copypasted files for other
architectures, as that was filling my git grep with useless noise.
Change-Id: I16d815f0bf015cec0b4e03cc14f3cc447c7164c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1985
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie17279a9c17ab8bb7a812fe83d1b668853f96d5c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1858
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I2476a6346c912c4aa0c26e4f3720ea2c2690b669
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1857
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie043af5b7471f626a1ffe100848151c832dcc439
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1853
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
xfs_shell is modeled over bfs_shell.
It fails to mount the filesystem as expected
(the filesystem code isn't implemented).
Change-Id: Iaf88c1f4aef338f249fdc58bc27a3ad76ebd5d95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2096
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The previous commits resulted in TOFU (black diagonal shape with
question mark in it). As per humdinger's suggestion and copying from how
€ sign was encoded, this is another try at fixing non-break space and
Turkish Lira Sign.
Previous PR: /c/haiku/+/2004/1
Change-Id: I3775c178b1921e7dff7ceb660c8fda1152050c94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2148
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
My laptop LCD has no serial number. Because of this check, it would
never "exact match" with the previous data stored in the workspace
settings. As a result, every time I set a new video mode, a new "screen"
would be stored in the settings file, and the old entry would just stay
there and never be used again.
I currently find myself with about 100K of workspace settings, tracing
the history of video mode changes over the last few years.
Change-Id: Iea236a6ad09bc8bae9f6df8d63780bbfd4fa5619
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2135
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This patch fixes a segfault in Terminal that happens when you issue a
keystroke with unexpected modifiers. An easy way to repro this is:
1. Set command key to super
2. Set option key to meta in Terminal
3. Issue `ctrl+alt+shift+<key>`
In DefaultState::KeyDown(), the branch that handles option key as meta
detects that additional modifiers were used along with the meta key
and tries to look up the keymap associated with that combination of
modifier keys.
This lookup in TermView::fKeymapTableForModifierse can return NULL,
since TermView::SetKeymap() sets a pre-defined set of (modifier combo)
=> keymap entries.
Change-Id: I3ce4a7cff6c84913d99507e44849f9b048769f67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2138
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
TBHandlerTester::Perform1() tests the result of calling
BHandler::Perform() with invalid input. On BeOS R5 this returns
B_ERROR, but on Haiku this delegates to BArchivable::Perform(), which
returns B_NAME_NOT_FOUND.
Change-Id: Ia05220da4155a629cf611fec76da6477b9f1dbf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2137
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Change-Id: I1cdc589984f7c44129cef4e82b08fe4e7a257e34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2126
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Borrowed from FreeBSD with some changes to get it building.
Now we need to rebuild the gcc package...
Change-Id: I6b8dfd7fb6ca912c76e2ff10fbe01ad583a09aec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2131
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Needed for the sparc port, allows to build elf2aout which uses err() and
errx(). Allows to build the sparc port from Haiku.
Change-Id: Ia14dd9b1be1c03b36634a675f1a51eeac8d4aacf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2129
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
BPath::Flatten() on an empty path returns B_OK in BeOS R5, just
writing an empty entry_ref to the povided buffer. The Haiku
implementation has some additional validation that causes B_NO_INIT to
be returned instead.
This patch attempts to recreate the same behavior of BeOS in this
situation.
* Don't check for initialization in BPath::Flatten(). Instead,
just write an empty entry_ref to the provided buffer if the BPath is
empty.
* Fix estimation of expected size when testing the return value of
BPath::FlattenedSize().
* Clean up warning by removing unecessary forward-declaration of
CppUnit::Test.
Change-Id: I88880cbb298bdcb594c9c8fef48314165c49e9e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2115
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
validate_instantiation(BMessage*, const char*) sets errno for invalid
input, or if the requested class is not found, but it doesn't reset
errno to B_OK if validation succeeds.
I verified that in BeOS R5, errno is set to B_OK if
validate_instantiation succeeds.
This fixes BHandler::Instantiate2 and BHandler::Instantiate3 tests.
Change-Id: I531777e6ba47e9635da2da1fc8c8103bb233b0f3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2136
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This workarounds are no longer needed after hrev53713.
Change-Id: I7b809c79bd9d2345a991f0d2360f79876d10cd6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2132
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
IsHidden(this) should be used instead of IsHidden() because IsHidden() return
true if window is hidden (at moment of creation for example).
Fixes#15646.
Change-Id: I08c8bacd634139dd62fb239e16cb80f512e4be6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2128
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Only a few definitions (and some "hacks", to force glibc to
use __builtin_* where possible) that are not in our math.h
remain. This cuts out a lot more of the "bits" headers.
No "functional" change intended (but should help
fix the build on arches where we do not include
__fpclassify, etc. anymore.)
This was the last function remaining in the glibc "string" directory,
so now we can remove that directory and a bunch of related files
that are no longer needed.