Commit Graph

60843 Commits

Author SHA1 Message Date
Adrien Destugues
2beddbfd46 intel_extreme: fix pipe and plane size registers
- The name for the registers were swapped
- The width and height were also swapped in one of them
- Remove some old #if 0 code that touched these registers but has been
  disabled for a while.
2020-01-05 10:11:37 +01:00
Adrien Destugues
abcbfac601 intel_extreme: use the panel fitter for generation 4 devices
LVDS panels must really be driven at their native resolution, otherwise
they will simply not work. This means we should basically never touch
the video timings on that side. We need to only set the source size in
the pipe configuration, and let the panel fitter figure out the scaling.

On my G45 laptop, this allows me to use non-native resolutions on the
laptop display. This also means when booting with a VGA display
connected, I do get a valid display on the internal panel (using the VGA
resolution). VGA still gets "out of range", so we're still not setting
up something there.

If I switch to VGA display in the BIOS, I get a working picture there
and garbage on the internal display, which is progress (before I would
get a black screen on the internal display)

Fixes #12723.
2020-01-05 10:11:37 +01:00
Augustin Cavalier
d927a11fff Revert "x86_64: use a working implementation of atan2"
This reverts commit 230ade30261a44cd02ed689a34b953406d0cc677.i

This just causes applications that call atan2 to crash. So, clearly,
it is not working.
2020-01-04 15:51:02 -05:00
Augustin Cavalier
d2f7af0edc Revert "deprecate gets and tmpnam"
This reverts commit 92e9211d7b.

It broke the build, and apparently cannot be fixed until GCC
has been patched.
2020-01-04 15:26:08 -05:00
Humdinger
8793a2cd57 HaikuDepot: Remove an unneeded B_TRANSLATE
If the string consists solely of variable that mustn't be translated,
don't bother to sending it to Pootle for translation...
2020-01-04 17:34:08 +01:00
Humdinger
a00b7c2f18 DoCatalogs for VirtualDirectoryWindow
Fixes #15601
2020-01-04 16:59:13 +01:00
Autocomitter
c8d241ea1e Update translations from Pootle 2020-01-04 08:45:51 +00:00
Kyle Ambroff-Kao
4df8f0223b tests: Fix build on x86_gcc2
This patch fixes the build of unittests on x86_gcc2.

src/tests/kits/shared/KeymapTest.cpp:
* Don't use auto
* Don't use braced-initialization for std::map.

src/tests/system/kernel/vm/Jamfile:
* Link lock.o from kernel source to include _mutex_lock and
  _mutex_unlock when linking libkernelvmtest.so

Change-Id: I60e02bfb23334064ec25d767f659a188e393ed1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2074
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-04 08:29:41 +00:00
Adrien Destugues
230ade3026 x86_64: use a working implementation of atan2
The "generic" files are actually not generic at all. They were
imported for the PowerPC port and assume a matching format for float.
However, x86 uses a different format as the values are stored with 80
bit precision in the FPU. Therefore the generic implementation is
not appropriate whenever it does bit manipulations.

The glibc implementation uses the same sourcecode as the x86 version
for atan2, and there is no reason for us not to do the same.

Should fix #14933

Change-Id: I9addcfdf8b0f980c8842480885b59c0133866756
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2067
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-03 08:29:51 +00:00
Adrien Destugues
92e9211d7b deprecate gets and tmpnam
For #15515

As mentionned in the ticket, we may also want to hide the symbols
altogether from libroot for newer API/ABI versions, unless we still want
to provide C89/C99/C++98/C++11 compatibility, in which case we still
need them around.

Change-Id: I0ee267fb6c4c2f4bae9b1ba6f68e2bcefc399a7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-03 03:35:04 +00:00
Kyle Ambroff-Kao
2c17ecf993 tests/kits/support/bmemoryio: Fix WriteTest
This patch fixes a bug in the BMemoryIO unit tests that made them
fail and adds an additional test case for read-only buffers.

The failing test case invokes BMemoryIO::WriteAt() with the position
parameter set to -10, which is invalid and should result in a return
value of B_BAD_VALUE. And it does, but the test fails because it was
testing for the return value 5, as in 5 bytes copied.

An additional test case is added for read-only BMemoryIO objects. If
the BMemoryIO(const void*, size_t) constructor is used then it will be
marked as read-only, so writes should fail with B_NOT_ALLOWED.

Change-Id: Icf4b837c77fba2be958f9d3e4b3adb18a23b037f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2066
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-03 03:30:35 +00:00
bitigchi
d3c070f2ed Update Credits
This commit adds Turkish lang credits.

Change-Id: I130881871604b1096848a6aa52cf0ee00272de2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2070
Reviewed-by: humdinger <humdingerb@gmail.com>
2020-01-02 19:33:51 +00:00
X512
801a1fe1a9 debug_server: make crash dialog button default
Change-Id: If05f775fe919445b3e18d356a9837fdb6fabf5cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2063
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-02 13:38:08 +00:00
Alexander von Gluck IV
bb47979f4f tests/qemu-boot-test: Fix alternate platform tests
Change-Id: I519969809502ba45336c4a54d514a8f7303bb3a6
2020-01-01 20:50:24 -06:00
Alexander von Gluck IV
958151e8b9 tests: Add standardized qemu boot test
Change-Id: I0383680bccaf08be6514bb6f64ee8c9a47f63dbc
2020-01-01 20:44:47 -06:00
Adrien Destugues
82f4ed7f38 bfs: add stub for ResizeVisitor.
This allows to have all the tools (resizefs, fs_shell, etc) merged, and
split out the remaining BFS resize changes in a way that makes some
sense. We can easily merge all the basic infrastructure (ioctls, etc)
without any of the actual resizing code (I'll leave that to
professionals).
2020-01-01 12:07:55 +01:00
ahenriksson
0b3f78e73b fs_shell: 'resizefs' command
Change-Id: Ie4c18c76cd1a69945739817ecd99409b7611dd7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/939
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-01 10:24:30 +00:00
Adrien Destugues
003169fbb3 libprint: remove arbitrary limitation of allocation size
libprint had a very conservative size limitation (4MB) for the bitmap it
allocates. This leads to splitting a page to print in several "bands"
(about 5 in my testing). However, these may still be too large for the
printer driver to handle, which means the driver may be further slicing
things up, or other drivers may need the full page anyway and recompose
it in some way.

Instead of an hardcoded limit, now try to allocate a bitmap for the
whole page, and if that doesn't work, progressively increase the number
of bands until we manage to allocate a bitmap. Stop when we have split
the page in 256 bands, as it seems rather pointless to be that far. Call
debugger when this happens, as there doesn't seem to be a way to do
better error handling here (the code used to raise std::bad_alloc if
BBitmap allocation failed, or just return an invalid bitmap and view).

Change-Id: Iba690f68c748d20828709244a23e82a08185390e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1922
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-01 10:19:19 +00:00
Augustin Cavalier
726445b72e XHCI: Clean up TRACE() statements. 2019-12-31 20:42:15 -05:00
Augustin Cavalier
0981cb8686 XHCI: Rework TRB size handling.
There is a section of the spec that dictates how TRBs need to be
sized within a TD, and we were not following that. This should
bring us into compliance.

See inline comments for more details.
2019-12-31 17:52:02 -05:00
Augustin Cavalier
84fc83275d XHCI: Update all references from the specification 1.1 to 1.2.
Only comments changed, no functional.
2019-12-31 17:52:02 -05:00
Adrien Destugues
0e70db5de3 ParticlesII: some fixing for 64bit.
Fixes #15425.
2019-12-31 21:45:37 +01:00
Adrien Destugues
d8e072f49f intel_extreme: enable LVDS if a VESA panel information is found
This is useful for example on the eeePC 701, where the EDID/DDC lines
from the LCD display are not wired to the video card as expected (I
confirmed this by downloading the eeePC schematics, the LCD is somehow
wired to what would normally be a PS/2 port on the embedded controller).

In this case, there is no way we can get the EDID data from the usual
means, however, we still know the panel resolution by looking it up in
the VESA BIOS, and if we found it there, there has to be an LVDS panel,
so we can configure it.

Should fix #14066.
2019-12-31 21:34:53 +01:00
X512
1a221bf3d3 haiku3d: fix crash on exit
Change-Id: I0d3d5d333f1dad5818149cde0fed29797f12e825
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2062
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-12-31 17:42:31 +00:00
Adrien Destugues
755a88de68 Actual build fix. 2019-12-31 17:20:01 +01:00
Adrien Destugues
c67336bf3f Build fix. 2019-12-31 16:38:48 +01:00
Adrien Destugues
baa4caf76b Fix NTP synchronization.
Fixes #15408.
2019-12-31 16:20:11 +01:00
Adrien Destugues
d57174ea94 BLanguage: check locale validity in SetTo.
Fixes #15514
2019-12-31 14:26:32 +01:00
Adrien Destugues
32158f3d64 Fix test_app_server build.
Fixes #15536.
2019-12-31 13:15:30 +01:00
Adrien Destugues
620d0707d7 intel_extreme: probe DVI port C as well.
Might help with #15537.
2019-12-31 12:47:49 +01:00
Kyle Ambroff-Kao
fbc30e9145 support/String: Revert 6c67c7d63 to fix double-free
6c67c7d63 was attempting to fix a leak caught by a static analysis
tool, but it actually just introduced a double-free bug. Running
`UnitTester BString` will result in a crash.

The original code was correct because, in the event that realloc()
fails in BString::_Resize(), the value of fPrivateData is still
retained. It will be freed by the destructor of BString only if
fPrivateData is not shared by another BString instance, since BStrings
are copy-on-write.

Note that while the change in 6c67c7d63 caused tests to fail, that
doesn't mean those tests are ideal. They only trigger
BString::_Resize() to fail because they depend on implementation
details of hoard2 which limits allocations via malloc() to
1GB. Most malloc() implementations will allow allocations of arbitrary
sizes using anonymous mappings (mmap on Linux, or create_area() in
Haiku). This is a much bigger change, so for now I'm just adding some
comments so that we can revisit these tests if we make a change to the
allocator.

Change-Id: I208c1c7a76b6b4409d237b911c62bb3198e49dab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2060
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-31 11:03:59 +00:00
Adrien Destugues
8d663f4d33 intel_extreme: fix PLL limits again
In hrev53618 I swapped both the LVDS and SVDO limits for i9xx to be in
the same order (always use "min" for the smallest value and "max" for
the largest, both for dividers and multipliers). But I missed the fact
that P2 is not searched for values in the range as are the other
parameters.

So, the code that picks the appropriate P2 value needs to be adjusted
accordingly. Now that this is clear, put the values always in the same
order (smallest value in "min", largest value in "max") and adjust the
code to comute P2.

Fixes #15573.
2019-12-31 12:00:40 +01:00
X512
9ca1f3a903 app_server: don't focus the window on mouse down if it accepts first click
* matches BeOS behaviour. Fixes #15544.

Change-Id: I2a3636024753b53ba9ad6446c187e6a4479c31b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2020
Reviewed-by: John Scipione <jscipione@gmail.com>
2019-12-31 09:28:59 +00:00
Augustin Cavalier
c9606abe0c boot_loader: Add an error message to the "Continue booting" item.
This way, when it is disabled, at least there will be an error
message giving some indication of what has gone wrong.
2019-12-30 19:07:21 -05:00
Augustin Cavalier
94d36145df mount_server: Remove the scary warning for BFS partitions.
Even if we are still not so sure about the veracity of other
filesystem drivers, the BFS driver has had no reported corruption
bugs for quite some time (almost 2 years I think). In fact the
only real corruption issues heard of recently are from KDLs,
which are also a vanishing issue.

So, disabling the warning entirely for BFS partitions probably makes
sense at this point.

Change-Id: I5470c956d57b90ea00b647bf15299ba606ba01c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1822
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-27 23:04:54 +00:00
Joachim Mairböck
80df503d1d sis19x: Fix build on gcc2
Declare loop variables before the for loops to be compatible with C89.

Fixes #15583.

Change-Id: If2a3b4447a88bb2e65c5ff4166f32df1b26fd859
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2058
Reviewed-by: Alexander G. M. Smith <agmsmith@ncf.ca>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-27 22:21:46 +00:00
Zotyamester
a9e97bc01f Remove 'always true' if statements (PVS 547)
Change-Id: I8d50e0ca48b48e4ce5091efee65949c6d65099a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2057
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-12-27 13:40:05 +00:00
Adrien Destugues
d9e196c7f5 DefaultMediaTheme: move controls to a namespace
They have generic names and are likely to conflict with other things. In
particular, there is another BPrivate::TitleView in BColumnListView,
which results in weird behavior (and me wasting days debugging things
and scratching my head) when one links libmedia before libcolumnlistview
and the wrong one ends up being called.
2019-12-26 22:54:54 +01:00
Humdinger
6f46a20613 AboutHaiku: added credits for Portuguese + Brazilian
Added Victor Domingos and "zeru". Thanks, guys!
2019-12-26 09:12:17 +01:00
Augustin Cavalier
978182e00a sis19x: Add szharski to the copyright header.
He wrote the original version of haiku_sge_get_mac_addr_apc.
2019-12-25 19:01:50 -05:00
Augustin Cavalier
ca869f7df6 sis19x: Add glue mechanism for get_mac_addr_apc.
The PCI enumeration functions are not implemented in the compat layer,
so we need a glue function that performs the Haiku equivalent here.
This code existed in the old Haiku-native driver, so it's just
copied from there.
2019-12-23 16:34:45 -05:00
Augustin Cavalier
21a5c628fb XHCI: Add buffer count to "unable to allocate" trace, fix freeing.
FreeDescriptor needs to know buffer_size and buffer_count,
so we have to initialize these for the fail-exit case to work.
2019-12-23 15:32:26 -05:00
Augustin Cavalier
93904285cf USB: Add overall timeout to the PhysicalMemoryAllocator.
The within-an-attempt timeout did not successfully break up
deadlocks that occur on a system with a lot of USB transfers
going, as we may never hit 2 seconds in between wake-ups,
but the size requested may be un-fulfillable regardless.

So, now we have a 2-second overall timeout. This fixes
the system freeze in #15569, but now attached USB disk
drives enter a Stall state, making the system unusable
anyway.
2019-12-23 15:31:34 -05:00
Augustin Cavalier
a77769a549 USB: Rework the PhysicalMemoryAllocator to use MutexLocker.
No functional change, but will make some subsequent
changes easier and more fail-proof.
2019-12-23 15:29:43 -05:00
Augustin Cavalier
006add310a boot_loader: Fix initializing old package volume states.
In hrev53370, leavengood refactored this function out of
PackageVolumeInfo::SetTo(). Inside that function, there
is a "state" variable which is initialized to the first,
default state, which is always the head state.

Refactoring it out of there and changing this to NULL meant
that GetNext would always return a NULL state, so the
states would never be initialized, and booting from an
old state would thus not be possible.

Fixes #15380.
2019-12-23 14:25:02 -05:00
Augustin Cavalier
470db787dc BuildFeatures: Remove the gnuefi build feature.
Now unused since the switch to the Fuchsia EFI headers.
2019-12-23 12:38:47 -05:00
Adrien Destugues
7a202ae8fc DeskCalc: fix translation of key labels
The labels were never actually translated, only marked for use in
catalogs. Moreover, all the keys were sent as a single string, which is
unconvenient for translation and requires useless parsing in the code.

Use an array of strings instead, which is simpler.

There is a change to the archiving format, instead of storing the whole
keymap, only its name is stored. For backwards compatibility, if we
detect "ln" at the start of the string we use scientific mode.

Change-Id: I566d8d51e8ac6e780fc25207aad1dfa7ff737988
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2049
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-22 21:01:51 +00:00
Adrien Destugues
4766e7fe56 Tracker InfoWindow: collapse borders and make resizable
Fixes #15344.

Change-Id: I3560137248babb88e9475efb775675decb4d1181
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2050
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-22 20:59:26 +00:00
Jérôme Duval
d7690f68a8 userlandfs: ReadAttr() with user_memcpy()
should fix #14969

Change-Id: Iaf4e1362841b65cb56f112d379db041ef3d8ab08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2047
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-22 11:35:57 +00:00
Kyle Ambroff-Kao
39147a617f write_overlay: Fix SMAP violation in OverlayInode::Read
Change-Id: I66d852008a4375bb9295bc0238ed6289fb8439d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2046
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-12-22 11:00:48 +00:00