Commit Graph

62918 Commits

Author SHA1 Message Date
Jérôme Duval
40793c1ef6 RAWTranslator: switch to libraw as backend when available
tested with .cr2 and .dng single pictures.

Change-Id: I9a4802300fd2afe14c085ca18faa8a1e20c52bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4452
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-14 08:06:41 +00:00
Rudolf Cornelissen
f2a79670ae intel_extreme: Fixed virtualscreen setup, ticket #17261 2021-09-14 02:04:02 +00:00
Coldfirex
9a76b18fb6 Libnetapi: Fix wformat-security
Change-Id: I0898cd18e7721eee26ccbe557c385f4e61c3025f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4448
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-13 19:39:11 +00:00
Lt-Henry
a731585f88 HID: Fix usage page following hrev55413.
Modifications made on hrev55413 removed UsageID from array Items,
but also (bug here) broke UsagePage, needed by KeyboardHandler
in order to recognize items as Keyboard ones.

Fixes #17263.

Change-Id: I4b73c69240f31d3c8c2aacf6bab0d270f2053387
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4458
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-13 18:13:32 +00:00
Panagiotis Vasilopoulos
c1740f4f53 Drivers: Fix -Wformat-security
Follow-up for Alan Shearer's change. Useful when the buffer contains the
character "%".

Change-Id: Ia6771a2d71306ca97e7c03f0e986ad3cfe100684
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4459
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-13 09:24:14 +00:00
Jérôme Duval
cc6736afae StreamBuffer: fix Position() for read streams
the file position corresponds to the end of the buffer.

Change-Id: Ib67dcfe1f43d959777c2f6dbf84181f25a022a7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4447
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-13 05:53:22 +00:00
Coldfirex
5b2fc19fa0 PC_Serial and USB_Serial: Fix -Wformat-security
Change-Id: Ia150eaf0e639c03b3d1f267d9ee582ff82bf0d21
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4442
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-11 16:59:47 +00:00
Lt-Henry
366e9a62e9 hid: Fixed report parsing bug. Support for keyboards using bitmap reports
* I've added support to multiple min-max ranges to array reports too.
* All possible usages are stored in an array (Vector<uint32>). Perhaps, this can be squashed into an array of ranges.
* Usage array is stored in HIDReport class, so there is only one copy of it.
* HIDReportItem no longer has UsageMinimum()/UsageMaximum() as this no longer works. Instead, a Usage() member has been introduces.
* HIDReportItems of type variable, have a Usage ID assigned to them. HIDReportItems of type array have a zero usage ID as it has no sense.
* Having a variable typed HIDReportItem to store a range of usages ID doesn't seem a good idea to me because Data() method would have to return the values of all usages... or perhaps ask for a specific usage value with something like Data(0x03). This will require changes in hid stack and overcomplicate things.
* A bitmap keyboard is a worst-case scenario: Near a hundred of usages (uint32) are stored and the same quantity of HIDReportItems are created (this is already happening on Haiku). It doesn't seem a resource drama to me.
* Keyboard Handler has room for improvement, but I would like to left that for another patch series.

Change-Id: I556fa0aebfda831ef5334be5ae3a37f099ffa35d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4403
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-11 11:12:38 +00:00
Jessica Hamilton
8f362bfdfc haiku_devel: use relative symlinks to libraries in haiku package.
* This helps with creating a sysroot, otherwise extracted package
  links refer to /system, which is outside of the sysroot.
* Should have no functional impact on Haiku, as these are already
  symlinks

Change-Id: I29f719dc2c0839dd090e7f33eea0b8f98e0d6355
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4218
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-11 11:12:10 +00:00
Autocomitter
b40866e65f Update translations from Pootle 2021-09-11 08:50:45 +00:00
Augustin Cavalier
60fee365f5 kernel/vm: Allow locking kernel space if allocating page_protections for userspace.
Some applications may request per-page protections for an especially
large area (e.g. multiple GB), which leads to allocating a rather
large page protections area (e.g. 512KB), which we cannot allocate
without locking the kernel space to get new slabs.

We only need to avoid locking the kernel space if the area in question
is in the kernel space, as in that case, kernel space will already be
read-locked by the current thread.

Fixes #16898.

Change-Id: If52413a594da66edfc2821811d959085a2c3c78e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4436
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-10 18:49:33 +00:00
Augustin Cavalier
2f001d82b6 kernel/slab: Add missing support for CACHE_DONT_LOCK_KERNEL_SPACE.
This codepath is only hit for especially large malloc'd areas that
do not fit into an object cache, which is a rather rare case to
have in tandem with DONT_LOCK_KERNEL_SPACE, but we need to be
prepared for it in this code anyways.

Probably this codepath would previously have caused a hang due to
attempted double lock of the kernel addres space. Unfortunately
it appears our rw_locks do not actually detect that at present,
so likely I should investigate that next...

Change-Id: I3c9059d3e3939271beeeff221ebc921bc07ddf00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4438
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-10 18:49:33 +00:00
Niels Sascha Reedijk
530f89aa6d BString: rewrite cleanup methods
This removes the use of the destructor in the move assignment operator, as it
may rely on undefined behaviour from the compiler. Additionally, some duplicate
logic to dereference and free a shared string has been unified under
_ReleasePrivateData().

Change-Id: Ie9f51d598c734f83cd0fba49b651315c6e9c8aac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4440
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-10 05:34:06 +00:00
Coldfirex
6da19c9e40 tiffinfo: remove unneeded iostream.h
Compiling previously showed "fatal error: iostream.h: No such file or directory".  64bit didnt like simply removing the .h, though 32bit didnt complain.

Change-Id: I1d76f8007b662e5bf2006faf60f5bb3406bab18b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4443
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-10 04:51:57 +00:00
Coldfirex
198e5ee21c LoginApp: Fix -Wformat-security
Change-Id: I59786b57cee40b9fcb3e83da74b5c61dd7a5c550
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4437
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-09 22:25:48 +00:00
Gerasim Troeglazov
c377d66126 Cortex: use vector icons
Change-Id: I49f6bdf93366221330ca29281e3465d9b7452402
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4405
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-09 22:22:14 +00:00
Gerasim Troeglazov
b24faa52b4 VideoWindow consumer: buffer initialization shoud be done after format acceped.
Video generated by DemoVideoProducer is now displayed correctly

Change-Id: Idaed170a355ae7ed0b50c143a5c6c33da1393551
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4401
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-09 22:19:31 +00:00
Augustin Cavalier
17f42bc1d9 XHCI: Check earlier on that the endpoint is actually valid.
This may catch the "division by zero" KDLs earlier.
Related to #14943, #16794, and #16878.
2021-09-09 18:02:37 -04:00
Augustin Cavalier
0945c7e4e6 demangle/GCC3+: Improve/fix behavior of ClonedNode.
Most of the ClonedNode methods just forward calls as appropriate to
fNode or fClonedNode, but missed that fNode is itself always an ObjectNode.
Now we store that, and forward on the two relevant ObjectNode calls.

This fixes kernel stack trace function demangling where the symbols
contained clones (e.g. "[clone .localalias]", etc.). Before this commit,
such symbols would just appear as "()" and no more.

The "[clone...]" block will in such cases appear after the function name
and not after all the function parameters, as the two are returned
separately and there is no way to indicate how they should be printed
in the kernel's API usage of these functions.

ClonedNode was only introduced a few months ago in hrev55147,
so this has not been broken for too long.
2021-09-09 16:23:12 -04:00
Augustin Cavalier
5433e7e27d MultiAudioNode: Print a message when rejecting buffers.
This file just uses fprintf(stderr, ). Probably it should be
converted to use macros...

This allows for easy debugging of silence by restarting the media addon
server in a terminal. Eventually we should fix #17245.
2021-09-09 16:08:00 -04:00
Augustin Cavalier
37ea891aad Enable -fvisibility=hidden on static libraries by default.
Only on non-GCC2 for now, as GCC2 does not have -fvisibility.

An opt-out is left as a possibility, and is unfortunately necessary
for libshared and libicon, as these two are used even in WebKit instead
of linking to the .a. However, libcolumnlistview, libagg, and a whole
bunch of others are now no longer exported, so this is already a major
improvement on what symbols we were leaking.

This may provide performance differences for consumers of these APIs,
as GCC and the linker are now free to merge and directly use functions
that previously could have been semantically interposed. AGG usage in
app_server, especially, may benefit.

We can also now remove the addition from libnetservices, so do that.
2021-09-08 17:32:47 -04:00
Augustin Cavalier
03980b1fb0 build: Make LinkAgainst recursive for static libraries.
That is, it will now pull in NEEDLIBS and LINKLIBS set by LinkAgainst
from static libraries also built by Jam. This allows specifying what
libraries other static libraries need only once (in most cases;
occasionally things are not evaluated in a sane order and then
this does not quite work.)

Use this for libnetservices.a, which needs libshared.a, so that
dependencies on it do not have to be declared within most in-tree
consumers of libnetservices (e.g. Package Kit, http_streamer, etc.)
2021-09-08 15:03:06 -04:00
Augustin Cavalier
0c69dde91f Jamfiles: Add missing link against libshared to two apps.
They still built succesfully because currently we leak a lot of libshared
symbols into libbe (or even libroot!). That will change in upcoming commits.
2021-09-08 14:57:33 -04:00
Augustin Cavalier
90f9eb2190 NetworkStatus: Remove TARGET_PLATFORM_HAIKU_COMPATIBLE test.
We no longer build things for BeOS.
2021-09-08 13:40:21 -04:00
Niels Sascha Reedijk
0b86520c4d BString: add support for move semantics with C++11 and up.
This implements the "rule of 5" for this type. While the copy operation for
BString was already using shallow copies of the underlying data, this change
further optimizes moving the data from one object to another.

While it is not the intention to implement move semantics to all types in the
legacy Haiku/Be kits, data types like BString are good candidates, because move
operations are often useful when working with data within an application.

In this implementation, the internal data of the string object will be set to
NULL, thus leaving an empty string.

Change-Id: I16bf9424f9b17f622b0b57659b80628e18760288
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4428
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-08 07:07:36 +00:00
Augustin Cavalier
3cf06bfc6b libnetservices: Set -fvisibility=hidden (on non-legacy GCC.)
Otherwise, the symbols will be re-exported into whatever shared
libraries the static library is linked into, and potentially conflict
with other applications that also linked against some other version
of the same library and symbols.

Fixes #17134, or at least the crash portion. I couldn't get any
audio or video to play here, they seemed to just cause WebKit to
stutter and hang a lot when trying to load pages with them. Maybe
that's expected behavior, though?
2021-09-07 19:32:37 -04:00
Augustin Cavalier
5c7bfa02d0 mixer: Remove "Haiku" from the displayed name and info.
We are no longer running these addons on BeOS.

Change-Id: I4baa562bfdfaab56a92689c29d068ec59b2ee9d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4433
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-07 20:46:19 +00:00
Augustin Cavalier
f91a86c46f Cortex: Bounds checks in AudioFilterNode::processBuffer.
Processing more than framesRemaining leads to buffer overruns.
2021-09-07 16:18:22 -04:00
Augustin Cavalier
dc912367ae Cortex: SpecializeTo() once more before creating the operation.
If the incoming node is still pretty generic, we have to specialize
the input format to the output format in order to not be left with
wildcards.

Additionally, ensure that the frame sizes match up. MultiAudioNode
silently rejects buffers that are not sized precisely as it wants
them, so we need to attempt to have equivalent frame counts
on either end.
2021-09-07 16:17:31 -04:00
Augustin Cavalier
4f7febcdf2 Cortex: Use format_is_compatible and SpecializeTo() where applicable.
Same as the prior change to MultiAudioNode. Should not be a functional
change here, as this code looked pretty correct as it was.
2021-09-07 16:15:34 -04:00
Augustin Cavalier
3006aae081 Cortex: Use bytes_per_frame in another case.
No functional change.
2021-09-07 16:14:25 -04:00
Augustin Cavalier
3a7aca9728 Cortex: Use B_AUDIO_SIZE_MASK instead of a constant.
No functional change.
2021-09-07 16:13:59 -04:00
Máximo Castañeda
c634a5cf32 nVidia driver: gcc2 build fix
Change-Id: I6b3f7d25ef66bd5789aa12dbccfd8e9da9701c0f
2021-09-07 21:08:00 +02:00
Augustin Cavalier
223769c60c multi_audio: Clean up formats reporting support.
* We are no longer on BeOS and can now use format_is_compatible
   and format->SpecializeTo.
 * Remove set-but-unused media_format in node_output.

This allows AudioAdapter to connect to MultiAudioNodes.
However, no sound is produced. I have yet to determine why.
In the meantime, this seems to at least not break audio.

Change-Id: I983a496556c52a4ccde0c2cd165c659d597b84c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4432
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-07 17:06:00 +00:00
Rudolf Cornelissen
b66c201f91 nVidia driver: for PCIe map framebuffer correctly (64bit) 2021-09-07 09:24:17 +00:00
Augustin Cavalier
ec16c2aedc media/mixer: Disable and remove USE_MEDIA_FORMAT_WORKAROUND.
Apparently BeOS' SpecializeTo() was broken, and so when this code
was introduced in 2003, it came with its own copies of the
specialization routines.

We don't run on BeOS anymore, and our specialization routines
appear to be identical to these, so, we can drop them.

Should not result in any functional change.
2021-09-06 20:35:52 -04:00
Augustin Cavalier
7ba8de3cac Media nodes: Add missing "const" around usages of media format wildcards. 2021-09-06 20:34:38 -04:00
Augustin Cavalier
1640b4de64 multi_audio: Style and dead code cleanup.
No functional changes intended.
2021-09-06 19:52:30 -04:00
Augustin Cavalier
2e8023b371 libroot_build: Use "=" instead of "+=" for clarity's sake.
No functional change.
2021-09-06 17:01:25 -04:00
Augustin Cavalier
86b6d54b46 listusb: Fix typo in usb_audio descriptor printing. 2021-09-06 16:50:27 -04:00
Augustin Cavalier
906fe09778 libroot_build: Rework path normalization to not rely on system calls.
This path normalization was functionally a recursive lstat(), which
should theoretically be identical to rooting the path in the CWD
and then normalizing the rest of the components after that.

Well, a recursive lstat() is much slower than simple manipulation.
How much slower? Well, on my system, the existing lstat() version
took up a combined total of 63,284,607 us for building haiku.hpkg
(only the package itself, no other components rebuilt), while
this new version uses just 47,901 us -- and this just for a @minimum!

I performed a full @nightly build with both versions in use at once,
with an abort() in place if paths ever did not match, and it
did not fire once. (I even sabotaged the new function just to
ensure that it would actually find differing paths.)

This code was merged in 338b8dc301 (2005),
and has remained largely unchanged since then. I don't know what the
rationale was at the time for using this method instead of this much
simpler version. Perhaps the 3-argument normalize_dir_path was written
first and used more, while this 2-argument version was added later
as a simple shim? But the original commit has no uses of the 3-argument
version aside from the 2-argument one...

Either way, this is an absolutely unbelievable speedup to Haiku builds.
These functions are hit in every I/O operation of all libroot_build
users, and their usages really do add up, as the example above shows.

Fixes #16288.

Change-Id: Ia11f64b0d4106ee62f22741a32ccc0c75c184442
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4427
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-06 20:49:37 +00:00
Augustin Cavalier
1ea3818ff5 LocaleRules: Ignore errors in ExtractCatalogEntries.
It seems GCC has the same behavior as Clang now, so we can ignore
errors generated while preprocessing. (Previously we did anyway,
before the recent commit adding -e to JAMSHELL flags, so this
just continues previous behavior.)
2021-09-06 16:45:13 -04:00
Alexander von Gluck IV
7068c45485 system/uart: refactor debug_uart, fix arm uart
* Drop ArchUART8260 layer to reduce complexity. It's whole
  existance in life was to adjust the mmio alignment.
* Fold architecture mmio alignment into DebugUart
* We could potentially pass a Init(int mmioAlignment)
  arg in the future if the macros get too messy.
* Move Barrier code back a layer into DebugUART
* Fixes the arm uart and EFI build

Change-Id: I0f127d902993e9f6e6a03cac8c7c37c0363134bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4422
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-06 20:37:14 +00:00
Augustin Cavalier
34fef46b06 configure: Pass -e to JAMSHELL.
We have a number of "actions" blocks in our Jam rules with more than
one command, and so without -e, the actions will only fail if the last
command does. This is clearly not what was intended in virtually all
cases, so we should pass -e to the shell to ensure any command failing
causes the whole actions to fail.

I am kind of surprised that nobody noticed this before now, even
in the original Jamrules going back to the Perforce days. I only
noticed it because I experimented with making "rm" fail to find
places where it was invoked instead of $(RM)...
2021-09-06 16:02:17 -04:00
Augustin Cavalier
db0b7d8401 build: Use $rmAttrs and $(RM) in more places instead of 'rm' directly.
Should not result in a functional change in most cases, but it might
on some systems without full xattrs or emulation.
2021-09-06 15:59:44 -04:00
Augustin Cavalier
d8ffdea39e build/scripts: Add missing set -e to rm_attrs. 2021-09-06 15:58:03 -04:00
Alexander von Gluck IV
08d9e48492 servers/bluetooth: Fix scaling of deskbar icon
Change-Id: Id83a1aeb9736be1d08ba10bb52ab81f2cab11625
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4426
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-06 16:22:31 +00:00
Adrien Destugues
85ab8ef650 ps2 synaptics: don't spam the syslog when nothing happens
Some logs are emitted even when nothing at all is happening, constantly
spamming the syslog. Log them only the first time they happen.

Change-Id: I81511a7ce245c2141fa3dcd141b2f3732d9b51ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4424
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-05 23:49:44 +00:00
Adrien Destugues
fdbbdccc05 ps2: allow more selective tracing
In some cases, we don't need the full tracking of every byte received at
the PS2 level, but higher level traces from specific devices will be
enough.

Change-Id: I31984e6b7784b5d033b457f43f3793f772213f4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4423
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-05 23:49:44 +00:00
Augustin Cavalier
cadaf7583f XHCI: Resolve TODO about referencing the specification in isochronous handling. 2021-09-04 13:12:25 -04:00