Commit Graph
100 Commits
Author SHA1 Message Date
PulkoMandy b289c1e406 Fix typo
Change-Id: I99137ae4d9cc40aa3142220191e7a0f638c60367
2023-04-29 22:46:03 +02:00
PulkoMandy 0ba60bc743 Move BarberPole from HaikuDepot to libshared
I want to use this in at least 2 third-party applications. I think it's
time to make it shared?

Change-Id: I855a59aab4ad6d47d77cf2901cb3dfc34c108059
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6296
Reviewed-by: waddlesplash <[email protected]>
2023-04-29 16:11:43 +00:00
PulkoMandy 095b381310 BitmapStream: fix grayscale AVIF decoding
BitmapStream creates a BBitmap without specifying a bytes per row, but
then check the bytes per row matches the header. It is better to ask
BBitmap for the desired bytes per row to avoid any difference in
padding.

Change-Id: Ie1facfd423ad888a14757a0fffc9e8cdf72ef832
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6301
Tested-by: Automation <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-04-04 18:37:03 +00:00
PulkoMandy 2ab05dc925 docs/develop: a few notes about invalidation, view bitmaps, and overlays
Following some IRC discussions, it seems useful to have this written
down somewhere.

Change-Id: Ic02686948d989bff2fa671a3831ba5aed1515d25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6085
Tested-by: Automation <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-03-09 12:45:34 +00:00
PulkoMandy 53df6323c8 docs/develop: reorganize app_server documentation
Separate the "interface specification" into multiple individual, shorter
pages. Also update some outdated parts and replace references to
OpenBeOS with Haiku.

Change-Id: I86baa9a78c5f7a8a3c4c7aa3ac2992714afecae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6084
Tested-by: Automation <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-03-09 12:45:34 +00:00
PulkoMandy 0c062f469a docs/develop: add some documentation about our Jam usage
Change-Id: I18c1fd3192468a14205bf192b3d1431397d1cc1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6086
Reviewed-by: waddlesplash <[email protected]>
2023-03-04 16:02:36 +00:00
PulkoMandy dd8d24ee62 build: remove most of MathRules.
We shouldn't be doing these crazy things.

The only usage of this is the NextID rule which computes an unique
number by incrementing a variable. This is used for example to generate
names for the extra files used in xattr emulation.

But we certainly don't need multiplication, division, etc. That's better
done in scripts (Python, for example) in rule actions. So keep just
enough of this for NextID to work, and we could probably make it even
simpler.

Change-Id: Id06d4f5e236205203fe8d604de440753b63801bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6088
Tested-by: Commit checker robot <[email protected]>
Tested-by: Automation <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-02-26 00:54:53 +00:00
PulkoMandy 5f88744263 BMenuField: allow to use non-fixed size in combination with layout mode
In fixed size mode, the menu field always uses all the available width.
In non-fixed size mode, the menu field will resize itself to be as small
as possible.

With layout, usually the difference isn't noticeable, since the layout
will already try to resize the control to the smallest possible size.
But there are a few cases where it makes a difference, when the layout
is over-constrained and the menu field can't be made as small as
possible. In that case, the menu field would be forced to fill its
allocated space, where we can instead make it a little smaller.

Change-Id: I911d497218a09aab3824865968558df5d4b3cf98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6076
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-02-21 10:47:46 +00:00
PulkoMandy fc2f1a3247 BMenuField: remove deprecated constructors
These were introduced by mistake during the addition of the layout
system. They have been private since 2011. It seems safe to assume that
nothing uses them anymore and they can now be removed safely.

Change-Id: I98d030096f9cb06fccc25233fe4da17d0213050e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6075
Tested-by: Automation <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-02-18 17:20:27 +00:00
PulkoMandy 3cc1da2b77 BControl: fix big-endian bitmap handling for control icons
The code is endian-dependant because the alpha channel is not at the
same place. This resulted in transparent white in icons being converted
to partially transparent yellow when attempting to darken the icons, for
example.

Change-Id: I57916139ba37b8d7ae0f9e9ba9e74c1d496d7b05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6077
Tested-by: Automation <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-02-18 17:16:14 +00:00
PulkoMandy 96e28a400a googlefs: De-Googlize, rename to WebSearchFS
DuckDuckGo terms of use say "don't use our name for your app", so go for
a generic "Web Search". Mention them in the README, however.

Their terms of use say "don't remove our branding", but the results from
the HTML page have pretty much no branding. There's a logo at the top of
the page, but the terms of use also say "don't use our logo". So I guess
we're fine here.

Change-Id: Ib24a95faf4e727769ae00c1cb74fab79abde0379
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5498
Reviewed-by: Adrien Destugues <[email protected]>
2023-02-08 18:42:37 +00:00
PulkoMandy 5a369046a3 googlefs: use DuckDuckGo HTML search page
This is much easier to parse. The only downside is it is HTTPS only, so
we can't do this in the kernel. But it works well as a userlandfs
filesystem.

TODO: rename and replace the icon. Make it clear that the replies are
generated by DuckDuckGo (we can add this in the README file exposed by
the filesystem for example)

Change-Id: I7cdbe7d71d63f3ab742f21dc55fb9df7b16da7df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5495
Reviewed-by: Adrien Destugues <[email protected]>
2023-02-08 18:42:37 +00:00
PulkoMandy 49efa33dd0 ps2 synaptics: implement 'extended W' mode.
"Newer" synaptics touchpad support a new mode where they can report more
information to the host. In this mode, there is a different packet
format for tracking extra data from the touchpad, including a wheel
encoder (mousewheel) if available, and multitouch finger tracking.

This mode is documented in the Synaptics touchpad interfacing guide
(Synaptics document 511-000275-01 Rev. B), but was not yet implemented
in our driver.

It should help with detecting multiple fingers, or finger position on
clickpads to determine right or left click.

This change implements the following items from the Synaptics
interfacing guide:

- Cleanup and clarify the code for features detection to properly report
  clickpads
- Enable "extended W" mode if supported
- Process extended W values 0 (mouse wheels, reported in the
  touchpad_event structure and could be used by input_server for
  scrolling), 1 (secondary finger), and 2 (finger count)
- Fix handling of wValue, which is not always a finger width
- Add handling of vValuen which indicates the finger width when wValue
  doesn't

Overall, this should provide the movement_maker with a better picture of
what's happening.

Also improve tracing to show received packets and the corresponding
WValue since that's an important value in identifying which type of
packet it is.

Unfortunately I currently don't have a laptop with synaptics touchpad to
test this with.

Change-Id: If334392f4eb2a146955f6c8c897f0ab64d79b8d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4425
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: nephele <[email protected]>
2023-01-28 14:57:53 +00:00
PulkoMandy 83e06e62ef ffmpeg: remove use of deprecated fields in tracing
Change-Id: Id4f1e342bae8dd4a12b3f6647d60b238f98324e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6014
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-25 11:58:15 +00:00
PulkoMandy a5bcb6e0e6 ffmpeg: fix incorrect error check
The function returns a positive nonzero value when it works.

Change-Id: I99ee3e2f8f60dff960a07fefc1cf42dc3b3969cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6013
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-25 11:58:15 +00:00
PulkoMandy e35a296ef7 ffmpeg: fix missing initialization of AVFrame
ffmpeg API reference does not allow to allocate AVFrame on the stack,
and especially not without initializing anything in the frame. Calling
av_frame_unref then attempts to free some non-existing data, and
crashes.

The code for video was already using a correctly allocated frame, which
we can reuse here.

Fixes #17415

Probably fixes #16831

Change-Id: I9d6ee7724ab9f22547b0030de12542ef3a650640

fix avframe

Change-Id: I170597ec323ac67be460ccbab9dae5ee3e6e1b71
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6015
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-25 11:58:15 +00:00
PulkoMandy 5500d61686 ffmpeg: fix build with tracing enabled
Change-Id: Ib563d45ea144c957aeb176dbb2c381a00a55b19e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6012
Reviewed-by: Jérôme Duval <[email protected]>
2023-01-21 22:10:21 +00:00
PulkoMandy e9154f59e6 Menu: disable triggers when SetTriggerEnabled(false) is called
Triggers are a way to trigger menu items by ressing one of the letters
in their label. Normally that letter is underlined in the menu, but in
Haiku this is disabled by default and can't be enabled due to the lack
of a Menu preference (the code is there to draw the underline, still).

The trigger for each item is either assigned manually (using SetTrigger)
or automatically by the Interface Kit (picking a reasonable letter from
the label).

Triggers can be completly disabled at the menu level, however, in Haiku
this only disables drawing the underlines, and does not actually
disable the triggers, so items can still be invoked. This does not
match what is said in the Be Book. This commit actually disables the
triggers when SetTriggerEnabled(false) is called, making the keyboard
available for other uses if needed.

Possibly affected apps from a GitHub search on "SetTriggersEnabled":
- BeCJK
- 8dock
- Some of Tracker menus with lots of items, for example X-Ray menus

Change-Id: I1efa675b018fa524953c81e2dc2d456c28d6be8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5971
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-01-02 12:18:15 +00:00
PulkoMandy 90e87426ac ffmpeg: enable Werror and fix all warnings
Warnings fixed include usage of various deprecated functions, structures
and fields of ffmpeg.

Change-Id: I8d6338ad282f214a805b8d746ce22e2f0895fb25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5954
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-12-26 15:16:19 +00:00
PulkoMandy 81f94bfd9e mediaconverter: fix memory leak
If the file has multiple audio or video tracks, only one is converted.
But in this case there would be memory leaks of various objects for the
other (unused) tracks. Fix this for now by allowing only the first track
of each type to be used. Ideally, MediaConverter should allow converting
all tracks or selecting which ones to keep.

Change-Id: I78c0c31648c80c7760dd68b3b4f64537ad2cee88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5744
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-12-26 15:15:43 +00:00
PulkoMandy 2db0fbd87e documentation: add a list of "media" keycodes to keyboard documentation.
Change-Id: Idd0249c2c19cea7a3435b5a73fc48c2027dcb8f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5961
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-12-23 16:55:17 +00:00
PulkoMandy 4562b1727c mime_db: add a sniffing rule for css
Just like the one for HTML, we have to do a bit of guessing since there
is no easy structure. We can extend it with more keyowrds or remove some
if we find some problems with other files.

Tested so far with the Be Book and Haiku user guide CSS files.

Fixes #18144.

Change-Id: If04fba18846d17ba0eb28dd0bd12787f1fe32028
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5948
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Máximo Castañeda <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: nephele <[email protected]>
2022-12-23 01:54:47 +00:00
PulkoMandy 31111d806f googlefs: use libnetservices for HTTP requests
This allows us to do HTTPS more easily and removes a lot of the code.

A file is converted to C++ to allow use of these APIs.

Now Google replies to the query with… a page asking to accept cookies,
and no results at all. They are definitely not cool anymore.

Change-Id: I4bed3b1f8630b324b979d26fbb71c4f05165fbb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5494
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-12-22 18:30:02 +00:00
PulkoMandy d669317867 googlefs: fix tracing, build with userlandfs
It is currently not working because Google has changed its HTML since
this was written.

I plan to switch to using https://html.duckduckgo.com instead, which
would be a lot easier to parse. However, this requires switching to
HTTPS and I don't think doing TLS in the kernel is a sane idea.

So I suggest using userlandfs instead.

Change-Id: Iaf1f27680bbf1cd98806047122cea1a208b35bf0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5493
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-12-22 18:30:02 +00:00
PulkoMandy beff8fa729 ffmpeg: leak when re-allocating ffmpeg context
The _Setup method can be called several times if the parameters are
changed (for example when calling SetQuality). But it always allocated a
new context without freeinthe previous one, resulting in a leak.

Part of #9458, it fixes the largest leak there (10K bytes for each loop
of the provided test) but there are other leaks left as well, some of
which apparently need an update to a newer ffmpeg version removing some
deprecated fields.

Change-Id: Iad119dbda9cff1ce023b602a1978b100a1263f7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5953
Reviewed-by: waddlesplash <[email protected]>
2022-12-22 15:56:25 +00:00
PulkoMandy 9f9688d841 media kit: avoid useless copy of entry_ref
Copying an entry_ref is not cheap since the "name" field needs to be
allocated and copied separately everytime. Here it is not needed at all,
so let's just use a reference instead.

Change-Id: I1e572b69569cbb7437db147b483779245ec5e180
2022-12-21 14:26:22 +01:00
PulkoMandy a443628974 media plugins: replace strcpy with strlcpy
Fixes a memory corruption: the ffmpeg plugin has a LOT of file
extensions, which goes way past the 8 allowed characters and even past
the 88 reserved bytes at the end of the structure. As a result, memory
after the structure is overwritten, resulting in heap corruption and
crashes.

This is immediately detected by using the guarded heap.

As a short term measure, use strlcpy to avoid overwriting memory, but
now the ffmpeg plugin will be unable to provide any useful info. It
would make sense to make media_format_info store a pointer to a string
instead (similar to entry_ref), but this requires more changes and will
create some incompatibility with existing apps if they use the field.

Change-Id: I8d2b567a179e9f7816b72f48aedac4e8534bc044
2022-12-21 14:26:22 +01:00
PulkoMandy 5a7756068c packagefs: do not use auto-generated attributes for root node
The root node does not come from any package, so it shouldn't have the
SYS:PACKAGE_FILE attribute. Remove it from there.

Fixes #12453

Change-Id: Icb695bb90644753d4af1c4215c4ad3c2dd9c5e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5951
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-12-19 18:46:17 +00:00
PulkoMandy 6e8c897e21 Tracker: Always use thumb attr when there is one
... even when the "Generate image thumbnails" setting is off.

This allows applications to generate thumbnails for 'non-media' files.
For example I use this in the ACE Amstrad CPC Emulator, to add a
thumbnail to emulator savestates (snapshots) with a screen capture of
the machine.

Change-Id: I95b0e4c64f5b1ffa779512755f70cfd9c1881661
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5768
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-12-12 10:26:58 +00:00
PulkoMandy 32a71a00aa stdint.h: fix definition of UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C
C99 chapter 7.18.2, Limits of specified-width integer types:

"This expression shall have the same type as would an expression that is
an object of the corresponding type according to the integer promotions."

C99 chapter 6.3.1.1:

"If an int can represent all values of the original type, the value is
converted to an int; otherwise, it is converted to an unsigned int.
These are called the integer promotions."

Therefore, UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C should be signed.

This prevents building WebKit with -Werror.

Change-Id: Ib2a2c15acc2c761cccf8caa016c7ff163e3fdc0d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5806
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-11-08 16:11:40 +00:00
PulkoMandy 4c070183d9 PNG translator: remove B_TRANSLATE on string that isn't user visible
Change-Id: I3c04838729740f86493636913ba30a072e633696
2022-11-05 12:59:04 +01:00
PulkoMandy 4fad6eb32d Tracker: fix thumbnail caching
system_time returns the number of microseconds since booting. This is
not what's needed for the thumbnail generation timestamp attribute, as a
result the attribute was always considered out of date and the stored
attribute would never be used.

Change-Id: I3728077c484f341b765700532d3f986e64f165ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5767
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2022-10-31 17:40:50 +00:00
PulkoMandy d9e730c808 libroot: generate a name for nameless volumes
Generate a name indicating the volume size and filesystem.

Remove code that was doing that or similar things in various
filesystems.

Change-Id: I6b993735e58cdfaf1f19af575e918614c7fe5679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5381
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jessica Hamilton <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2022-10-29 11:31:13 +00:00
PulkoMandy 70bf92576d pci: print PCI info in case of deferred init.
This is normally done just after init, but in the case of deferred init,
there will be nothing to print at that point.

Currently, there is no way to access that info after the system has
booted. listdev should be extended, or the info should be published in
PCI device nodes to view in the Devices app.

Change-Id: Id89377ccf8bb967abae96194e503fffc06477acf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5758
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-10-24 16:37:15 +00:00
PulkoMandy 48776daf36 AboutSystem: restore previous size constraints
The window was changed to be larger and completely fill he screen at
640x480, this does not look right. Restore the previous 500x300 size
constraint.

Fixes #17952.

Change-Id: I7d60253b7304ede788e064adf2bad20168393a33
2022-10-16 10:00:38 +02:00
PulkoMandy e3d5904751 Disk Device Manager: generate a name for nameless volumes
This will give the same result as fs_stat_dev, so the filesystems will
have the same name everywhere.

Change-Id: Ic684142efaeb2c16b393f3f3e5c9c3010a054b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5636
Reviewed-by: Jérôme Duval <[email protected]>
2022-09-21 16:14:32 +00:00
PulkoMandy 49a00a128a userlandfs: implement get_fs_info using ioctl
This avoids introducing an entirely custom hook in FUSE.
It uses the ioctl hook in an unconventional way (calling it with no
valid fuse_file_info) but this can be fixed if a filesystem requires it
(by opening a file handle on /, doing the ioctl, then closing again).

An updated version of fusesmb-haiku is available and confirmed working:
https://github.com/haikuarchives/fusesmb-haiku

Change-Id: If1268113874363fa035e5340be75e9f5198216d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5199
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-09-13 18:51:12 +00:00
PulkoMandy d469ab6d6c libroot: Remove unused files
Not referenced in any Jamfile, does not compile, untouched since
2003 except for a few coding style and cppcheck fixes. The functionality
is implemented elsewhere in the disk device manager and userland
filesystem add-ons for DriveSetup.

Change-Id: I5ebe125931c8d4410c2d335f9d6c0e32008f038b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5637
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-09-13 18:43:55 +00:00
PulkoMandy 134fa6111f vesa BIOS patching: try to use modes reported as invalid by the BIOS
It seems some versions of Intel BIOS report the mode as invalid after
patching (probably there is not enough patching), but setting the mode
will actually work. So, if we detect no mode with our patches, and we
detect a broken mode, attempt to use that.

May fix #17929

Change-Id: Icb9259a79b5a49d18946b682af89dda16176e854
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5628
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-09-10 17:49:42 +00:00
PulkoMandy 8d1a3621dc usb_serial: fix possible NULL pointer dereference
There can apparently be interfaces without descriptors.

Should fix #17892

Change-Id: Ibcbab0f60ecbd2005640c647bf7540d17d0f5375
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5598
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-09-09 21:00:34 +00:00
PulkoMandy 9fec431f60 vesa: disable the livepatching code by default
It can be enabled by putting "bios_patching true" in the VESA settings
file.

This patching does not work yet on modern hardware, but the detection
code to decide if we should try patching still says it found the
modetables. In this situation we can crash the BIOS or other weird
things can happen.

To avoid these problems, and because VESA is supposed to be the failsafe
option, disable this code by default, and let people who want to
experiment with it first enable it in the settings file.

Should fix #17633.

Change-Id: I4d89ff6dfeb7d02e39cd3da7b22ddd5411b10822
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5499
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-08-11 15:00:41 +00:00
PulkoMandy 264f77da03 docs/develop/release: add the info from the ReleaseCookbook Trac wiki page
The corresponding Trac wiki page can be deleted once this is merged.

Some of this information is a little out of date, help is welcome on
updating it.

Change-Id: I9157b140bcb5de3fed3c95d994745b5a1cbee1f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5477
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-07-24 14:11:55 +00:00
PulkoMandy 3c1a967efb docs/develop: add some documentation for userlandfs and FUSE
Change-Id: Ic8ee1bb5b3ca3e926251db766a120c48b96af45c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5488
Reviewed-by: waddlesplash <[email protected]>
2022-07-20 20:34:28 +00:00
PulkoMandy f0ee02b25e userlandfs_fuse_lowlevel: fix opening directories in Tracker
- It is possible to call open() on a directory, but FUSE lowlevel
  filesystems don't implement that and expect it to be re-routed to the
  opendir call. BRoster uses this to read the dir/file attributes to
  identify it, so it could not identify directories properly.
- In ReadDir, make sure to not return more entries than asked, as this
  confuses the userlandfs protocol communication (the kernel does not
  acknowledge the readdir reply, and then the server hits an assert when
  receiving the next request instead of the ack).

Change-Id: I9c4e9a3f0fc6e9879d4cfbc0d5402a4733d2218a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5482
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-07-19 16:06:29 +00:00
PulkoMandy 03f7a1848f userlandfs-fuse: improve fuse_ll_readdir
The previous implementation needed a temporary buffer to store entries
and then sent them to the actual readdir buffer. This is now fixed, the
actual buffer is filled directly.

Also fixes problems with reading the same directory multiple times, and
reading large directories.

Change-Id: I8dc9677ee676144547d17f313a7f2d91fd2bca05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5480
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-07-19 16:06:29 +00:00
PulkoMandy 0604d554e8 userlandfs: compatibility with FUSE 2.9 and FUSE lowlevel API
- Import latest version of files from FUSE 2.9.9 (our last
  synchronization was with 2.7.4)
- Adjust fuse pkgconfig file to use the POSIX error mapper
  automatically, since that's required for all FUSE software
- Implement the lowlevel API in addition to the highlevel one. The
  lowlevel API uses inode numbers to identify files, rather than paths,
  making it a better fit to the userlandfs architecture.

The FUSE 2.x branch is not maintained anymore by FUSE developers,
however, pretty much no one migrated to FUSE 3.x. So it is more
interesting to implement, rather than 3.x.

Confirmed still working with sshfs and curlftpfs.

Example use:

I tested this with github.com/whoozle/android-file-transfer-linux

- Build the fuse library and copy it to ~/config/non-packaged/add-ons/userlandfs/
- Start the server: /system/servers/userlandfs_server aft-mtp-mount
- Connect your Android phone and put it in USB file transfer mode
- Mount the device: mount -t userlandfs -p 'aft-mtp-mount /boot/home/MyPhone -d -o use_ino' ~/MyPhone
- You can now access your phone data

Change-Id: Ic3efda7ffbc33737e6f4958428fb3ec9939ef105
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5198
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-07-19 16:06:29 +00:00
PulkoMandy abc159e3fd docs/develop: explain vendor branches for gcc and buildtools
Change-Id: I9bb3b4efd2d02013da1ec6656adb49cd7d050e86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5476
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-07-17 07:37:53 +00:00
PulkoMandy c8641d3a23 ramfs: enable -Werror
Change-Id: I02600442bb2cb28182e6fd2da4eb849621c1b877
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5439
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-07-15 14:54:27 +00:00
PulkoMandy 6325257204 nfs: enable -Werror
Change-Id: I529f0e2b363a36984d8779535a2da51a882a988c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5438
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-07-15 14:54:27 +00:00
PulkoMandy 5d1501ed1b reiserfs: enable -Werror
Change-Id: I2f431efee7b5d75c33bf6355e2a9e61ed233465c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5437
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-07-15 10:59:58 +00:00
PulkoMandy fb1d7157d2 ps2: do not publish keyboard device until mouse probing is complete
For mouse probing to work reliably, it's important that we don't
simultaneously send commands to the keyboard as well. This normally
happens because we don't publish the keyboard device until the probing
is complete.

However, if the mouse probing results in the keyboard sending some
replies, this can be detected as a "hot plugin" and leads to publishing
the keyboard device a lot earlier.

To prevent this, disable the "hot plugin" feature until we are done
initializing. This way the keyboard device is published only after we
are done with the probing.

Fixes #17806

Change-Id: Ia6a2b031550c845fa305df5b5f4d513d5c7931d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5388
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2022-07-11 16:09:23 +00:00
PulkoMandy 34596ea53f FAT: enable -Werror
Change-Id: I4364d1325d4822d7094e985991c97639038522b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5436
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-07-11 16:05:17 +00:00
PulkoMandy e866d6e941 ps2: disable keyboard during multiplexing probing
My machine does not have an AUX/Mouse port at all. As a result, the
commands all get sent to the keyboard, which confuses the keyboard and
it eventually resets. This is generally harmless, but it ends up
resetting the keyboard, which cancels the effect of the commands to set
the repeat rate and delay during boot.

By disabling the keyboard during this step, we can avoid interference
with it.

Change-Id: Ic0513972a31e030a15577477c3d3fe32d4ce9bd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5387
Reviewed-by: waddlesplash <[email protected]>
2022-06-21 15:52:53 +00:00
PulkoMandy a3d84aba73 ps2: improve tracing
Change-Id: I3991e1974ac4af2ba00d692284bfcf00e5b4cc84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5386
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-06-20 02:48:03 +00:00
PulkoMandy d2837c97b7 Interface kit: allow get_key_repeat_{rate,delay} to fail
These functions should return an error if the input_server is not
running. They still give the default value in this case, but they now
return an error code.

Change-Id: I706cded7c780d913d4f36164596b2b7794db6f22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5385
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-06-20 02:48:03 +00:00
PulkoMandy 81f9c26a70 Input server: remove some dead code
This does nothing, keep the TODO but remove the useless code.

Change-Id: I14611289e1153e406ff7dec93729bceedef7d9af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5384
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-06-20 02:48:03 +00:00
PulkoMandy 3f18d506fa Input preferences: remove dead code
The old keyboard preferences used to save its window position in the
keyboard_settings file. The new Input preferences does not, but part of
the code had not been removed yet so it would still open the file (and
then do nothing with it)

Change-Id: Ic5e1d6bd6a8452bd779dc73872148d5c32ab12e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5383
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-06-20 02:48:03 +00:00
PulkoMandy ea56f5e0be kernel: replace Spleen font with an enlarged version of the original KDL font
Recently we introduced Spleen as a larger font for KDL for high
resolution displays. However, it looks quite different from our original
font. I designed an enlarged version of our original font (designed by
Brian J. Swetland and also found in NewOS, LK and Fuchsia) to use
instead.

Change-Id: I10872e407d45b906f8b6c7ba44b2f993dcd19bff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5382
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-06-19 08:38:46 +00:00
PulkoMandy ed666fb497 usb_rndis: fix 32bit build 2022-06-11 21:33:14 +02:00
PulkoMandy fb02142782 usb_rndis: fix handling of multiple packets in one USB transaction
I got my pointer math wrong because some things in RNDIS use uint32 as
the base, but some things are in bytes. Most of the time this would result
in an offset past the end of the USB buffer, so it would just lead to
ignoring all but the first packet. But if the first packet was small enough,
it would point somewhere still in the buffer, and we would read the wrong
data.

Fixes #17775

Change-Id: I32ec0081336b1f772d4dc3099a0ac2c691aa12f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5377
Reviewed-by: Adrien Destugues <[email protected]>
2022-06-11 19:03:48 +00:00
PulkoMandy 4dda1c0369 usb_rndis: use the "data offset" field instead of hardcoding it
Not sure if other phones could use another value, but it's better to
follow the spec. Also add some bounds checks with traces for now if we
see something strange.

Change-Id: I5c7bc37c4730e6a08bf0bf10fed975bf2012102e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5376
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-06-11 19:03:48 +00:00
PulkoMandy d13068c148 iaxwifi200: add to regular image 2022-06-09 21:26:47 +02:00
PulkoMandy d5af5c5521 iaxwifi200: disable background scans for now
It crashes the firmware after 40 scans. The issue has been reported to
OpenBSD, until then we can leave this disabled. The consequence is that
the wifi network list will not refresh while already connected to a
network. But at least the connection remains online.
2022-06-09 21:26:47 +02:00
PulkoMandy 54036160f5 EFI: Fix some mis-located files
These were output to the root of the generated directory. There should
be nothing there except the final Haiku image.

Fixes #16750.

Change-Id: I132de939c70197c3f7cc306ac371965a0b7f38b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5346
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-05-29 18:54:30 +00:00
PulkoMandy 6ee62ca6c6 Installer: make sure there is space for 5 lines of text in the status view
Fixes #17095

Change-Id: I53752d6ee60a913f230dc44eddac7f872db6c184
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5314
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-05-17 11:29:20 +00:00
PulkoMandy 3ad6b5ecba usb_rndis: accept incoming USB transfers up to 0x4000 size
As required by the spec. Then split them into multiple ethernet frames
as needed.

Fixes #17738.

Change-Id: I71ebff0fe1fc5c8a342d6d06b26eda8e87115e04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5312
Reviewed-by: waddlesplash <[email protected]>
2022-05-14 15:48:51 +00:00
PulkoMandy 580f28da6d kernel debug: rewrite dump_block to use a single dprintf call
In the syslog, each dprintf call is prefixed with a KERN: prefix,
rendering the dump unreadable. Bufferize things to print each line with
a single call.

Change-Id: I27c1b1f74434fbc6e554acb0a716f0700821bc8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5305
Reviewed-by: Adrien Destugues <[email protected]>
2022-05-14 09:24:00 +00:00
PulkoMandy a5c0d1a80e Enable Werror on some network drivers
Change-Id: Iff3a167da4c7a639f229556c501c2b71133fd8dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5308
Reviewed-by: Adrien Destugues <[email protected]>
2022-05-14 09:24:00 +00:00
PulkoMandy b248954676 usb_rndis: new driver for Android phones USB connection sharing
Based on usb_ecm and other native USB ethernet drivers which share a
similar structure.

References used to implement this:
- FreeBSD urndis driver
- [MS-RNDIS].pdf v20140501
- Microsoft list of RNDIS OIDs

TODO:
- Better handling of "request id" field to make sure the replies we get
  match up with the requests we sent, and it could allow to have
  multiple requests in flight. However, the FreeBSD driver doesn't
  bother to implement this, if you only ever have one request in flight
  and wait for a reply before sending another, this isn't really needed.
- Endian safety, this code will only work on little endian systems for
  now. Several structures sent/received to/from the device must be little
  endian, so on big endian platforms a lot of byteswapping will be needed,
  or the code rewritten to use some smarter object and not a plain
  struct for all of these.
- Investigate if it's possible to send/receive multiple ethernet frames
  in a single USB transaction for better performance. Our driver
  structure doesn't really allow for it unless the driver implements
  some buffering on its own.

Change-Id: I2c6dacf0c1aeb6c7c1c112e9b16a63e586ea979a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5281
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-05-13 18:00:02 +00:00
PulkoMandy 981d0862ed net_buffer: fix build with tracing enabled
Change-Id: Ifc26defe30946f928bbff360ea70f33eb1352745
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5304
Reviewed-by: waddlesplash <[email protected]>
2022-05-11 16:43:11 +00:00
Adrien Destugues cda13c638d ARM: add support for Allwinner A10 interrupt controller
Untested so far.

Change-Id: I3453115599cf2112858a194173212401ae4ac1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5104
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: David Karoly <[email protected]>
Reviewed-by: Alex von Gluck IV <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-04-25 20:50:04 +00:00
Adrien Destugues 8b858379e2 sdhci: do the wait for interrupts the straightforward way again
In a previous commit I flipped this around because the command interrupt
doesn't always trigger on Ricoh controllers. However, this leads to
command execution continuing before the interrupt actually triggers on
some other controllers.

Might solve #17031 but it could also break things on other hardware.

Change-Id: I96cba90358f0b04ef1ac319aead898c0f4155114
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4985
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
2022-04-23 14:31:03 +00:00
PulkoMandy d0c94afe0c docs/develop: fix incorrect title level 2022-04-23 13:59:49 +02:00
PulkoMandy 1da90c98f2 Enable and fix WError in add-ons/kernel/busses/
Change-Id: I94e1580444faffdfc362dc8f59c39152d67a7076
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5235
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-04-22 20:28:47 +00:00
PulkoMandy 364d52c513 userlandfs: add a pkg-config file for the fuse compatibility
This makes it a little simpler to build FUSE software with userlandfs.

Change-Id: I2a7e5494b7dc8db01e4c150de3fcdb99506ce119
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5197
Reviewed-by: Adrien Destugues <[email protected]>
2022-04-22 09:43:53 +00:00
PulkoMandy 581013b8e3 listusb: decode USB-CDC descriptors
Change-Id: I36ea15fee28b27332a8092a98a302c22b41ae060
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5225
Reviewed-by: Fredrik Holmqvist <[email protected]>
2022-04-21 18:29:41 +00:00
PulkoMandy b5ab38ecf0 Add some docs about our compilers and patches done to them.
Change-Id: I60e0960499aec789ae6240eec949249adb2e35ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5224
Reviewed-by: Fredrik Holmqvist <[email protected]>
2022-04-21 17:53:48 +00:00
PulkoMandy b24e59ccbb intel_extreme: fix backlight control on generations 9 and 10
I changed the way we decide which registers to use in a previous
patch review but I changed it in only one of two places. As a result
we were using the old code with the new registers, resulting in invalid
backlight settings.

Should fix #17692

Change-Id: I4e977d5700d3a002986beafff5ca511673c86540
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5185
Reviewed-by: Richard Zak <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-04-08 15:05:26 +00:00
PulkoMandy 890aa41134 intel_extreme: improve brightness setting support
- Newer devices use a different layout for the backlight PWM registers
- Get the min brightness level from the BDB

Change-Id: I99745a022dd38733a4c2386f91c4c57016dd2acd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5162
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-04-03 08:39:47 +00:00
Adrien Destugues 83cb10bcbc stack&tile: don't allow stacking a window onto itself
Change-Id: Iefd4a49b5b4caf2c3cd478a77fe4673dcac40427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5056
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-04-01 09:39:23 +00:00
PulkoMandy 38a9416057 intel_extreme: use proper generation for Tiger Lake devices
The CPU in these is generation 11, but the graphics unit is actually
generation 12. Thanks to KapiX for pointing this out!
2022-03-30 21:16:17 +02:00
PulkoMandy d039f12b31 intel_extreme: add PCI ID for Tiger Lake
Internal display on my laptop isn't detected yet so modesetting doesn't
work, but at least I get vblank interrupts and backlight control.

Fixes #17569

Change-Id: I86dd56bc3fc2c288688242e34d9220028036ab74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5156
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-03-29 07:08:01 +00:00
PulkoMandy fa288877c5 acpi_battery: accept revision 1 struct with only 20 items
The revision 1 structure should have 21 items, but on my laptop, it doesn't.
That's fine, we can parse it as if it was a revision 0 structure. This way I
can see the battery status on my machine.

Change-Id: I743173e05318d686049454983e378a08c0a1980a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5155
Reviewed-by: waddlesplash <[email protected]>
2022-03-26 20:48:49 +00:00
PulkoMandy 7f5e1044ee pci_info: print 64bit BARs in a more readable way
Change-Id: Id3f42a6c93290ddb1825208bd11ca2c40b073914
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5154
Reviewed-by: waddlesplash <[email protected]>
2022-03-26 20:48:49 +00:00
Adrien Destugues f0a8e7e247 Tracker: don't call debugger if a file has an invalid resource
This is a bit excessive: a file with a B_MINI_ICON resource of the wrong
size should not result in crashing Tracker, the resource should simply
be ignored.

Fixes #17668.

Change-Id: I55a210eb829e568d254d8ab569720145c0ea5a09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5115
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2022-03-20 12:28:15 +00:00
Adrien Destugues 2d80f9e236 EFI: add support for dw-apb-uart used on Allwinner A10 SoC
Yet another 16550 clone under a different name. Why does device-tree
have a "compatible" setting if everyone puts a different name for the
same thing?

Change-Id: Ia889a527a36739df747ba48d4606c09764703607
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5103
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-03-15 18:26:18 +00:00
Adrien Destugues ef41059432 EFI: get address-cells and size-cells from the device tree
They were hardcoded to 2, which is not correct on all devices. As a
result, getting addresses and sizes on pure 32bit devices would fail.

Change-Id: Icf542c9e8d6b7136219014fe08dd601387de4762
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5102
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2022-03-15 18:26:18 +00:00
Adrien Destugues 7b7cc2944b Allwinner A10 docs: fix broken link
Change-Id: I40d3bebd2f70def0a4074f2bec74c574f44d46cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5101
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
2022-03-14 21:35:41 +00:00
Adrien Destugues 015b40866c vesa: live mode patching, nvidia version.
Some improvements to allow setting 8, 15, 16 and 32bit modes, and detect
the correct mode number after patching the BIOS automatically, instead
of hardcoding it.

Also move the patching code to a separate file.

Fixes #10570.

Change-Id: I920f448b59ad7373cb8595d92ce3fa52324be67e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4629
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-03-02 22:39:02 +00:00
Adrien Destugues 9515cd8c6f vesa: implement live patching for ATI/AMD cards
This uses atombios headers to find where in the BIOS the video mode
tables is located. Then, we can replace entries in the table (in a RAM
copy of the BIOS, of course) and inject any video mode we need. To make
the table easy to find, the Atombios headers from the radeon_hd are
reused, but no atombios code execution takes place here.

Change-Id: If1981b1574822d4ce1e072dd6437a727192ce7cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4628
Reviewed-by: waddlesplash <[email protected]>
2022-03-02 22:39:02 +00:00
Adrien Destugues 6a175a5ddc vesa: report BIOS manufacturer (visible in screen preferences)
Get the OEM string from the VESA info block (and also get the memory
size from there while we are at it). If the string is empty, use the
BIOS type (identified in other ways) to still report something.

Change-Id: I8cbd75d19f624a43db05e82d1e1b2a536cc418b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4625
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-03-02 22:39:02 +00:00
Adrien Destugues 1005a27603 vesa: live BIOS patching for Intel video devices
The VESA standard does not define any way for software to set a custom
video mode, which means normally we would be constrained to whichever
modes the video card manufacturer decided to provide. However, since we
run the BIOS in an emulated environment, it is possible (and even quite
easy) to patch it and inject any video mode we want, provided we know
the format to use and where to put the info in.

This approach was used in the NewOS VESA driver, as well as in
915resolution (a tool that predates the availability of native drivers
for Linux for Intel videocards). Later on it was also used in Chameleon
and Clover, bootloaders that are used for hackintoshes (running MacOS on
unsupported hardware).

This commit implements full support for Intel cards only, AMD and NVidia
will be added later (but there is preliminary code to detect them)

Change-Id: I2c528ba18b3863f486da694860a10761efcbfb3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4624
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-03-02 22:39:02 +00:00
Adrien Destugues 455468cbfd sdhci_pci: remove (incomplete) use of MSI
MSI was never implemented in this driver and only used for a log during
initialization. Remove it for now.

This makes it easier to use the driver on non-x86 systems where there is
no MSI.

Change-Id: I39ccbb82b78ea98c0d045ef07ee9bb28c775e292
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4847
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2022-03-02 09:13:33 +00:00
Adrien Destugues c8edc9b368 LaunchBox: Revert "Use Shine and Shadow color instead of tinting for Haiku"
This reverts commit d493aae3c4.

The default shine and shadow color are pure black and white. They are
not meant to be used directly, but mixed with the background color for
more subtle results.

The previous code using tint_color was also just fine.

Fixes #17577.
2022-02-13 09:41:55 +01:00
Adrien Destugues 071a83af4f fix macOS hosted build after hrev55802
The stat structure fields are not standardized, so we can't use an
hardcoded field name. The code in all other places was already adjusted
with a macro to handle the access, but hrev55802 introduced a new place
where we need to read the access and modification times. Use the macro
there as well.

Thanks to anuragpd4 for reporting the problem!
2022-01-29 15:57:56 +01:00
Adrien Destugues abef198c1a Tracker: fix logic to use custom icons.
Regression caused by refactorings in hrev55348.

The logic for deciding when to use a built-in tracker icon was changed
incorrectly to ignore attributes on directories, trash, etc (anything
but executable applications). So the built-in icon was always used.

This commit restores the previous logic.

Shoud fix #17320 and #17371

Change-Id: I51ba22db59a8b6dd2bd1121b56c753ed47224c57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4841
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-12-31 17:41:28 +00:00
Adrien Destugues 0f2661cc08 Partially revert "ActivityMonitor: remove double buffering and custom background drawing"
This partially reverts commit cc0226fad0.

This commit caused high CPU usage in app_server. The double buffering in
ActivityMonitor is not to avoid flickering, it allows to draw just a few
pixels of the the curves at each update, and reuse most of the bitmap
from the previous run.

Removing this means all the curves are fully redrawn at each update,
resulting in higher CPU usage (one core at 30% on my machine with 5
different graphs).

Keep the part of the changes removing code for custom background
drawing. B_TRANSPARENT_VIEW flag can be used instead.

Change-Id: Ie3438ca634c934f3e96ce5f7ad71ce7b3a435013
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4833
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2021-12-29 17:25:56 +00:00
Adrien Destugues 05ce14d174 app_server: fix B_OP_COPY
Skip pixels with a coverage of 0. Since the source alpha channel is
ignored, we would otherwise cover pixels that shouldn't be.

Fixes #17449.

Change-Id: I373672a765b99efce5dceed4ffa81741f78b9d9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4836
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2021-12-29 16:45:53 +00:00
Adrien Destugues 58af5dce79 ActivityMonitor: add CPU speed graph
The info is now available in cpu_info, we should do something with it.

Change-Id: Iac7bd697783d63b5c84c7da33770b3c9a7d417b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4832
Reviewed-by: Kacper Kasper <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-12-28 22:38:34 +00:00
Adrien Destugues 5fcc7f71b5 ethernet: do not log everytime there is a media change.
This code was written with wired ethernet in mind, where changes are
rare. However, on wifi the "media" changes all the time (switching
between different connection speeds). So, only log linkup and linkdown.
The other events are not that important.

Change-Id: Iaafb74ceb05a59dedf94184eee23a4e81fa5e983
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4827
Reviewed-by: waddlesplash <[email protected]>
2021-12-21 18:51:25 +00:00