Commit Graph

49359 Commits

Author SHA1 Message Date
JackBurton79
f049e59f50 Try to use the ffmpeg api more correctly:
call avcodec_receive_packet() in a loop, drain and flush the internal buffers.
Introduced private method to improve code readability (hopefully).
2018-08-09 09:12:19 +02:00
Augustin Cavalier
53a5dca9d7 packagefs: Fixup previous commit. 2018-08-08 23:57:11 -04:00
Augustin Cavalier
779d9140a4 radeon_hd: The MMIO area should be user-cloneable. 2018-08-08 23:51:36 -04:00
Augustin Cavalier
d8ad2d6f33 packagefs: Rename operator< to HasPrecendenceOver().
As suggested by weinhold on the mailing list.
2018-08-08 23:48:37 -04:00
Augustin Cavalier
ce0ef8c870 USB: Remove BeOSCompatibility.h and associated cruft. 2018-08-08 23:48:37 -04:00
Adrien Destugues
1a3a613584 DiskProbe: allow full and half fixed fonts. 2018-08-08 20:01:21 +02:00
Adrien Destugues
ac2ed5cc13 Terminal: use BFont::IsFullAndHalfFixed. 2018-08-08 19:57:17 +02:00
Augustin Cavalier
cd7bd43778 Fix missing B_USER_CLONABLE_AREA in intel_extreme
Fixes #14333
2018-08-08 19:49:02 +02:00
Philippe Houdoin
739e2ceffc text_search: avoid flooding messages while searching.
* This was making unresponsive the target window, making impossible
  to cancel it at all. Now the current filename is reported at 20Hz,
  well enough for good visual search progress feedback. Fixed #14175.

Signed-off-by: Kacper Kasper <kacperkasper@gmail.com>

Style fixes:
* Commit message formatting.
* Removed commented code and unnecessary whitespace.
2018-08-08 19:42:37 +02:00
Alexander von Gluck IV
3718fb861d efi: Drop x86_64 assumptions.
Change-Id: I3d806f43ef951013369fd0bf906eca5977e8d34c
2018-08-08 10:18:06 -05:00
Alexander von Gluck IV
572030aca6 kernel/efi: Add efi platform
Change-Id: Ie3cc4b4652d56983147221db9fbee6b72f177b1b
2018-08-08 09:48:34 -05:00
stefano
740114b89c Allocate the packet via ffmpeg.
Seems we aren't allowed anymore to handle it ourselves.
2018-08-08 12:11:53 +02:00
Rene Gollent
57893202f1 Debugger: Fix #14321.
DIESubprogram:
- Adjust to inherit from DIENamespace, as gcc can and will use it as a
  container in some circumstances.

DIEClassBaseType:
- Add accessor for member functions.

DwarfImageDebugInfo:
- Adjust recursive walking for types to take into account any DIENamespace,
  not just DW_TAG_namespace specifically.
- Factor out adding function to list into a helper.
- When retrieving the list of functions, perform a similar recursive walk as is
  done when building the types table, as some subprograms are apparently not
  always added to the root compilation unit entry. Curiously, this behavior
  seems to be relatively specific to a struct/class type declared inside a
  function in GCC's case, but based on the DWARF spec, there does not appear to
  be any specific restriction as far as where these can be nested, so be a bit
  more paranoid to ensure we don't encounter similar cases in the future.
2018-08-07 22:28:04 -04:00
Adrien Destugues
8d1f13817f libsolv: #define _GNU_SOURCE from command line
On Haiku host, we need _GNU_SOURCE defined when stdio.h is included
to use fopencookie. We did that in libsolv sources, but we now include
stdio from BeOSBuildCompatibility.h which is included from the command
line. So set _GNU_SOURCE from command line as well.
2018-08-07 20:50:56 +02:00
Adrien Destugues
d9949ac911 Initial work on Apple Stylewriter printer driver. 2018-08-07 19:30:16 +02:00
JackBurton79
c85dd27c9e AVCodecEncoder: Use new API
Change-Id: I5b985cebf241e67f901e93a5a4bb61a67a659cdf
2018-08-07 18:40:15 +02:00
Augustin Cavalier
247f2fb691 packagefs: Rename isNewest to overridesHead.
As pointed out by Adrien. Thanks for the review!

Also fixed missing dereference operators.
2018-08-06 23:46:24 -04:00
Augustin Cavalier
023a547dc6 vm: Enable B_USER_CLONEABLE_AREA protection.
Spotted while reading through the VM code while thinking about how to
implement vfork().

When axeld disabled this in 2005 (!), Haiku's kernel was still young,
BeOS drivers were still "a thing," and there was no distinction in this
function from being called by the kernel / not by the kernel.

Now, it's 2018, we manage all drivers ourselves, have SMAP enabled by
default when available, and as axeld recently noted on the mailing lists,
"there's not much reason we still use GCC2 for the kernel anyway." So we
probably don't care about any BeOS drivers that may be broken by this
(are there any still around?)

Besides the usual fixes to get this 13-year-old chunk to work again, there
are two functional changes:
  1) Allow the kernel to clone whatever it likes into the user's address space.
     It seems that this is often done legitimately (e.g. team creation), and
     so attempting to distinguish those cases seems more work than it may be
     worth right now.

     The disadvantage is that drivers without proper checks may be "tricked"
     into cloning areas they shouldn't; but I'm guessing if that's the case,
     then something else is probably broken and the driver should be fixed.
     It seems the reverse case (cloning a userland area into the kernel)
     is much more common (in fact, it looks like all 4 of the 4 places
     where clone_area is used in kernel-space outside the kernel itself
     are doing this.)

 2) At KDEBUG_LEVEL 2 and higher, throw a panic when attempting to clone
    an area that does not have the protection flag set. This should make
    finding any bugs exposed by this change much easier than "hardware doesn't
    work" / "black screen on boot" / etc., as well as any potential future
    bugs introduced in the process of driver development.
2018-08-06 23:27:50 -04:00
Alexander von Gluck IV
91bc3a279a kernel/ppc: Fix PowerPC build after fdt changes
Change-Id: Ieccec192c9d257368f8a9b5c52d01ed3c1c66d23
2018-08-06 19:55:48 -05:00
David Murphy
bbf16bc67a HaikuDepot: Fix featured package icon drawing transparency
Change-Id: I4ed26754ef5c0bfb0638de1703ece7d84fadf12a
Reviewed-on: https://review.haiku-os.org/443
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2018-08-06 23:41:06 +00:00
Kacper Kasper
f26398d462 kernel: vm: remove panic
* That's embarrassing.
2018-08-06 23:09:05 +02:00
Kacper Kasper
7cea6679a8 kernel: vm: fix off-by-one errors in get_mount_point
* Fix for 03df8bfcf2.
* Fix misleading indentation.
* Fixes #14225.
2018-08-06 23:07:27 +02:00
Adrien Destugues
3f45e1e6ef Do not play/pause files nedlessly.
The Controller would always pause and resume playing, even if it found
out there was no position or volume to restore. Since pausing on http
streams appears to be broken, this is not a good idea. Just check if we
have something to restore, and leave the function if not.

Fixes #14326
2018-08-06 20:15:23 +02:00
Jérôme Duval
c90a0ee947 posix_spawn(): dup2() again this time on file_action_dup2.
* fixes #14322.
2018-08-06 19:13:32 +02:00
Alexander von Gluck IV
5d0fd0e422 fdt: Major over-haul of fdt
* Consolidate all fdt code into fdt bus_manager
* Build boot and kernel static libraries

Change-Id: I2a69cd7e1f1276999a80734ff12918fd49b599e5
Reviewed-on: https://review.haiku-os.org/440
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-06 15:46:49 +00:00
Alexander von Gluck IV
c3f9610748 arm/mmu: First iteration at mapping peripherals from FDT
* This fixes booting Haiku on Raspberry Pi and qemu (-M raspi2)
* Makes several assumptions which need corrected.
  /axi is broadcom only
  size is fixed
* The final solution will be "probing" each simple-bus device
  from the fdt. A lot of fdt support code needs written though
  for "finding" compatible devices and determining the full size
  of the devices in memory.

Change-Id: Ifd5fbab7490c8456247115f5aada618909f1bb9e
2018-08-06 08:57:15 -05:00
Augustin Cavalier
daad9a3c1c kernel: Revert MMC bus changes to device_manager.
This broke booting on most (all?) systems.
2018-08-05 21:56:54 -04:00
Murai Takashi
8d86b84d18 Accelerants: Fix -Wformat-overflow
* Use strlcpy() and strlcat() instead of sprintf()
  to suppress -Wformat-overflow pointed by gcc8.
* Add <string.h> to mga_std.h for strlcpy() and strlcat().

Change-Id: Ib038283fd213c9e0ac9f19482402b55d2e3f204a
Reviewed-on: https://review.haiku-os.org/429
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-06 00:13:12 +00:00
Augustin Cavalier
5301f108ef packagefs: Directories with more attributes take precedence over ones with less.
This still preserves the behavior that system packages take precedence over
non-system packages.

Fixes #10071 (at last.)
2018-08-05 18:26:42 -04:00
Augustin Cavalier
abf0c2878a packagefs: system_packages take precedence over non-system packages.
Affects *all* nodes, i.e., both directories and files. It is still possible
to override these, but it must be done in another system_package, not just by
mounting a package with newer datestamps on the conflicting files.

This is the pure version of axeld's proposal 2(d) from #10071. However,
as the haiku_secondary packages contain application mime_db entires and
are also 'system_package's, it does not fully solve that ticket.
2018-08-05 18:26:41 -04:00
Augustin Cavalier
0779294800 Package Kit: Fix logic reversal in PackageInfoStringBuilder.
This function is used when serializing a BPackageInfo object, which is not
done very often, and flags are used even less often. But both of these things
are done for the system packages, as they have the "system_package" flag
set, and are processed by "update_package_requires", and so this meant
that the "system_package" flag was turned into the "approve_license" flag.
2018-08-05 18:26:41 -04:00
Augustin Cavalier
5753ed5544 packagefs: Move PackageNode comparison into an operator<.
This commit does not amount to any functional change: we still compare
purely by modification date alone. But it does de-duplify the code somewhat,
and makes it possible to easily implement changes to the comparison.
2018-08-05 18:26:41 -04:00
krish_iyer
25b6a6f19b SDHCI MMC Driver
1. SDHCI PCI Bus: Discovering SDHC device from the PCI bus
	and registers a child node(MMC bus) to which slots
	are attached. SDHC registers are mapped by MMUIO,
	they are binded in a structure(struct* registers).
	A pin based interrupt handler is also installed,
	which triggers the handler function and interrupts
	are being taken care of. Added API's to set-up and
	the clock for SD/MMC card, change frequency and
	reset the registers.

2. Device Manager: Currently, busses subdir lists are har-
	dcoded and in order to load the driver. We hard
	coded the bus dir under PCI devices.

3. MMC Disk Driver: In order to register the slots under
	/dev/disk/mmc and hence data transfer and other
	operations can be done.

4. MMC Bus Manager: Setted up a bus manager to create an object
	to do a particular for eg certain data transfer and
	get freed until another operation is requested.

Change-Id: I369354da6b79adc6b6dfb08fe160334af1392a34
Reviewed-on: https://review.haiku-os.org/318
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-05 20:56:54 +00:00
Barrett17
42cc463169 ffmpeg: Fix typo and copyright notice 2018-08-05 14:29:16 +02:00
Barrett17
201707aee8 AVCodecEncoder: Skip frames
* Fix garbage put into videos while encoding.
* Testing welcome.
* Various fixes are still waiting to be merged into Haiku.
* Fixes sponsored by the V\OS project.
2018-08-05 13:26:33 +02:00
Barrett17
5e2290b083 AVFormatWriter: Set packet stream index to current 2018-08-05 13:23:45 +02:00
Barrett17
bbe2746941 AVFormatWriter: Fix debug build 2018-08-05 11:53:43 +02:00
Barrett17
e93fce62f2 AVFormatWriter: Correctly set DTS
* Fixes timestamp warning from ffmpeg.
* Fixes #13407 AFAICT. But please test.
2018-08-05 11:50:03 +02:00
Barrett17
a72bbd5bd2 AVFormatWriter: Cleanup GET_CONTEXT_DEFAULTS macro
* av_get_context_default(1,2,3) are deprecated. The functions are supposed
to "reset" a codec context to a clean state so that it can be opened again.
It was used to allow using AVStream.codec as a decoding context
That behaviour is now deprecated, so that's why the function is too.
* hint: The code is probably still doing something bad in that regard.
* Unfortunately the macro removal did end up in the codecparam diff,
but was originally intended to be a commit alone I can't rewrite history
unfortunately, at least an explanation is given here. In any case the
code wasn't used so no functional change, this is mostly educated cleanup.
2018-08-05 11:31:40 +02:00
Barrett17
b5d0ce85f4 AVCodecEncoder/AVFormatReader: Remove kNoPTSValue hack 2018-08-05 11:04:59 +02:00
Barrett17
9467826d31 AVFormatWriter: Remove OPEN_CODEC_CONTEXT hack 2018-08-05 11:04:59 +02:00
Augustin Cavalier
fc35866e55 iprowifi4965: Rework interrupts glue code.
Untested, but this now better matches how the FreeBSD code does it.
Potentially fixes a bug where interrupts would be spuriously re-enabled
after the driver had disabled them, which may fix a KDL humdinger
reported to me via IRC.
2018-08-04 12:21:08 -04:00
Barrett17
03437cd7b8 AVCodecEncoder: Rename fContext to fCodecContext 2018-08-04 12:11:09 +02:00
Barrett17
e302fe32cf AVCodecDecoder: Rename fContext to fCodecContext 2018-08-04 12:11:09 +02:00
Barrett17
ee9d0e0238 AVFormatWriter: Rename fContext to fFormatContext
* Seriously, this naming is bad.
2018-08-04 12:11:09 +02:00
Barrett17
428d87c581 AVFormatWriter: Move codec to codecpar
* Little cleanup included.
2018-08-04 12:11:09 +02:00
Barrett17
6283eeb2ff AVFormatReader: Move codec to codecpar 2018-08-04 12:11:08 +02:00
Barrett17
334b8f3f9c ffmpeg: Remove obsolete code 2018-08-04 12:11:08 +02:00
Fredrik Holmqvist
1368eabbff Fix gcc2 comparison, and only align if not aligned (8 - 0) 2018-08-03 15:31:03 +02:00
Fredrik Holmqvist
04cbc2588e Use fast clearing of visible screen for splash
memset uses rep stosb on x86 during boot, with memory
not set to write-combining, which makes it slow.

Instead we do aligned writes of 2 x four bytes at once.
Only clear the minimum of size and width * height * 4
UEFI framebuffer size can be huge, upto 512MB here,
and rep stosb seems to be around 25-30MB/s

This is written as generic as possible to work on
old compilers and different platforms, without
expecting boot memset to be optimized.

This makes it almost unnoticable compared to not
clearing.
2018-08-03 13:40:04 +02:00