Commit Graph
100 Commits
Author SHA1 Message Date
Adrien Destugues 0ab9c3c538 Move source and development packages out of /system/packages on release images
Activating all these packages on live boot (especially live DVD where we
also have the write overlay eating up RAM) significantly increases
memory requirements for running Haiku, to the point that Installer may
fail to run. Move them outside the packages/ directory so they are not
activated.

Installer already skips the _sources_ directory when installing, and
lists the contents of _packages_ with checkbox to decide what to include
in the install (they are put in system/packages on the target disk).

Fixes #15621.

Change-Id: Ibfac14c43dbe708316a0d82ca1c9d49b5cba2aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2157
Reviewed-by: Sergei Reznikov <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2020-03-14 18:31:23 +00:00
Adrien Destugues 768f6b3bc4 Fix build for non-EFI architectures.
Change-Id: Ic2c8a9a64e63f4b844e964eb1066291d2edda7b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2343
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-14 18:28:24 +00:00
Adrien Destugues 228006ea74 package_daemon: fix path of activated-package files
Until now the activated-packages file was not used for anything, because
it was not looked for in the correct place.

Change-Id: Ib38f28b52e85af6900c0e2b61a9621734428ad25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2341
Reviewed-by: waddlesplash <[email protected]>
2020-03-14 18:27:35 +00:00
Adrien Destugues 6a30d84f3c add some docs for agp_gart and intel_extreme drivers
Not a lot of info there yet, but it's a start.
2020-03-13 15:42:03 +01:00
Adrien Destugues 22ec64553f intel_extreme: some minor fixes
- Cleanup HEAD_MODE constants. These should be completely removed, now
  that we have a proper notion of pipes and displays. But the DPMS code
  still uses them, for now.
- Fix the ie_pipe command where width and height were swapped and
  missing a +1 to show the actual videomode values
2020-03-13 15:42:03 +01:00
Adrien Destugues f16db28447 intel_extreme build fix 2020-03-09 20:37:47 +01:00
Adrien Destugues 23be24d2d2 intel_extreme: fix panel fitting code
This could also help with VGA output, a logic error in the pipe code
would lead to never configuring the pipe resolution. May help with VGA
output on SandyBridge and IvyBridge (but I get DPMS off on my laptop for
now, so I think something isn't quite right yet).
2020-03-08 16:01:43 +01:00
Adrien Destugues 168aff90a7 intel_extreme: program the DPLL_SEL register on SandyBridge
We need to assign PLLs to pipes and transcoders. The assignments on
previous generations were fixed, but now it's up to us to set it up.

Do the simplest thing for now: assign PLL1 to pipe A and PLL2 to pipe B.
2020-03-08 16:01:43 +01:00
Adrien Destugues 7991d1b79d intel_extreme: fix assigning pipes to displays
The previous code did not handle correctly the case where a display
requested a fixed mapping, and cloud end up assigning the same pipe to
multiple displays. But we want a separate pipe for each display,
allowing multihead support later on.

Rewrite the algorithm to first assign pipes to devices with fixed
constraints, and in a second pass assing the remaining pipes to other
displays.
2020-03-08 16:01:42 +01:00
Adrien Destugues deb591ec89 intel_extreme: fix detection of BDB block with LVDS panel info
The terminator is not always present, but the mode (at least the fields
we use) seems to be there nonetheless.
2020-03-08 16:01:42 +01:00
Adrien Destugues 54e9c79ba4 nvme: build fix. 2020-03-08 16:01:42 +01:00
Adrien Destugues f029289cbd hvif2png: allow larger sizes.
What if I need some high resolution rendering of icons?

Also fix the error message for out of range/unparsable sizes that would
show "-s" as the problematic size.
2020-03-01 17:25:01 +01:00
Adrien Destugues 0e7d1f13e0 AppInfoList: make sure to dereference symlink before comparing
May fix #15633 (untested)

Change-Id: Id0c8f0617553d988e767bae46fe0ac8fd3e698e9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2118
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-25 12:23:23 +00:00
Adrien Destugues 8e1e00129c Installer: handle hpkg files in _packages_ directory
Fixes #14310.

Change-Id: Iafd75b86d242af816a089dd1bdaea2c697668f5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2184
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-20 16:25:38 +00:00
Adrien Destugues 3d11fed209 Installer: fix drawing of optional packages view
Rework the layout of the installer window, do not try to put everything
in a single grid but instead use a mix of grid and groups as
appropriate, which keeps things simpler.

Make the width of the window more font sensitive.

Have the package view properly resize with the window, and the items in
it still draw properly (checkbox and name on the left, size on the
right)

The menu fields for source and destination don't need to extend to the
whole window width, so allow them to be smaller.

Fixes #5785

Change-Id: If0683f610b9e7f3629d51d25c1d8e8b00c101156
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2185
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-10 09:49:51 +00:00
Adrien Destugues 11d738a430 wacom: remove control device
It is unused, and it leads to an unexpected entry in the Input
preferences.

Change-Id: I68f31c3ae6baca7be1a5d6070dc1ebcf04522dad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2208
Reviewed-by: waddlesplash <[email protected]>
2020-02-09 22:21:40 +00:00
Adrien Destugues 8854b89737 PaneSwitch: fix a layout issue with large font sizes
This is used in Find window and also in Installer.

Remove some unused code (I think leftovers from Tracker InfoWindow
refactoring).

Change-Id: Ic0dd07e06c11b3839adbe5b8ef9598a5b16171a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2234
Reviewed-by: waddlesplash <[email protected]>
2020-02-09 20:52:27 +00:00
Adrien Destugues 980a393047 intel_extreme: build fix, remove unused variables. 2020-02-09 18:39:17 +01:00
Adrien Destugues af8d74ae10 intel_extreme: fix width of interrupt register.
The driver had been using 16 bit reads and write (introduced by Axel in
2006), but the hardware documentation (released in 2008) says the
register is 32bit. Use 32bit since that makes the code identical to
what's used for later devices.

If 16bit is needed, it's only for the pre-2008 devices.
2020-02-09 17:32:27 +01:00
Adrien Destugues 015fbeab9c intel_extreme: fix pipe selection for Ivy Bridge and later
Should fix #15661 and #15662.
2020-02-09 15:40:52 +01:00
Adrien Destugues 0e280da525 SecureSocket: fix non-blocking reads
OpenSSL says we should retry when a non-blocking read finds no data is
pending. But in that case we should not retry immediately, because the
operation should be non-blocking.
2020-02-08 22:21:27 +01:00
Adrien Destugues 445de1d348 Use Input preferences
And remove Mouse, Keyboard and Touchpad.

Userguide and localizations will need to be updated.

Change-Id: I4543b2b63367cd13562c542610bad34b5934b103
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2210
Reviewed-by: waddlesplash <[email protected]>
2020-02-08 17:03:19 +00:00
Adrien Destugues 31ff65f62f Installer: better computation for minimal window width
The width of the status messages should not depend on the width of the
logo. Reserve about 30 characters no matter which logo is used (this is
slightly larger than it used to be).

Fixes #15679.
2020-02-06 22:39:43 +01:00
Adrien Destugues 145f127f3a Input preferences: fix crash and add icon
Fixes #15680.
2020-02-06 22:30:12 +01:00
Adrien Destugues ffd6c2f4bd input_server: use a better name for trackpoint devices
Now that the names are visible in Input preferences, let's try to have
better ones

Change-Id: Ia67e57c449e0ad292ce573b50a1e533d84c90d68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2209
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 07:29:13 +00:00
Adrien Destugues a206dcc221 usb hid: implement horizontal scrollwheel
- Fix USB_hid_page_consumer.h: some values are skipped in the spec so
  our defines were off
- Handle the horizontal wheel on my mouse which is declared as a
  CON_AC_PAN, but otherwise works just like the vertical wheel
- Input server and interface kit already handle the events properly
  (they were available for serial mice already).

Change-Id: Ie0080ebb27e9478bcfe9f9dc5fd2a936ae05a848
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2201
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:10:10 +00:00
Adrien Destugues 0f9ffb37c1 Add a Person file to tracker new templates
Fixes #9397.
2020-02-05 21:25:22 +01:00
Adrien Destugues 53db2fc8cf Installer: Missing break
Leading to opening two Installer windows after closing EULA.

Thanks to Diver for reporting!
2020-02-04 21:10:12 +01:00
Adrien Destugues 79ded8ca16 Reduce polling interval for low-speed devices
Fixes #7651, my Logitech gamepad works.

Change-Id: Ia3f92ba817576946dabee262a2fd5af8102a109f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2198
Reviewed-by: Stephan Aßmus <[email protected]>
2020-02-04 20:05:10 +00:00
Adrien Destugues 8769583f90 Build fix. 2020-02-03 22:19:22 +01:00
Adrien Destugues 3bea15adca BSecureSocket: retry reads after interrupted syscalls.
SSL_AUTO_RETRY does not cover this case (it only covers SSL errors, not
underlying socket ones), so we still need to retry reads manually here.

Fixes #14638.
2020-02-03 21:47:08 +01:00
Adrien Destugues 9762e2fe45 Update readme.compiling
- Clarify why building jam is not needed on Haiku
- Put the 64bit instuctions first, as they apply to both Haiku and other
  platforms and are the way to go for people discovering Haiku, usually
  (only oldtimers will care about BeOS compatibility)
- Remove the "from non-haiku platforms" from 64bit instructions because
  they work just fine on Haiku as well
2020-02-03 13:39:46 +01:00
Adrien Destugues d439721d6c Bootloader menu: update copyright year. 2020-02-03 12:28:06 +01:00
Adrien Destugues cc55d41273 efi loader: implement simple in-memory log
This lets us see the bootloader log from the boot menu, which is very helpful
on machines with no serial port or other way to debug.
2020-02-03 12:28:05 +01:00
Adrien Destugues dcee1c8ce4 Installer: do not Quit() the EULA window directly
Fixes #15021.
2020-02-03 09:45:46 +01:00
Adrien Destugues af5b356d7d Installer: small tweak to layout
Should fix #14574.

Change-Id: I0aa13eda0af936d371664c678a6ff5b8ceabff79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2181
Reviewed-by: waddlesplash <[email protected]>
2020-02-02 23:45:05 +00:00
Adrien Destugues 8095ab5a4b Installer: use Walter as a placeholder logo
For non-official builds, Installer had no logo. This led to a window
sizing bug which is not seen in the official builds (both nightlies and
releases) as they both use the Haiku logo there.

Use Walter as a placeholder logo in that case. The png is generated from
the wonderbrush file in the separate artwork repo.

Change-Id: Iea361d7ac0fd2bdb147318632ff198c86c4b89c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2180
Reviewed-by: waddlesplash <[email protected]>
2020-02-02 23:45:05 +00:00
Adrien Destugues fdc13d7d97 Installer: do not allow installing to read-only partitions.
This would probably not work, right?

Fixes #14614.
2020-02-02 22:14:39 +01:00
Adrien Destugues 3aba70f980 install_wifi_firmwares: fix build of b43-fwcutter
byteswap.h was removed from glibc in current versions, so point to an
older git revision to get it.
2020-02-01 09:28:39 +01:00
Adrien Destugues 88d73c6cf8 intel_extreme: set the "image size" register on generation 4 and below
This is undocumented, but required for GMA 945 and probably earlier
devices as well. The register is reserved in later generation 4 devices,
and not mentionned at all in later versions.

Fixes #15655.
2020-01-28 18:56:59 +01:00
Adrien Destugues 2d697067b2 Further cleanup/optimization of system_time
On gcc4, we can use the __rdtsc builtin. On gcc2, provide a similar
inline-able version of rdtsc, and remove the rdtsc function written in
assembly, saving a call/ret on every call.

There has been some discussion about performance, but note that this is
only bootloader code, it is not used when the system is up and running,
therefore performance is not that critical.
2020-01-27 21:46:43 +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
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 <[email protected]>
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 <[email protected]>
2020-01-25 11:58:15 +00:00
Adrien Destugues eacbae702d agg: fix build. 2020-01-22 19:25:16 +01: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 <[email protected]>
2020-01-22 00:28:46 +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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2020-01-22 00:25:19 +00:00
Adrien Destugues 82f610c6ab BFilePanel does not live in libbe. 2020-01-19 18:03:22 +01:00
Adrien Destugues 1808b553a2 intel_extreme: do not reprogram transcoded/output mapping on ibex point
Another try to fix #15628
2020-01-19 11:04:31 +01:00
PulkoMandy 56f9c76088 sparc: boot mmu support
Get enough of the mmu working to be able to allocate memory.

Unlike on PowerPC, we get both address and size as 64bit values. So
adjust of_region to allow this.

Also unlike the PPC port, we do not drive the hardware directly, instead we
rely on the openboot primitives to manage the translation table. This
allows staying independant of the hardware, which is a good idea at
least for the bootloader (we can do actual hardware things in the
kernel)

Change-Id: Ifa57619d3a09b8f707e1f8640d8b4f71bb717e2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1482
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-01-18 03:32:29 +00:00
PulkoMandy 011b188df0 boot fatfs: fix misaligned access on sparc.
Change-Id: Id4d0a93ce13b5e5d479896dbfc10d71de1ba52c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1987
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-01-18 03:29:27 +00:00
PulkoMandy 959588394d openfirmware: more fixes for 64bit systems.
Gets call-method working for sparc, and fix more places where we
accidentally truncate 64bit values or sign-extend 32 bit ones.

Change-Id: Ic79c55ffa8d2b475858def1639004412f17dd0c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1986
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-01-18 03:29:27 +00:00
PulkoMandy 402f5046b0 sparc: boot cpu support
There is no /cpus in the device tree on my machine, the CPUs are instead
directly under the root. So search for them there.

There is also no timebase property, and according to the docs, the
RDTICK instruction just gets CPU clock ticks, so set them to the same
value for now.

The two CPUs in my reference machine are succesfully found now, yay!

Change-Id: I5fbb4cfc98ee3b68cb2aa810816e0054a56d52d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1483
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-01-17 16:47:41 +00:00
Adrien Destugues f6f76c4795 intel_extreme: do not change panel fitter registers in later devices
This code was accidentally re-enabled in hrev53690.

Should fix #15628.
2020-01-16 19:47:10 +01:00
Adrien Destugues 03c13e58de intel_extreme: do configure the LVDS panel when we use native resolution
Should fix the remaining problem in #14066
2020-01-12 10:40:34 +01:00
Adrien Destugues 388c78edd9 AboutSystem: make hyperlinks blue
and remove silly "click on license name to read it" hint, now that they
are more obviously hyperlinks
2020-01-11 13:25:28 +01:00
Adrien Destugues 6f7074581a intel_extreme: use panel fitter also for generation 3
Should help with #14066
2020-01-11 11:52:05 +01:00
Adrien Destugues 6ca34a59b5 Add some notes on how to use PCI serial ports for serial debugging. 2020-01-05 10:42:37 +01:00
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
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 <[email protected]>
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 <[email protected]>
2020-01-03 03:35:04 +00: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
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 <[email protected]>
2020-01-01 10:19:19 +00: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
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
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
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
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 <[email protected]>
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 <[email protected]>
2019-12-22 20:59:26 +00:00
Adrien Destugues 69f814cded BFileGameSound: allow initializing from a BDataIO
There is no reason to not allow this, and it makes it possible to load
data from eg. a BResource instead of a file, which is very useful.

Remove some unused members in the class and dead code, and fix style
issues.

Change-Id: I94cbd0c13c469ea80f55028cf33dfde2de4365ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2001
Reviewed-by: Stephan Aßmus <[email protected]>
2019-12-09 12:00:17 +00:00
Adrien Destugues 16fca25e27 runtime_loader: fix crash because of missing initialization
The "versions" table is populated from two sources: the elf
"needed_version" and "version_definitions" tables. Both populate
specific index in the version table. Each index has an hash, and one or
two strings.

The algorithm to find data in this table is to compare by hash, and then
do an strcmp on the strings when the hash matches.

However, nothing guarantees that all the indices in the version array
will be used. Indeed, libavutil does not use the first two. These were
left uninitialized.

It could happen that one of these would accidentally have its hash equal
to one of the actual hashes we need to lookup, and invalid string
pointers. This would of course lead to a crash. This was reproductible
easily with WebKit when loading the fmpeg add-on. I guess that hit just
the right allocation/deallocation pattern to make the runtime_loader
reuse memory from a block where it had previously stored the same hash.

Anyway, just clear the whole version table after allocating, so that
unused entries have an hash of 0 and NULL string pointers, this way they
can't accidentally trigger a hash collision and crash everything.
2019-12-07 16:05:11 +01:00
Adrien Destugues 74db79d587 intel_extreme: Fix swapping of p2 values for 9xx cards
This would lead to no valid PLL combination being found, and
uninitialized stack memory eventually used to set the PLL. Add a memset
and a debugger() call to make this easier to notice.

Should fix #14368

Change-Id: Iff307439dc82a8b81bb46c1b73b63c21ee1c8279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1898
Reviewed-by: Adrien Destugues <[email protected]>
2019-12-05 19:55:57 +00:00
Adrien Destugues af3d90a597 Attempt to fix gcc8 build. 2019-12-05 20:14:08 +01:00
Adrien Destugues b819569ef4 usb_video.h: build fixes
- Remove duplicate and otherwise unused lendian_bitfield.h
- Adjust listusb jamfile to use lendian_bitfield.h
- Fix various typos in usb_video.h and restore some fields to make
  listusb happy
2019-12-05 18:28:12 +01:00
Adrien Destugues 4236826da6 BGeolocation: build fix 2019-12-04 17:42:53 +01:00
Adrien Destugues edc5a2174e BGeolocation: add position to country mapping
Using the geonames.org API, so we will need an API key for it (similar
to the one used for MLS, deployed by the buildbot)

The unit tests uses the "demo" user, which is restricted to 20000 API
call credits and often expired. But we cannot use our secret key here as
it would need to be available to anyone running the test. If we ever get
to automate running the tests on a buildserver we could probably make it
use the secret username known by our buildbot instead.

Change-Id: Ia16880db82555ce85505ad28e1c623f692f46be0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1873
Reviewed-by: Alex von Gluck IV <[email protected]>
2019-12-03 08:01:14 +00:00
Adrien Destugues 70cdd7d4f5 BCountry: add SetTo and InitCheck.
Change-Id: I5fbc2a1c0e735d6edeb23672017bb64d1b3f4390
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1872
Reviewed-by: Adrien Destugues <[email protected]>
2019-12-02 12:32:15 +00:00
Adrien Destugues cf1a78566c netresolv: enable weak symbols
It's simpler to have these around, they allow autotools to find the
functions the regular way (using AC_SEARCH_LIBS) as the autotools don't
use the include file and can't see the #define we are putting there to
redirect to the __ prefixed version of the methods.

Change-Id: I6a9743e88503fbdcba98e276375bc11f73a64411
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1889
Reviewed-by: Adrien Destugues <[email protected]>
2019-11-24 15:08:18 +00:00
Adrien Destugues 1f391e37ea Switch back to hoard2 for now.
We'll reconsider rpmalloc when it has less overhead.
2019-11-24 15:35:51 +01:00
Adrien Destugues dd2676821a Revert "hoard2: Remove."
This reverts commit 3a2175926b.

A single week is clearly not enough to test a new memory allocator.
Bring back hoard2 for the time being, we'll consider rpmalloc when it
actually works better.
2019-11-24 15:12:43 +01:00