Alex Riesen [Thu, 21 Dec 2017 08:29:39 +0000 (09:29 +0100)]
Add Raspberry Pi firmware driver to the dependencies of backlight driver
Otherwise the backlight driver fails to build if the firmware
loading driver is not in the kernel
Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com>
Phil Elwell [Tue, 12 Dec 2017 12:12:46 +0000 (12:12 +0000)]
staging: vchiq_arm: Make debugfs failure non-fatal
It can be useful to be able to open multiple vchiq instances in a
single process. This currently fails due to a debugfs collision,
so make such a failure non-fatal.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Sat, 9 Dec 2017 21:45:12 +0000 (21:45 +0000)]
overlays: Add applepi-dac overlay
See: https://github.com/raspberrypi/linux/issues/2302
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gottfried Haider [Tue, 26 Sep 2017 11:59:51 +0000 (11:59 +0000)]
pwm: Set class for exported channels in sysfs
Notifications for devices without bus or class set get dropped by
dev_uevent_filter(). Adding the class to the exported child matches
what the GPIO subsystem is doing.
With this change exporting a channel triggers a udev event, which
gives userspace a chance to fixup permissions and makes it possible
for non-root users to make use of the PWM subsystem.
Signed-off-by: Gottfried Haider <gottfried.haider@gmail.com>
CC: Thierry Reding <thierry.reding@gmail.com>
CC: H Hartley Sweeten <hsweeten@visionengravers.com>
CC: linux-pwm@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-rpi-kernel@lists.infradead.org
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Giedrius Trainavicius [Mon, 24 Oct 2016 22:47:20 +0000 (01:47 +0300)]
Updates for Pisound module code:
* Merged 'Fix a warning in DEBUG builds' (
1c8b82b).
* Updating some strings and copyright information.
* Fix for handling high load of MIDI input and output.
* Use dual rate oversampling ratio for 96kHz instead of single
rate one.
Signed-off-by: Giedrius Trainavicius <giedrius@blokas.io>
Phil Elwell [Thu, 30 Nov 2017 09:04:07 +0000 (09:04 +0000)]
config: Add GPIO_PCF857X=m
The PCF8574 & 5 are I2C-connected 8- & 16-bit GPIO expanders.
See: https://github.com/raspberrypi/linux/issues/2294
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 17 Oct 2017 14:04:29 +0000 (15:04 +0100)]
lan78xx: Enable LEDs if no valid EEPROM or OTP
For applications of the LAN78xx that don't have valid programmed
EEPROMs or OTPs, enabling both LEDs by default seems reasonable.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 28 Nov 2017 12:02:37 +0000 (12:02 +0000)]
lan78xx: Correctly indicate invalid OTP
lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP
content, but the value gets overwritten before it is returned and the
read goes ahead anyway. Make the read conditional as it should be
and preserve the error code.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 21 Jul 2017 10:30:18 +0000 (11:30 +0100)]
lan78xx: Read MAC address from DT if present
There is a standard mechanism for locating and using a MAC address from
the Device Tree. Use this facility in the lan78xx driver to support
applications without programmed EEPROM or OTP.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 27 Nov 2017 17:29:08 +0000 (17:29 +0000)]
cgroup: Retain support for cgroup_memory=1
As part of a misguided fix for the automatic disabling of cgroup
memory, a new kernel parameter "cgroup_memory" was added. This
extra parameter is unnecessary now that implicit memory cgroup
disabling works correctly, but some unfortunate users may have
come to rely on it.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 27 Nov 2017 17:14:54 +0000 (17:14 +0000)]
cgroup: Fix automatic disabling of cgroup "memory"
Some Raspberry Pis have limited RAM and most users won't use the
cgroup memory support so it is disabled by default. The previous
implementation relied on the memory cgroup being encountered first,
which is not guaranteed to be the case. Change the implementation
to be registration-order-agnostic.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Wed, 18 Dec 2013 22:16:19 +0000 (22:16 +0000)]
config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory.
Phil Elwell [Sat, 25 Nov 2017 19:21:11 +0000 (19:21 +0000)]
Revert "cgroup: Add kernel param to enable memory group"
This reverts commit
ba742b52e5099b3ed964e78f227dc96460b5cdc0.
Phil Elwell [Tue, 14 Nov 2017 11:03:22 +0000 (11:03 +0000)]
mcp2515: Use DT-supplied interrupt flags
The MCP2515 datasheet clearly describes a level-triggered interrupt
pin. Therefore the receiving interrupt controller must also be
configured for level-triggered operation otherwise there is a danger
of a missed interrupt condition blocking all subsequent interrupts.
The ONESHOT flag ensures that the interrupt is masked until the
threaded interrupt handler exits.
Rather than change the flags globally (they must have worked for at
least one user), allow the flags to be overridden from Device Tree
in the event that the device has a DT node.
See: https://github.com/raspberrypi/linux/issues/2175
https://github.com/raspberrypi/linux/issues/2263
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gerald Pape [Tue, 21 Nov 2017 14:32:11 +0000 (15:32 +0100)]
enable sht3x module in kernel, add sht3x definition to i2c-sensor dts definition (#2282)
Enable sht3x module in kernel configuration, and add to i2c-sensor overlay.
James Hughes [Fri, 29 Sep 2017 14:44:24 +0000 (15:44 +0100)]
AXI performance monitor driver
Uses the debugfs I/F to provide access to the AXI
bus performance monitors.
Requires the new mailbox peripheral access for access
to the VPU performance registers, system bus access
is done using direct register reads.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Phil Elwell [Mon, 13 Nov 2017 13:00:14 +0000 (13:00 +0000)]
USB_DWCOTG: Disable building dwc_otg as a module (#2265)
When dwc_otg is built as a module, build will fail with the following
error:
ERROR: "DWC_TASK_HI_SCHEDULE" [drivers/usb/host/dwc_otg/dwc_otg.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1199: recipe for target 'modules' failed
make: *** [modules] Error 2
Even if the error is solved by including the missing
DWC_TASK_HI_SCHEDULE function, the kernel will panic when loading
dwc_otg.
As a workaround, simply prevent user from building dwc_otg as a module
as the current kernel does not support it.
See: https://github.com/raspberrypi/linux/issues/2258
Signed-off-by: Malik Olivier Boussejra <malik@boussejra.com>
Phil Elwell [Wed, 1 Nov 2017 12:24:28 +0000 (12:24 +0000)]
ARM: dts: Add fake CTS signal to pi3-miniuart-bt
The Pi 3B rev 1.3 and the Pi Zero W have flow control signals to the
BT modem, which work well using UART0 (a.k.a. ttyAMA0). Because of
this, the pin wired to the modem's CTS line has to be held low in
order for it to transmit data.
Unfortunately the mini-UART (or its driver) appears to have a flow
control issue, causing hciattach to stall during modem initialisation.
As a workaround (potentially short-term), configure GPIO 31 as an
output driving low (the default state for an output).
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=138223&start=100#p1228339
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Gerald Pape [Wed, 1 Nov 2017 10:15:32 +0000 (11:15 +0100)]
Include tsl4531, veml6070 and hdc100x dtoverlay (#2252)
This commit adds the needed kernel config keys and extends the
i2c-sensor-overlay.dts file with support for:
* the Texas Instruments HDC100x temp sensor
* the AMS TSL4531 digital ambient light sensor
* the Vishay VEML6070 ultraviolet light sensor
Alistair Buxton [Sat, 28 Oct 2017 03:58:26 +0000 (04:58 +0100)]
BCM_VC_SM: select DMA_SHARED_BUFFER
This driver was refactored to use the kernel DMA buffer sharing api
in commit
a97390852b14e8f06cf579adaaf8b664184e92d2.
Per Documentation/dma-buf-sharing.txt, it must select DMA_SHARED_BUFFER
in its Kconfig.
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
Phil Elwell [Fri, 27 Oct 2017 20:34:12 +0000 (21:34 +0100)]
config: Add CONFIG_W1_SLAVE_DS2438=m
See: https://github.com/raspberrypi/linux/issues/2246
Mariusz Bialonczyk [Thu, 23 Feb 2017 06:38:43 +0000 (07:38 +0100)]
w1: add support for DS2438 Smart Battery Monitor
[ Upstream commit
e3af95e60738e2f0ecedca96f8f3baa2fa4d1b7d ]
Detailed information about support and provided sysfs files
in my next commit which creates a documentation file:
Documentation/w1/slaves/w1_ds2438
Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phil Elwell [Wed, 25 Oct 2017 08:20:56 +0000 (09:20 +0100)]
scripts: Update mkknlimg, just in case
With the removal of the vc_cma driver, mkknlimg lost an indication that
the user had built a downstream kernel. Update the script, adding a few
more key strings, in case it is still being used.
Note that mkknlimg is now deprecated, except to tag kernels as upstream
(283x), and thus requiring upstream DTBs.
See: https://github.com/raspberrypi/linux/issues/2239
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Tue, 17 Oct 2017 15:21:13 +0000 (16:21 +0100)]
vc-cma: Remove the driver as non-functional on Pi
vc-cma was pulled in from previous platforms. It
supposedly allowed the VPU relocatable heap to be
released to the kernel as CMA, but it was always
a little fragile.
Remove it to avoid complications.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Phil Elwell [Tue, 17 Oct 2017 16:17:20 +0000 (17:17 +0100)]
config: Add CONFIG_USB_LAN78XX=m
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Daniel Matuschek [Tue, 17 Oct 2017 08:30:28 +0000 (10:30 +0200)]
Fixed a bug when using 352.8kHz sample rate
Signed-off-by: Daniel Matuschek <daniel@hifiberry.com>
Allo [Mon, 16 Oct 2017 16:52:24 +0000 (22:22 +0530)]
Bug fix: initial max volume level & default mode value. (#2224)
Bug fix: initial max volume level & default mode value.
Signed-off-by: allocom <sparky-dev@allo.com>
Phil Elwell [Fri, 13 Oct 2017 07:47:50 +0000 (08:47 +0100)]
overlays/README: Remove trailing whitespace
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
neilneil2000 [Thu, 12 Oct 2017 16:29:43 +0000 (17:29 +0100)]
GPIO and gpio-poweroff clarifications
Notes added:
1) All GPIO references use the hardware numbering scheme
2) Enabling gpio-poweroff prevents the ability to boot the pi by driving GPIO3 low
Phil Elwell [Wed, 11 Oct 2017 12:48:04 +0000 (13:48 +0100)]
amba-pl011: Report AUTOCTS capability to framework
The PL011 has full hardware RTS/CTS support which is enabled by
the driver when flow control is requested. However, it doesn't
notify the UART framework of the fact, causing the software CTS
support to be enabled at the same time.
Software CTS triggers the sending of another batch of characters
when CTS becomes asserted. The pl011 interrupt handler processes
the CTIS bit before TXIS, which can cause some characters to be
sent between the time that the TXIS bit first becomes asserted
and the time it is handled by a call to px011_tx_chars. This
would be fine were it not for the optimisation in pl011_tx_char
that assumes the FIFO is half-empty if called from the interrupt
handler and skips the checking of the FIFO status register before
sending each character, leading to data loss if the FIFO is more
than half-full.
Prevent the data loss and improve efficiency by indicating the
AUTOCTS support.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 6 Oct 2017 12:23:32 +0000 (13:23 +0100)]
brcmfmac: request_firmware_direct is quieter
Since we don't have any CLM-capable firmware yet, silence the warning
of its absence by using request_firmware_direct, which should also
be marginally quicker.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Chung-Hsien Hsu [Mon, 15 May 2017 01:11:05 +0000 (20:11 -0500)]
brcmfmac: add CLM download support
Future firmwares will be provided with minimal built-in CLM - the
NULL region (#n/0) becomes the initial country. It cannot be changed
until downloading a CLM blob file with some other regions. This patch
adds support for CLM blob file download. The blob file should be named
as firmware but with extension .clm_blob (e.g.
brcmfmac43430-sdio.clm_blob) and be placed in /lib/firmware/brcm/.
Change-Id: I0901a4b38592fe28d0adeb8f3e2402292842f169
Signed-off-by: Chung-Hsien Hsu <cnhu@cypress.com>
Christoph Hellwig [Thu, 7 Sep 2017 11:54:35 +0000 (13:54 +0200)]
bsg-lib: don't free job in bsg_prepare_job
commit
f507b54dccfd8000c517d740bc45f20c74532d18 upstream.
The job structure is allocated as part of the request, so we should not
free it in the error path of bsg_prepare_job.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phil Elwell [Fri, 29 Sep 2017 09:32:19 +0000 (10:32 +0100)]
amba_pl011: Insert mb() for correct FIFO handling
The pl011 register accessor functions use the _relaxed versions of the
standard readl() and writel() functions, meaning that there are no
automatic memory barriers. When polling a FIFO status register to check
for fullness, it is necessary to ensure that any outstanding writes have
completed; otherwise the flags are effectively stale, making it possible
that the next write is to a full FIFO.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Fri, 29 Sep 2017 09:32:19 +0000 (10:32 +0100)]
amba_pl011: Add cts-event-workaround DT property
The BCM2835 PL011 implementation seems to have a bug that can lead to a
transmission lockup if CTS changes frequently. A workaround was added to
the driver with a vendor-specific flag to enable it, but this flag is
currently not set for ARM implementations.
Add a "cts-event-workaround" property to Pi DTBs and use the presence
of that property to force the flag to be enabled in the driver.
See: https://github.com/raspberrypi/linux/issues/1280
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
David H [Wed, 4 Oct 2017 11:43:07 +0000 (04:43 -0700)]
bcm2835-camera: Fix timestamp calculation problem (#2214)
* bcm2835-camera: Fix timestamp calculation problem
Use div_s64_rem() to convert usec timestamp to timeval
to avoid integer signedness bug.
* bcm2835-camera: Store kernel start time in NSEC instead of USEC
* bcm2835-camera: Reword debug message for clarity
Kevin Cernekee [Sun, 17 Sep 2017 04:08:23 +0000 (21:08 -0700)]
brcmfmac: Delete redundant length check
brcmf_fweh_process_event() sets event->datalen to the
endian-swapped value of event_packet->msg.datalen, which is the
same as emsg.datalen. This length is already validated in
brcmf_fweh_process_event(), so there is no need to check it
again upon dequeuing the event.
Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Kevin Cernekee [Sun, 17 Sep 2017 04:08:22 +0000 (21:08 -0700)]
brcmfmac: Avoid possible out-of-bounds read
In brcmf_p2p_notify_rx_mgmt_p2p_probereq(), chanspec is assigned before
the length of rxframe is validated. This could lead to uninitialized
data being accessed (but not printed). Since we already have a
perfectly good endian-swapped copy of rxframe->chanspec in ch.chspec,
and ch.chspec is not modified by decchspec(), avoid the extra
assignment and use ch.chspec in the debug print.
Suggested-by: Mattias Nissler <mnissler@chromium.org>
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
popcornmix [Fri, 29 Sep 2017 15:15:01 +0000 (16:15 +0100)]
vcsm: Fix up macros to avoid breaking numbers used by existing apps
Dan Pasanen [Thu, 21 Sep 2017 12:41:02 +0000 (07:41 -0500)]
vcsm: use dma APIs for cache functions
* Will handle multi-platform builds
Dan Pasanen [Thu, 21 Sep 2017 14:57:44 +0000 (09:57 -0500)]
vcsm: add macros for cache functions
Dan Pasanen [Thu, 21 Sep 2017 14:55:42 +0000 (09:55 -0500)]
arm: partially revert
702b94bff3c50542a6e4ab9a4f4cef093262fe65
* Re-expose some dmi APIs for use in VCSM
Dave Stevenson [Sun, 24 Sep 2017 21:43:16 +0000 (22:43 +0100)]
vc-sm: Fix a printf of a dma_addr_t from %u to %pad
Avoids issues when other build parameters result in
dma_addr_t being a 64 bit value.
See #2196.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
James Hughes [Fri, 22 Sep 2017 09:24:04 +0000 (10:24 +0100)]
Touchscreen spurious event fix
Touchscreen driver was not checking event type,
which meant bad coords that arrived with the
finger up event were being used, causing this
spurious coordinate event.
Fix is to ignore all finger up events.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Dan Pasanen [Wed, 20 Sep 2017 15:17:41 +0000 (10:17 -0500)]
vcsm: fix multi-platform build
Phil Elwell [Mon, 18 Sep 2017 11:01:46 +0000 (12:01 +0100)]
cgroup: Add kernel param to enable memory group
cgroup support is useful, but enabling the "memory" cgroup has a 32-byte
overhead per page. Arrange that "memory" cgroup is disabled by default
unless the "cgroup_memory" parameter is set to a true value.
See: https://github.com/raspberrypi/issues/1950
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 18 Sep 2017 09:07:54 +0000 (10:07 +0100)]
Revert "config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory."
This reverts commit
7dbc189967bef8e7f431c982557d0e73eb13f161.
Phil Elwell [Thu, 14 Sep 2017 15:16:24 +0000 (16:16 +0100)]
config: Add CONFIG_GPIO_WATCHDOG=m
Enable the gpio_wdt module, to support external watchdogs.
See: https://github.com/raspberrypi/linux/issues/2199
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Tue, 5 Sep 2017 15:24:03 +0000 (16:24 +0100)]
vcsm: Handle the clean+invalidate case directly
Dave Stevenson [Tue, 5 Sep 2017 09:18:33 +0000 (10:18 +0100)]
vcsm: Replace SM_PDE_T with sm_pde_t
Follows the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:17:18 +0000 (10:17 +0100)]
vcsm: Replace SM_PRIV_DATA_T with sm_priv_data_t
Follows the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:16:07 +0000 (10:16 +0100)]
vcsm: Replace SM_STATE_T with sm_state_t
Follow the Linux kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:15:25 +0000 (10:15 +0100)]
vcsm: Replace SM_STATS_T with sm_stats_t
Follows the kernel coding style
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 5 Sep 2017 09:12:21 +0000 (10:12 +0100)]
vcsm: Replace SM_RESOURCE_T with sm_resource_t
Follow the Linux kernel coding style.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:55:07 +0000 (17:55 +0100)]
vcsm: Remove VC_SM_LOCK_CACHE_MODE_T typedef.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:47:32 +0000 (17:47 +0100)]
vcsm: Fix "Prefer kcalloc over kzalloc with multiply"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:45:34 +0000 (17:45 +0100)]
vcsm: Fix "void function return statements are not generally useful"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:38:27 +0000 (17:38 +0100)]
vcsm: Fix "struct vm_operations_struct should normally be const"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:36:11 +0000 (17:36 +0100)]
vcsm: Correct "long unsigned int" to "unsigned long"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:33:49 +0000 (17:33 +0100)]
vcsm: Fix use of S_IRUGO and use 0444 instead
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:24:48 +0000 (17:24 +0100)]
vcsm: Fix spaces around operators.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:29:37 +0000 (17:29 +0100)]
vcsm: Fix indentation of switch/case statement.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:21:09 +0000 (17:21 +0100)]
vcsm: Fix lots of block quote formatting issues
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 16:01:11 +0000 (17:01 +0100)]
vcsm: Fix erroneous space in 'if' statement.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:59:49 +0000 (16:59 +0100)]
vcsm: Fix blank lines after declarations.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:55:08 +0000 (16:55 +0100)]
vcsm: "unsigned int" preferred over "unsigned" fixed.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:50:29 +0000 (16:50 +0100)]
vcsm: Remove typedef of VC_VCHI_SM_HANDLE_T
Replaced with struct sm_instance *.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:34:13 +0000 (16:34 +0100)]
vcsm: Fix block comment formatting
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:29:53 +0000 (16:29 +0100)]
vcsm: Correct block comment style on licence headers.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 1 Sep 2017 15:26:12 +0000 (16:26 +0100)]
vcsm: Remove all typedefs from vc_sm_defs.h and calling code
Remove typedefs on the structures that make up the IPC
to the firmware for VCSM. Update all calling code appropriately.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Wed, 15 Feb 2017 11:17:44 +0000 (11:17 +0000)]
VCSM: New option to import a DMABUF for VPU use
Takes a dmabuf, and then calls over to the VPU to wrap
it into a suitable handle.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 25 Aug 2017 14:58:57 +0000 (15:58 +0100)]
vcsm: Convert to loading via device tree.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 19 May 2017 13:29:12 +0000 (14:29 +0100)]
vcsm: code-style: Fix comment indentation
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Wed, 15 Feb 2017 11:16:05 +0000 (11:16 +0000)]
VCSM: Specify pointers in IPC msgs as uint32_t
Pointers were specified as void* which will fail
rather badly if the kernel is switched to 64 bit.
GPU wants 32 bit addresses, so use uint32_t and
cast whereever necessary.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
popcornmix [Mon, 4 Sep 2017 19:48:02 +0000 (20:48 +0100)]
vcsm: Allow both clean and invalidate to be requested
Phil Elwell [Thu, 24 Aug 2017 15:16:16 +0000 (16:16 +0100)]
brcmfmac: Disable ARP offloading when promiscuous
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable
ARP offloading when in promiscuous mode, re-enabling the ability to
sniff ARP packets over WiFi.
See: https://github.com/raspberrypi/linux/issues/2171
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Eric Anholt [Fri, 19 Dec 2014 00:07:15 +0000 (16:07 -0800)]
mm: Remove the PFN busy warning
See commit
dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is
expected sometimes when using CMA. However, that commit still spams
my kernel log with these warnings.
Signed-off-by: Eric Anholt <eric@anholt.net>
popcornmix [Fri, 25 Aug 2017 16:09:38 +0000 (17:09 +0100)]
vcsm: Allow build with multi-platform v6-v7
Eric Anholt [Mon, 17 Apr 2017 16:26:03 +0000 (09:26 -0700)]
drm/vc4: Fix refcounting of runtime PM get if it errors out.
We were returning without decrementing if the error happened, meaning
that at the next submit we wouldn't try to bring up the power domain.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170417162603.12726-1-eric@anholt.net
Reviewed-by: Sean Paul <seanpaul@chromium.org>
(cherry picked from commit
925d05e1f825db9490da33afe35bd5383d301e97)
Eric Anholt [Mon, 24 Jul 2017 21:34:55 +0000 (14:34 -0700)]
drm/vc4: Demote user-accessible DRM_ERROR paths to DRM_DEBUG.
Userspace shouldn't be able to spam dmesg by passing bad arguments.
This has particularly become an issues since we started using a bad
argument to set_tiling to detect if set_tiling was supported.
Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 83753117f1de ("drm/vc4: Add get/set tiling ioctls.")
Eric Anholt [Sat, 15 Jul 2017 00:33:08 +0000 (17:33 -0700)]
drm/vc4: Fix pitch setup for T-format scanout.
The documentation said to use src_w here, and I didn't consider that
we actually needed to be using pitch somewhere in our setup. Fixes
scanout on my DSI panel when X11 does initial setup with 1920x1080
HDMI and 800x480 DSI both at 0,0 of the same framebuffer.
Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 98830d91da08 ("drm/vc4: Add T-format scanout support.")
Hans Verkuil [Sun, 16 Jul 2017 10:48:03 +0000 (12:48 +0200)]
drm/vc4: prepare for CEC support
In order to support CEC the hsm clock needs to be enabled in
vc4_hdmi_bind(), not in vc4_hdmi_encoder_enable(). Otherwise you wouldn't
be able to support CEC when there is no hotplug detect signal, which is
required by some monitors that turn off the HPD when in standby, but keep
the CEC bus alive so they can be woken up.
The HDMI core also has to be enabled in vc4_hdmi_bind() for the same
reason.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170716104804.48308-3-hverkuil@xs4all.nl
(cherry picked from commit
10ee275cb12f884ce09bed69ea387eae73d7fece)
Boris Brezillon [Tue, 11 Apr 2017 16:39:25 +0000 (18:39 +0200)]
drm/vc4: Add runtime PM support to the HDMI encoder driver
The HDMI driver is currently enabling all clocks at probe time and
keeps the power-domain connected to the HDMI encoder enabled.
Move all activation code to vc4_hdmi_encoder_enable() and make sure
the clks and power domain are released when the HDMI encoder is not used
by adding deactivation steps in vc4_hdmi_encoder_disable().
Note that the sequencing imposed by the IP requires that we move
vc4_hdmi_encoder_mode_set() code into vc4_hdmi_encoder_enable().
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
4f6e3d66ac522dec9733d433ad00e8e77747c372)
Eric Anholt [Tue, 27 Jun 2017 19:58:33 +0000 (12:58 -0700)]
drm/vc4: Fix misleading name of the continuous flag.
The logic was all right in the end, the name was just backwards.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627195839.3338-3-eric@anholt.net
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
(cherry picked from commit
ec878c0756a0c202e86256dca1de307ab1189ab8)
Eric Anholt [Tue, 27 Jun 2017 19:58:32 +0000 (12:58 -0700)]
drm/vc4: Fix DSI T_INIT timing.
The DPHY spec requires a much larger T_INIT than I was specifying
before. In the absence of clear specs from the slave of what their
timing is, just use the value that the firmware was using.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627195839.3338-2-eric@anholt.net
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
(cherry picked from commit
e65d51126f89a0d67ee6c5df58363730b1410ab5)
Eric Anholt [Tue, 25 Jul 2017 18:27:18 +0000 (11:27 -0700)]
drm/vc4: Convert more lock requirement comments to lockdep assertions.
Since I do my development with lockdep on, this will help make sure I
don't introduce bugs here.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170725182718.31468-3-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit
4e6b1e91253ebf701b4ec3586cba5596527a4d0a)
Eric Anholt [Tue, 25 Jul 2017 18:27:17 +0000 (11:27 -0700)]
drm/vc4: Add an ioctl for labeling GEM BOs for summary stats
This has proven immensely useful for debugging memory leaks and
overallocation (which is a rather serious concern on the platform,
given that we typically run at about 256MB of CMA out of up to 1GB
total memory, with framebuffers that are about 8MB ecah).
The state of the art without this is to dump debug logs from every GL
application, guess as to kernel allocations based on bo_stats, and try
to merge that all together into a global picture of memory allocation
state. With this, you can add a couple of calls to the debug build of
the 3D driver and get a pretty detailed view of GPU memory usage from
/debug/dri/0/bo_stats (or when we debug print to dmesg on allocation
failure).
The Mesa side currently labels at the gallium resource level (so you
see that a 1920x20 pixmap has been created, presumably for the window
system panel), but we could extend that to be even more useful with
glObjectLabel() names being sent all the way down to the kernel.
(partial) example of sorted debugfs output with Mesa labeling all
resources:
kernel BO cache: 16392kb BOs (3)
tiling shadow 1920x1080: 8160kb BOs (1)
resource 1920x1080@32/0: 8160kb BOs (1)
scanout resource 1920x1080@32/0: 8100kb BOs (1)
kernel: 8100kb BOs (1)
v2: Use strndup_user(), use lockdep assertion instead of just a
comment, fix an array[-1] reference, extend comment about name
freeing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170725182718.31468-2-eric@anholt.net
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit
f30994622b2bf8e4fa224237ac65304b27a9cb6a)
Eric Anholt [Tue, 25 Jul 2017 18:27:16 +0000 (11:27 -0700)]
drm/vc4: Start using u64_to_user_ptr.
Chris Wilson pointed out this little cleanup in a review of new code,
so let's fix up the code I was copying from.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170725182718.31468-1-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit
95d7cbcb6fbe3885d7a968cc86b98a08466742af)
Eric Anholt [Wed, 2 Aug 2017 18:46:51 +0000 (11:46 -0700)]
drm/vc4: Don't disable DSI clocks on component unload.
The clocks are enabled/disabled at encoder enable/disable time, not at
component load. Fixes a WARN_ON at boot if V3D fails to probe.
Fixes: 4078f5757144 ("drm/vc4: Add DSI driver")
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Wed, 2 Aug 2017 19:48:04 +0000 (12:48 -0700)]
drm/vc4: Fix double destroy of the BO cache on teardown.
It's also destroyed from the top level vc4_drv.c initialization, which
is where the cache was actually initialized from.
This used to just involve duplicate del_timer() and cancel_work_sync()
being called, but it started causing kmalloc issues once we
double-freed the new BO label array.
Fixes: 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats")
Signed-off-by: Eric Anholt <eric@anholt.net>
popcornmix [Tue, 22 Aug 2017 12:48:22 +0000 (13:48 +0100)]
cache: Fix up previous commit for v6
popcornmix [Fri, 18 Aug 2017 17:46:20 +0000 (18:46 +0100)]
vcsm: Provide new ioctl to clean/invalidate a 2D block
popcornmix [Fri, 18 Aug 2017 17:45:36 +0000 (18:45 +0100)]
vcsm: Provide flag to map pages up front
popcornmix [Fri, 18 Aug 2017 16:27:36 +0000 (17:27 +0100)]
cache: export clean and invalidate
popcornmix [Wed, 16 Aug 2017 21:01:33 +0000 (22:01 +0100)]
config: Enable CONFIG_BRCMDBG temporarily for debugging on pi0
Phil Elwell [Wed, 16 Aug 2017 15:52:50 +0000 (16:52 +0100)]
BCM270X_DT: Set spidev spi-max-frequency to 125MHz
The BCM2835 SPI controllers have a maximum bus clock of half the system
clock speed, so with the 250MHz system clock found on Raspberry Pis
you get a theoretical maximum bus speed of 125MHz. Note that this
speed is unlikely to be reliable, and the maximum usable bus spee will
depend on both the attached device and the wiring.
See: https://github.com/raspberrypi/linux/issues/2165
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Tue, 15 Aug 2017 15:48:46 +0000 (16:48 +0100)]
config: Enable CONFIG_BRCMDBG temporarily for debugging
allocom [Sat, 5 Aug 2017 05:57:07 +0000 (11:27 +0530)]
allo-digione: 192kHz clicking sound fix
See: https://github.com/raspberrypi/linux/pull/2149
allocom [Sat, 5 Aug 2017 05:56:47 +0000 (11:26 +0530)]
allo-piano-dac-plus: Master volume added
Master volume added, which controls both DACs volumes.
See: https://github.com/raspberrypi/linux/pull/2149
Eric Cooper [Sat, 29 Jul 2017 19:52:58 +0000 (15:52 -0400)]
overlays: i2c-rtc: add m41t62
Add support for the ST M41T62 real-time clock chip.