Commit Graph

60894 Commits

Author SHA1 Message Date
Adrien Destugues
ec4e9ea8bc intel_extreme: remove unhandled generation defines
- 7xx (1st gen) has no driver in Haiku or is handled by the intel_810 driver
- PowerVR has no driver in Haiku

So there is no point in having those in the intel_extreme driver.

While I'm at it, fix the video timing/resolution constraints for
sanitize_video_mode.
2020-01-27 13:58:52 +01:00
Adrien Destugues
5cd8219db6 Remove annoying message at start of build. 2020-01-27 13:49:47 +01:00
X512
7512485b94 Optimize system_time function
The uint128 code does not optimize as well as expected. Since this
function can be called quite often, use a more optimal implementation
(quite similar to what we had for x86_64 before refactoring).

Unfortunately this is still not as good as the hand-optimized assembler
previously used for 32bit x86, unless compiled with clang, where it gets
pretty close.
2020-01-26 14:48:30 +01:00
Adrien Destugues
d6a742cafd DeskCalc: Use IsLocked() instead of Lock()
As suggested by korli.
2020-01-26 14:44:12 +01:00
Adrien Destugues
947faad871 Remove mercurial sources from release images
We don't ship the binaries, so I don't see why we would ship the
sources.
2020-01-26 12:40:01 +01:00
Adrien Destugues
edb3467aca BView::DrawBitmap: document "options" parameter 2020-01-26 11:24:04 +01:00
Adrien Destugues
f8969c78e5 DeskCalc: use an autolock to simplify clipboard handling. 2020-01-26 11:23:41 +01:00
Adrien Destugues
190d0372b3 Fix system_time implementation
When refactoring this and writing a common implementation for x86 and
x86_64 I missed a step in the calculation. We need to divide by 2^32 to
keep the value in the expected range.

Fixes #15658.
2020-01-26 10:44:05 +01:00
Adrien Destugues
3cba7254a8 DeskCalc: fix gcc8 build. 2020-01-25 22:52:50 +01:00
Adrien Destugues
cddaf7625c btrfs: fix build. 2020-01-25 22:09:42 +01:00
Adrien Destugues
670af4fc7b More build fixes. 2020-01-25 21:35:34 +01:00
Adrien Destugues
1bd3bfd038 DeskCalc: fix build.
Apparently, this code was submitted to Gerrit without checking if it
built.
2020-01-25 19:54:31 +01:00
Adrien Destugues
fadca4b173 intel_extreme: disable pipe configuration
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).
2020-01-25 19:48:48 +01:00
Adrien Destugues
1fa0a12d75 intel_extreme: add a command to dump pipe config
I look at this all the time and entering register offsets and converting
from hex was getting annoying.
2020-01-25 19:48:47 +01:00
Adrien Destugues
03ee42a8eb intel_extreme: Keep LVDS on its assigned pipe also for SandyBridge
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.
2020-01-25 19:46:40 +01:00
Murai Takashi
b35395fef1 icon-o-matic: Fix resource leak
When exception was thrown, resources allocated to 'fd' and 'p'
weren't released.
Fix PVS V773

Change-Id: I8a546cbbec4e5060b385cc11f0f33b63f61a0924
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2156
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 14:18:39 +00:00
Adrien Destugues
696d127d12 Live update of Input preferences device list
- 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>
2020-01-25 11:58:48 +00:00
Adrien Destugues
c5e9dd9b68 Fix btrfs_shell build
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>
2020-01-25 11:58:15 +00:00
Andrej Antunovikj
7b4d924f98 cpu: Extract shared x86 code from efi & bios_ia32
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>
2020-01-25 11:56:46 +00:00
Zotyamester
edad811b96 Game Kit: rewrite GameSound and GameSoundDefs headers
Change-Id: I5efee795a73a9637f34ed8ffa4fbeeda09eb7a88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2104
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:43:02 +00:00
Ra-V2
e9d6c3150e Game Kit: rewrite StreamingGameSound.h
Change-Id: Ibd5d77236dc14ca605b0925c1177e64ca9e5a5d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2113
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:42:41 +00:00
Zotyamester
d623ab8459 DeskCalc: Remove audio feedback and add error handling
Change-Id: If470e91581d7569ed2589f67721e813cccd83fe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2095
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:42:20 +00:00
Jaroslaw Pelczar
1e7069152e arm64: Add initial stubs for stackframe and time
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>
2020-01-25 08:52:10 +00:00
Jaroslaw Pelczar
384d4e935c arm64: Add stubs so kernel can at least link
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>
2020-01-25 08:51:39 +00:00
Jaroslaw Pelczar
cbdb30f467 arm64: Add more random scripts to get stuff to compile
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>
2020-01-25 08:50:51 +00:00
CruxBox
80f7396496 Making of xfs file system
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>
2020-01-25 08:49:09 +00:00
Autocomitter
89ae33c9f6 Update translations from Pootle 2020-01-25 08:47:08 +00:00
Alexander von Gluck IV
79310ea4e1 docs/develop: Add doc on debugging bootloaders with gef
Change-Id: Ib2d161adf75904f592286451279c77fb61ea52c2
2020-01-24 15:13:29 -06:00
X512
7740e52c16 TextSearch: fix passing search string to grep
Fix proposed by phoudoin.

Fixes #15650.

Change-Id: Ie7177aaa39ff593445506983cb0725b75ca7bc7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2149
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-24 15:23:01 +00:00
bitigchi
a309c6eeb2 Use UTF-8 HEX values instead of UTF-32 values
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>
2020-01-24 15:22:11 +00:00
Murai Takashi
da3fe7140a mail_daemon: Add missing throw
Fix PVS V596
 Pointed out in PVS-Studio blog
 https://www.viva64.com/en/b/0644/

Change-Id: Icf1f2d651dab84730fd348759ee7d19264ccbf75
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2141
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-23 17:03:04 +00:00
Adrien Destugues
eacbae702d agg: fix build. 2020-01-22 19:25:16 +01:00
Panagiotis Vasilopoulos
f0b6c6a24b Game Kit: rewrite DirectWindow, FileGameSound and SimpleGameSound headers
Change-Id: I45687f8164dbc915a0cb6ca1bf4c0211761cb098
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2108
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-22 00:33:44 +00:00
Zotyamester
450208975b Add-ons: Add alert warning to PNGTranslator
Change-Id: I148fb44055f6e0fc6f68307df04a4ad4ebb660fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2097
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-22 00:31:05 +00:00
Zotyamester
093e83638d Terminal: match declarations and definitions
Change-Id: Ib05915bedca38a0f3caec80d96c643200b1bc4a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2111
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-22 00:30:40 +00:00
Ra-V2
1773f0767e agg: agg_curves.h: initialize m_distance_tolerance_square
fix PVS 730

Change-Id: I8dfe11d3f31cc6ef67b96955009c5a57eb5a427d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1997
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-22 00:29:58 +00:00
Murai Takashi
450f71e21e agg: trans_double_path::reset(): reset m_kindex2
Fix PVS V519
Pointed out in PVS-Studio blog
https://medium.com/pvs-studio/best-copy-paste-algorithms-for-c-and-c-haiku-os-cookbook-8e15876d2547

Change-Id: Ie6b9ae42f246bf201e30d19968a502268e80fe6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2116
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-22 00:29:36 +00:00
Adrien Destugues
35e9e7c3eb app_server: match screen configurations with empty serial number
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>
2020-01-22 00:28:46 +00:00
Kyle Ambroff-Kao
8d763b7f0d Terminal: Fix crash for keystroke with unexpected modifiers
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>
2020-01-22 00:28:25 +00:00
Kyle Ambroff-Kao
e8b9c0e1a6 tests/BHandlerTester: Fix Perform1 test case
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>
2020-01-22 00:27:31 +00:00
Alexander von Gluck IV
764345e18c libroot/posix: No long doubles on ppc
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>
2020-01-22 00:27:04 +00:00
Adrien Destugues
2de6164042 Add missing fenv.h for sparc.
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>
2020-01-22 00:25:19 +00:00
Adrien Destugues
175d1f0eca sparc: remove ARM files.
Change-Id: I208baa6a97800a8d3a423ffeb00279767706ddef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2130
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-22 00:25:19 +00:00
Adrien Destugues
ca9fab6849 Link host tools with libbsd on haiku host
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>
2020-01-22 00:25:19 +00:00
Murai Takashi
992ae400ec Fix catching by value
Pointed out by LGTM.
Change-Id: I223655c728305f6f45b3738553da5b7d7a69e8c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2134
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-21 19:26:22 +00:00
Kyle Ambroff-Kao
654135466f support/BPath: Flatten should work on empty BPath
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>
2020-01-21 09:36:42 +00:00
Kyle Ambroff-Kao
7037b5d9bc support/Archivable: Reset errno in validate_instantiation()
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>
2020-01-21 08:46:20 +00:00
Alexander von Gluck IV
58bf3f3628 efi: Fix arm relocation_func under new efi libraries
Change-Id: Ib829448131cfe7fbaf820bb93a789248af00b428
2020-01-20 19:13:19 -06:00
Alexander von Gluck IV
1aab1c0e28 u-boot: cleanups on arm, load from more media
* Attempt to find haiku loader on mmc,nvme,virtio
* Fixes automatic boot under u-boot on qemu
* Remove boot.scr to ensure it's regenerated each build
* Remove obsolete HAIKU_BOARD_SDIMAGE_UBOOT_UENV

Change-Id: I60cd518ec69e408ddbd7ea17371f4f4f56fa7f7b
2020-01-20 16:26:37 -06:00
X512
cc0226fad0 ActivityMonitor: remove double buffering and custom background drawing
Part of #15623.

Change-Id: Id6b7c13623e66d5b88ffc48766a5fe5ec4099b64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2133
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-19 18:27:55 +00:00