popcornmix [Fri, 13 Sep 2019 12:45:11 +0000 (13:45 +0100)]
raspberrypi-cpufreq: Only report integer pll divisor frequencies
popcornmix [Tue, 20 Aug 2019 16:53:47 +0000 (17:53 +0100)]
config: Switch to upstream cpufreq driver
Signed-off-by: popcornmix <popcornmix@gmail.com>
popcornmix [Tue, 3 Sep 2019 19:28:00 +0000 (20:28 +0100)]
clk-bcm2835: Disable v3d clock
This is controlled by firmware, see clk-raspberrypi.c
Signed-off-by: popcornmix <popcornmix@gmail.com>
popcornmix [Wed, 21 Aug 2019 13:55:56 +0000 (14:55 +0100)]
clk-raspberrypi: Also support v3d clock
Signed-off-by: popcornmix <popcornmix@gmail.com>
popcornmix [Mon, 9 Sep 2019 14:49:56 +0000 (15:49 +0100)]
clk-raspberrypi: Allow cpufreq driver to also adjust gpu clocks
For performance/power it is beneficial to adjust gpu clocks with arm clock.
This is how the downstream cpufreq driver works
Signed-off-by: popcornmix <popcornmix@gmail.com>
popcornmix [Thu, 5 Sep 2019 16:59:14 +0000 (17:59 +0100)]
v3d_gem: Kick the clock so firmware knows we are using firmware clock interface
Setting the v3d clock to low value allows firmware to handle dvfs in case
where v3d hardware is not being actively used (e.g. console use).
Signed-off-by: popcornmix <popcornmix@gmail.com>
popcornmix [Mon, 9 Sep 2019 22:50:44 +0000 (23:50 +0100)]
v3d_drv: Allow clock retrieval by name
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Fri, 23 Aug 2019 15:34:38 +0000 (16:34 +0100)]
v3d_drv: Handle missing clock more gracefully
Signed-off-by: popcornmix <popcornmix@gmail.com>
Peter Robinson [Sun, 17 Nov 2019 16:20:24 +0000 (16:20 +0000)]
arm: dts: overlays: pitft35-resistive: add upstream compatible
The upstream hx8357d driver uses "adafruit,yx350hv15" for the compatible
string explicitly for this screen config and not a hx8357d generic for
the controller so add that in as well so it will work with an unmodified
upstream kernel driver. We leave the downstream as the priority.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Phil Elwell [Wed, 13 Nov 2019 16:28:10 +0000 (16:28 +0000)]
Revert "brcmfmac: Disable power management"
Shortly after the release of the Pi 3B, a loss of SSH connectivity
over WiFi was traced to the power management handling, so power
management was disabled. And so it has remained ever since.
Enabling power management saves 55mA (~270mW) on a Pi 4B, so is very
much worth the minimal effort of reverting this patch, which was
squashed and rebased many times since then to the commit hash is
meaningless.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 1 Oct 2019 09:19:50 +0000 (10:19 +0100)]
overlays: Remove hack from uart0 overlay
The uart0 overlay contained a hack to return GPIOs 14 and 15 to inputs
when the UART0 function was moved to alternative pins. This has the
unwanted side effect of claiming GPIOs 14 & 15, preventing them being
used for something else.
See: https://github.com/raspberrypi/linux/issues/2856
https://www.raspberrypi.org/forums/viewtopic.php?f=98&t=252911
Signed-off-by: Stefan Enge <stefan.enge@escatec.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Michael Kaplan [Fri, 8 Nov 2019 10:13:25 +0000 (11:13 +0100)]
configs: apds9960: add module to defconfigs
Signed-off-by: Michael Kaplan <m.kaplan@evva.com>
Michael Kaplan [Fri, 8 Nov 2019 09:35:57 +0000 (10:35 +0100)]
overlays: Add apds9960 overlay
Add an overlay for the AVAGO APDS9960 digital proximity, ambient light, rgb and gesture sensor.
Also update overlay README and Makefile.
Signed-off-by: Michael Kaplan <m.kaplan@evva.com>
James Hughes [Thu, 7 Nov 2019 14:59:59 +0000 (14:59 +0000)]
net:phy:2711 Change the default ethernet LED actions
This should return default behaviour back to that of previous
releases.
Pierre-jean Texier [Wed, 6 Nov 2019 09:00:43 +0000 (10:00 +0100)]
overlays: smi: fix typo in comment (#3320)
5 represent alt1 function not alt0.
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
James Hughes [Thu, 31 Oct 2019 14:39:44 +0000 (14:39 +0000)]
net:phy:2711 Allow ethernet LED mode to be set via device tree
Add device tree entries and code to allow the specification of
the lighting modes for the LED's on the ethernet connector.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Serge Schneider [Thu, 31 Oct 2019 13:37:16 +0000 (13:37 +0000)]
rpi-poe-fan: fix def_pwm1 writes
Signed-off-by: Serge Schneider <serge@raspberrypi.org>
Phil Elwell [Fri, 15 Nov 2019 08:48:08 +0000 (08:48 +0000)]
dwc_otg: Declare DMA capability with HCD_DMA flag
Following [1], USB controllers have to declare DMA capabilities in
order for them to be used by adding the HCD_DMA flag to their hc_driver
struct.
[1]
7b81cb6bddd2 ("usb: add a HCD_DMA flag instead of guestimating DMA capabilities")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Thu, 14 Nov 2019 12:00:43 +0000 (12:00 +0000)]
drm/v3d: The third IRQ is optional
As of 5.4, the kernel logs errors for absent IRQs unless requested
with platform_get_irq_optional.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Thu, 14 Nov 2019 11:59:01 +0000 (11:59 +0000)]
net: bcmgenet: The second IRQ is optional
As of 5.4, the kernel logs errors for absent IRQs unless requested
with platform_get_irq_optional.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Wed, 6 Nov 2019 13:58:18 +0000 (13:58 +0000)]
staging: vchiq_arm: Unify the unload handling of platform devs
A helper function vchiq_register_child was added to deal with
adding the platform devices. This returns NULL on failure, and
that is assigned to the struct platform_device. There is
therefore no way for remove to encounter an error pointer, so
checking for IS_ERR() is redundant.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Dave Stevenson [Wed, 6 Nov 2019 13:58:08 +0000 (13:58 +0000)]
staging: bcm2835-codec: Fix potential memory leak of isp instance
"d867785 staging: bcm2835-codec: add media controller support" added
a new error path that jumped to end, but didn't add the free
of the ISP device should that path be taken.
Fix this.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Dave Stevenson [Wed, 6 Nov 2019 13:57:58 +0000 (13:57 +0000)]
staging: vchiq_arm: Register bcm2835-codec as a platform driver
Following the same pattern as bcm2835-camera and bcm2835-audio,
register the V4L2 codec driver as a platform driver
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Dave Stevenson [Wed, 6 Nov 2019 13:57:48 +0000 (13:57 +0000)]
staging: vchiq_arm: Register vcsm-cma as a platform driver
Following the same pattern as bcm2835-camera and bcm2835-audio,
register the vcsm-cma driver as a platform driver
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Phil Elwell [Tue, 12 Nov 2019 16:41:21 +0000 (16:41 +0000)]
drm/v3d: Plug dma_fence leak
The irq_fence and done_fence are given a reference that is never
released. The necessary dma_fence_put()s seem to have been
deleted in error in an earlier commit.
Fixes:
0b73676836b2 ("drm/v3d: Clock V3D down when not in use.")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 11 Nov 2019 20:18:08 +0000 (20:18 +0000)]
drm/v3d: Suppress all but the first MMU error
The v3d driver currently encounters a lot of MMU PTE exceptions, so
only log the first to avoid swamping the kernel log.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 11 Nov 2019 14:01:41 +0000 (14:01 +0000)]
drm/v3d: Don't clear MMU control bits on exception
MMU exception conditions are reported in the V3D_MMU_CTRL register as
write-1-to-clear (W1C) bits. The MMU interrupt handling code clears any
exceptions, but does so by masking out any other bits and writing the
result back. There are some important control bits in that register,
including MMU_ENABLE, so a safer approach is to simply write back the
value just read unaltered.
This patch doesn't remove the cause of the apparent PTE errors, but it
does reduce the impact to just an error in the kernel log.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Tue, 5 Nov 2019 11:28:19 +0000 (11:28 +0000)]
Revert "pinctrl: bcm2835: Pass irqchip when adding gpiochip"
This reverts commit
73345a18d464b1b945b29f54f630ace6873344e2.
popcornmix [Mon, 4 Nov 2019 00:52:35 +0000 (00:52 +0000)]
configs: Rebuild with savedefconfig
James Hughes [Wed, 16 Oct 2019 13:49:23 +0000 (14:49 +0100)]
drm:vc4 Added calls for firmware display blank/unblank
Requires new display power mailbox call to be present.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Dave Stevenson [Mon, 7 Oct 2019 13:02:57 +0000 (14:02 +0100)]
staging: bcm2835-codec: Fix imbalance in dma_buf_get/dma_buf_put
When represented with a dmabuf buffer that had previously been
imported, there was a call to dma_buf_get without a matching
dma_buf_put. This left dmabufs in limbo after all users had
supposedly released them.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 13 Sep 2019 16:23:26 +0000 (17:23 +0100)]
staging: bcm2835-codec: Set default and error check timeperframe
G_PARM default was invalid as 0/0, and the driver didn't check
the value set in S_PARM wasn't 0/0.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 13 Sep 2019 16:22:08 +0000 (17:22 +0100)]
staging: bcm2835-codec: Correct buffer type check on G_PARM
The output queue buffer type is now OUTPUT_MPLANE.
Fixes: 5e484a3 staging: bcm2835-codec: switch to multi-planar API
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 13 Sep 2019 16:19:33 +0000 (17:19 +0100)]
staging:bcm2835-codec: Add support for ENUM_FRAMESIZES
Required for compliance testing for the encoder.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Markus Proeller [Thu, 10 Oct 2019 17:12:36 +0000 (19:12 +0200)]
media: i2c: Add a driver for the Infineon IRS1125 depth sensor
The Infineon IRS1125 is a time of flight depth sensor that
has a CSI-2 interface.
Add a V4L2 subdevice driver for this device.
Signed-off-by: Markus Proeller <markus.proeller@pieye.org>
Markus Proeller [Thu, 10 Oct 2019 17:12:08 +0000 (19:12 +0200)]
dt-bindings: Add binding for the Infineon IRS1125 sensor
Adds a binding for the Infineon IRS1125 time-of-flight depth
sensor.
Signed-off-by: Markus Proeller <markus.proeller@pieye.org>
Phil Elwell [Wed, 9 Oct 2019 16:22:07 +0000 (17:22 +0100)]
bcm2711: Retain support for old dtbs
The recent series switching to bcm2711 as the DT identifier broke Pis
running with old DTBs. Add some bcm2838 compatible strings as a
temporary measure, at least until the next full Raspbian image with
bcm2711 DTBs.
See: https://github.com/raspberrypi/linux/pull/3244
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Wed, 18 Sep 2019 14:49:13 +0000 (15:49 +0100)]
drm/vc4: Correct handling of rotation parameter in fkms
One bit within DRM_MODE_ROTATE_MASK will always be set to
determine the base rotation 0/90/180/270, and then REFLECT_X
and REFLECT_Y are on top.
Correct the handling which was assuming that REFLECT_[X|Y]
was instead of ROTATE_x.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 17 Sep 2019 17:36:32 +0000 (18:36 +0100)]
drm/vc4: Add support for H & V flips
The HVS supports horizontal and vertical flips whilst composing.
Expose these through the standard DRM rotation property.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Tue, 17 Sep 2019 17:28:17 +0000 (18:28 +0100)]
drm/vc4: Add support for YUV color encodings and ranges
The BT601/BT709 color encoding and limited vs full
range properties were not being exposed, defaulting
always to BT601 limited range.
Expose the parameters and set the registers appropriately.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Floris Bos [Fri, 4 Oct 2019 14:41:30 +0000 (16:41 +0200)]
pcie-brcmstb-bounce64.c: dev_err() -> dev_info() for info messages
"dmabounce: initialised" is not an error, so do not log it as such.
Prevents screen polution on OS with "quiet" as kernel parameter.
Closes #3266
James Hughes [Tue, 24 Sep 2019 17:26:55 +0000 (18:26 +0100)]
Rename HDMI ALSA device names, check for enable state
HDMI Alsa devices renamed to match names used by DRM, to
HDMI 1 and HDMI 2
Check for which HDMI devices are connected and only create
devices for those that are present.
The rename of the devices might cause some backwards compatibility
issues, but since this particular part of the driver needs to be
specifically enabled, I suspect the number of people who will see
the problem will be very small.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Matteo Croce [Sun, 6 Oct 2019 01:23:15 +0000 (03:23 +0200)]
vchiq_2835_arm: suppress warning
Suppress the following warning by casting the pointer to and uintptr_t
before void*:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function ‘vchiq_prepare_bulk_data’:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:260:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
bulk->data = (void *)VC_SAFE(pagelistinfo->dma_addr);
^
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Stefan Wahren [Sun, 21 Jul 2019 14:01:36 +0000 (16:01 +0200)]
pinctrl: bcm2835: Add support for BCM2711 pull-up functionality
commit
e38a9a437fb93ddafab5030165e4c6a3a5021669 upstream.
The BCM2711 has a new way of selecting the pull-up/pull-down setting
for a GPIO pin. The registers used for the BCM2835, GP_PUD and
GP_PUDCLKn0, are no longer connected. A new set of registers,
GP_GPIO_PUP_PDN_CNTRL_REGx must be used. This commit will add
a new compatible string "brcm,bcm2711-gpio" and the kernel
driver will use it to select which method is used to select
pull-up/pull-down.
This patch based on a patch by Al Cooper which was intended for the
BCM7211. This is a bugfixed and improved version.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Eric Anholt <eric@anholt.net>
Stefan Wahren [Thu, 19 Sep 2019 18:45:30 +0000 (20:45 +0200)]
ARM: bcm: Switch board, clk and pinctrl to bcm2711 compatible
After the decision to use bcm2711 compatible for upstream, we should
switch all accepted compatibles to bcm2711. So we can boot with
one DTB the down- and the upstream kernel.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Phil Elwell [Wed, 25 Sep 2019 08:49:58 +0000 (09:49 +0100)]
dma-direct: Temporary DMA fix on arm64
See: https://github.com/raspberrypi/linux/issues/3251
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Mon, 23 Sep 2019 08:26:41 +0000 (09:26 +0100)]
kbuild: Allow .dtbo overlays to be built piecemeal
Before 4.20, it was possible to build an arbitrary overlay by copying
it to arm/boot/dts/overlays/mytest-overlay.dts and running:
make ARCH=arm overlays/mytest.dtbo
In 4.20 the .dtb build rules were centralised, requiring the dowstream
.dtbo build rules to be changed. They were, enough to support "make ...
dtbs", but not sufficiently to allow this ad-hoc, one-off building of
individual files.
Add the missing makefile rule to support this way of building.
See: https://github.com/raspberrypi/linux/issues/3250
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Iago Toral Quiroga [Tue, 3 Sep 2019 06:45:24 +0000 (08:45 +0200)]
drm/v3d: clean caches at the end of render jobs on request from user space
Extends the user space ioctl for CL submissions so it can include a request
to flush the cache once the CL execution has completed. Fixes memory
write violation messages reported by the kernel in workloads involving
shader memory writes (SSBOs, shader images, scratch, etc) which sometimes
also lead to GPU resets during Piglit and CTS workloads.
v2: if v3d_job_init() fails we need to kfree() the job instead of
v3d_job_put() it (Eric Anholt).
v3 (Eric Anholt):
- Drop _FLAG suffix from the new flag name.
- Add a new param so userspace can tell whether cache flushing is
implemented in the kernel.
Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Phil Elwell [Wed, 18 Sep 2019 08:02:10 +0000 (09:02 +0100)]
dts: Add DTS for Pi 2B rev 1.2 with BCM2837 (#3235)
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Thu, 19 Sep 2019 12:39:15 +0000 (13:39 +0100)]
configs: Regenerate defconfigs
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Wed, 18 Sep 2019 16:22:36 +0000 (17:22 +0100)]
drm/v3d: Delete pm_runtime support
The pm_runtime was blocking changelist submission, so delete it as a
temporary workaround.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Fri, 13 Sep 2019 14:11:47 +0000 (15:11 +0100)]
staging: bcm2835-codec: Correct g/s_selection API MPLANE support
The g_selection and s_selection API is messed up and requires
the driver to expect the non-MPLANE buffer types, not the MPLANE
ones even if they are supported. The V4L2 core will convert the
MPLANE ones to non-MPLANE should they be passed in
Fixes: 5e484a3 staging: bcm2835-codec: switch to multi-planar API
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 6 Sep 2019 16:24:55 +0000 (17:24 +0100)]
staging: bcm2835-codec: Allow height of 1920.
The codec is happy with video up to 1920 high if the width
is suitably reduced to stay within level limits. eg 1080x1920
is OK to decode.
Increase the height limit accordingly.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Jörg Schambacher [Thu, 12 Sep 2019 12:57:32 +0000 (14:57 +0200)]
Add Hifiberry DAC+DSP soundcard driver (#3224)
Adds the driver for the Hifiberry DAC+DSP. It supports capture and
playback depending on the DSP firmware.
Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
James Hughes [Wed, 11 Sep 2019 13:57:18 +0000 (14:57 +0100)]
drm/vc4: Fix for margins in composite/SDTV mode (#3223)
Margins were incorrectly assumed to be setup in SDTV mode, but were
not actually done, so this make the setup non-conditional on mode.
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Dave Stevenson [Fri, 6 Sep 2019 14:13:06 +0000 (15:13 +0100)]
staging: bcm2835-camera: Add greyworld AWB mode
This is mainly used for the NoIR camera which has no IR
filter and can completely confuse normal AWB presets.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 6 Sep 2019 14:04:51 +0000 (15:04 +0100)]
v4l2: Add a Greyworld AWB mode.
Adds a simple greyworld white balance preset, mainly for use
with cameras without an IR filter (eg Raspberry Pi NoIR)
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Kieran Bingham [Wed, 20 Mar 2019 12:54:15 +0000 (12:54 +0000)]
staging: bcm2835-codec: add media controller support
Provide a single media device to contain all of the bcm2835_codec
devices created.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Kieran Bingham [Wed, 20 Mar 2019 11:35:26 +0000 (11:35 +0000)]
staging: bcm2835-codec: Pass driver context to create entities
Pass the bcm2835_codec_driver driver context directly into the
bcm2835_codec_create() so that it can be used to store driver global
state. Pass the struct platform_device *pdev by adding it to the driver
global state.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Kieran Bingham [Wed, 20 Mar 2019 11:55:43 +0000 (11:55 +0000)]
staging: bcm2835-codec: Add role to device name
Three entities are created, Decode, Encode and ISP but all of the video
nodes use the same video name string "bcm2835-codec" which makes it
difficult to identify each role.
Append the role-name to the video name to facilitate identifying a
specific instance from userspace.
The Card-Type is also extended with the role name to support identifying
the device context from within QUERY_CAP operations.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Kieran Bingham [Wed, 20 Mar 2019 11:42:39 +0000 (11:42 +0000)]
staging: bcm2835-codec: Fix declaration of roles
The static role text is declared incorrectly. The static should be
first, and the roles should also be constified.
Convert from "const static char *" to "static const char * const".
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Kieran Bingham [Sun, 28 Apr 2019 10:15:35 +0000 (12:15 +0200)]
staging: bcm2835-codec: Fix non-documentation comment block
The job_ready comment is incorrectly using the documentation prefix
(/**) which causes a warning at build time.
Simplify it.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Dave Stevenson [Wed, 28 Aug 2019 12:34:49 +0000 (13:34 +0100)]
media: i2c: Add driver for Sony IMX219 sensor
Adds a driver for the 8MPix Sony IMX219 CSI2 sensor.
Whilst the sensor supports 2 or 4 CSI2 data lanes, this driver
currently only supports 2 lanes.
8MPix @ 15fps, 1080P @ 30fps (cropped FOV), and 1640x1232 (2x2 binned)
@ 30fps are currently supported.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Dave Stevenson [Wed, 28 Aug 2019 12:34:30 +0000 (13:34 +0100)]
media: dt-bindings: Add binding for the Sony IMX219 sensor
The IMX219 is an 8MPix CSI2 sensor, supporting 2 or 4 data lanes.
Document the binding for this device.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Phil Elwell [Tue, 3 Sep 2019 17:17:25 +0000 (18:17 +0100)]
arch/arm64: Add Revision, Serial, Model to cpuinfo
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Tue, 3 Sep 2019 17:16:56 +0000 (18:16 +0100)]
arch/arm: Add model string to cpuinfo
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Aman Gupta [Fri, 23 Aug 2019 23:29:07 +0000 (16:29 -0700)]
staging: bcm2835-codec: remove unnecessary padding on encoder input
The ISP and ENCODE roles have the same underlying hardware. Neither requires vertical alignment.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 22:31:37 +0000 (22:31 +0000)]
staging: bcm2835-codec: add support for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
fixes #3171
Signed-off-by: Aman Gupta <aman@tmm1.net>
Phil Elwell [Thu, 15 Aug 2019 11:02:34 +0000 (12:02 +0100)]
configs: arm64/bcm2711: Enable V3D
Enable the V3D driver, which depends on BCM2835_POWER.
Originally submitted by GitHub user 'phire' in a slightly different
form.
See: https://github.com/raspberrypi/linux/pull/3063
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Jonathan Bell [Tue, 13 Aug 2019 14:53:29 +0000 (15:53 +0100)]
xhci: Use more event ring segment table entries
Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
busy set of devices on the bus. The errors are benign, but throughput
will suffer as the xHC will pause processing of transfers until the
event ring is drained by the kernel. Expand the number of event TRB slots
available by increasing the number of event ring segments in the ERST.
Controllers have a hardware-defined limit as to the number of ERST
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
Phil Elwell [Fri, 9 Aug 2019 07:51:43 +0000 (08:51 +0100)]
net: bcmgenet: Workaround #2 for Pi4 Ethernet fail
Some combinations of Pi 4Bs and Ethernet switches don't reliably get a
DCHP-assigned IP address, leaving the unit with a self=assigned 169.254
address. In the failure case, the Pi is left able to receive packets
but not send them, suggesting that the MAC<->PHY link is getting into
a bad state.
It has been found empirically that skipping a reset step by the genet
driver prevents the failures. No downsides have been discovered yet,
and unlike the forced renegotiation it doesn't increase the time to
get an IP address, so the workaround is enabled by default; add
genet.skip_umac_reset=n
to the command line to disable it.
See: https://github.com/raspberrypi/linux/issues/3108
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Dave Stevenson [Wed, 7 Aug 2019 10:31:08 +0000 (11:31 +0100)]
drm/vc4: Add missing NULL check to vc4_crtc_consume_event
vc4_crtc_consume_event wasn't checking crtc->state->event was
set before dereferencing it, leading to an OOPS.
Fixes "a5b534b drm/vc4: Resolve the vblank warnings on mode switching"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Thu, 11 Jul 2019 13:58:35 +0000 (14:58 +0100)]
staging: bcm2835-codec: Correct bytesperline on format changed
The handling of format changed events incorrectly set bytesperline
to the cropped width, which ignored padding and formats with
more than 8bpp.
Fix these.
Reported by: zillevdr <zillevdr@gmx.de>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Thu, 11 Jul 2019 13:57:09 +0000 (14:57 +0100)]
staging:bcm2835-codec: Expand logging on format setting
Adds some more useful logging during format changed events and
s_fmt.
Reported by: zillevdr <zillevdr@gmx.de>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Thu, 25 Jul 2019 16:34:29 +0000 (17:34 +0100)]
drm/vc4: Remove unused mode variable
"89d1376 drm/vc4: Add support for margins to fkms" removed
the requirement for having the mode structure from vc4_plane_to_mb,
but didn't remove it as a local to the function, causing a
compiler warning.
Remove the unused variable.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Thu, 25 Jul 2019 16:27:44 +0000 (17:27 +0100)]
drm/vc4: Resolve the vblank warnings on mode switching
The details over when and how a driver is to service the
vblank events are sketchy, and the fkms driver was triggering
a kernel warning every time the crtc was enabled or disabled.
Copy the event handling as used by the vc4-kms driver slightly
more closely, and we avoid the warnings.
https://github.com/raspberrypi/linux/issues/3020
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
James Hughes [Tue, 16 Jul 2019 11:18:21 +0000 (12:18 +0100)]
Add HDMI1 facility to the driver.
For generic ALSA, all you need is the bcm2835.h change, but
have also added structures for IEC958 HDMI. Not sure how to
test those.
Chen-Yu Tsai [Mon, 22 Jul 2019 14:20:55 +0000 (22:20 +0800)]
staging: bcm2835-codec: set device_caps in struct video_device
Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.
That way the V4L2 core knows what the capabilities of the
video device are.
This is similar to a cleanup series by Hans Verkuil [1].
[1] https://www.spinics.net/lists/linux-media/msg153313.html
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Chen-Yu Tsai [Mon, 22 Jul 2019 14:13:30 +0000 (22:13 +0800)]
staging: bcm2835-codec: implement V4L2_CID_MIN_BUFFERS_FOR_CAPTURE
The stateful decoder specification shows an optional step for retrieving
the miminum number of capture buffers required for the decoder to
proceed. While not a required parameter, having it makes some
applications happy.
bcm2835-codec is a little different from other decoder implementations
in that there is an intermediate format conversion between the hardware
and V4L2 buffers. The number of capture buffers required is therefore
independent of the stream and DPB etc.
There are plans to remove the conversion, but it requires a fair amount
of rework within the firmware. Until that is done, simply return a value
of 1.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Chen-Yu Tsai [Thu, 18 Jul 2019 09:07:05 +0000 (17:07 +0800)]
staging: bcm2835-codec: switch to multi-planar API
There are two APIs for mem2mem devices, the older single-planar API and
the newer multi-planar one. Without making things overly complex, the
driver can only support one or the other. However the userspace libv4l2
library has a plugin that allows multi-planar API devices to service
single-planar consumers.
Chromium supports the multi-planar API exclusively, though this is
currently limited to ChromiumOS. It would be possible to add support
for generic Linux.
Switching to the multi-planar API would allow usage of both APIs from
userspace.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Dave Stevenson [Tue, 23 Jul 2019 10:09:26 +0000 (11:09 +0100)]
drm/vc4: fkms: Set default state margin at reset
Now that the TV margins are properly parsed and filled into
drm_cmdline_mode, we just need to initialise the first state at reset to
get those values and start using them.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 14 Jun 2019 09:12:07 +0000 (10:12 +0100)]
drm/vc4: Add "Broadcast RGB" connector property
Some HDMI monitors do not abide by the full or limited
(16-235) range RGB flags in the AVI infoframe. This can
result in images looking washed out (if given limited and
interpreting as full), or detail disappearing at the extremes
(given full and interpreting as limited).
Copy the Intel i915 driver's approach of adding an override
property ("Broadcast RGB") to force one mode or the other.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Jonathan Bell [Thu, 1 Aug 2019 15:41:20 +0000 (16:41 +0100)]
hid: usb: Add device quirks for Freeway Airmouse T3 and MX3
These wireless mouse/keyboard combo remote control devices specify
multiple "wheel" events in their report descriptors. The wheel events
are incorrectly defined and apparently map to accelerometer data, leading
to spurious mouse scroll events being generated at an extreme rate when
the device is moved.
As a workaround, use HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE to mask
feeding the extra wheel events to the input subsystem.
See: https://github.com/raspberrypi/firmware/issues/1189
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
Jonathan Bell [Thu, 9 May 2019 13:30:37 +0000 (14:30 +0100)]
drivers: char: add chardev for mmap'ing the RPiVid control registers
Based on the gpiomem driver, allow mapping of the decoder register
spaces such that userspace can access control/status registers.
This driver is intended for use with a custom ffmpeg backend accelerator
prior to a v4l2 driver being written.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
James Hughes [Mon, 29 Jul 2019 11:02:59 +0000 (12:02 +0100)]
Fixup FKMS interrupt handing for non-existent display
If an errant interrupt flag was received from a non-existent display,
a NULL pointer access was made. Protect against this by checking if a
second display is present prior to checking the interrupt flags.
Phil Elwell [Wed, 31 Jul 2019 16:36:34 +0000 (17:36 +0100)]
drm/vc4: A present but empty dmas disables audio
Overlays are unable to remove properties in the base DTB, but they
can overwrite them. Allow a present but empty 'dmas' property
to also disable the HDMI audio interface.
See: https://github.com/raspberrypi/linux/issues/2489
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Joerg Schambacher [Tue, 23 Jul 2019 14:57:35 +0000 (16:57 +0200)]
adds the Hifiberry DAC+ADC PRO version
This adds the driver for the DAC+ADC PRO version of the Hifiberry soundcard with software controlled PCM1863 ADC
Signed-off-by: Joerg Schambacher joerg@i2audio.com
Dave Stevenson [Fri, 19 Jul 2019 16:49:00 +0000 (17:49 +0100)]
drm/vc4: Ensure zpos is always initialised
The compiler is warning that default_zpos can be used
uninitialised as there is no default case to catch all plane
types.
No other plane types should ever be presented to vc4_fkms_plane_init,
but add a default case regardless.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Fri, 19 Jul 2019 14:35:13 +0000 (15:35 +0100)]
drm/vc4: Add support for margins to fkms
Allows for overscan to be configured under FKMS.
NB This is rescaling the planes, not reducing the size of the
display mode.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Thu, 11 Jul 2019 14:12:05 +0000 (15:12 +0100)]
drm/vc4: Pass the drm vrefresh to the firmware on mode set
More for completeness than need, but use drm_mode_vrefresh
to compute the vrefresh value, and pass that down to the
firmware on mode set.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Dave Stevenson [Wed, 3 Jul 2019 16:44:53 +0000 (17:44 +0100)]
drm/vc4: Query firmware for custom HDMI mode
Allow custom HDMI modes to be specified from config.txt,
and these then override EDID parsing.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
yaroslavros [Wed, 14 Aug 2019 14:22:55 +0000 (15:22 +0100)]
Ported pcie-brcmstb bounce buffer implementation to ARM64. (#3144)
Ported pcie-brcmstb bounce buffer implementation to ARM64.
This enables full 4G RAM usage on Raspberry Pi in 64-bit mode.
Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com>
Dave Stevenson [Thu, 28 Jun 2018 14:57:25 +0000 (15:57 +0100)]
staging: bcm2835_camera: Ensure all buffers are returned on disable
With the recent change to match MMAL and V4L2 buffers there
is a need to wait for all MMAL buffers to be returned during
stop_streaming.
Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Hermann Lauer [Thu, 8 Aug 2019 13:40:37 +0000 (15:40 +0200)]
According to 5713 pdf doc CLOCK_CTRL is a readonly status register, and it behaves so. Remove useless setting
Eric Anholt [Thu, 2 May 2019 20:22:53 +0000 (13:22 -0700)]
drm/v3d: Clock V3D down when not in use.
My various attempts at re-enabling runtime PM have failed, so just
crank the clock down when V3D is idle to reduce power consumption.
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Mon, 14 Jan 2019 23:13:17 +0000 (15:13 -0800)]
drm/v3d: HACK: gut runtime pm for now.
Something is still unstable -- on starting a new glxgears from an idle
X11, I get an MMU violation in high addresses. The CTS also failed
quite quickly. With this, CTS progresses for an hour before OOMing
(allocating some big buffers when my board only has 600MB available to
Linux)
Signed-off-by: Eric Anholt <eric@anholt.net>
Hui Wang [Thu, 22 Aug 2019 15:32:46 +0000 (23:32 +0800)]
rtl8192cu: Let it support to build in the non-src folder
If we build the kernel with "-O=$non-src-folder", this driver will
introdcue a building error because of the header's location.
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Phil Elwell [Thu, 15 Aug 2019 07:39:08 +0000 (08:39 +0100)]
drm/vc4: Prevent load tracking from breaking FKMS
Firmware KMS uses a mixture of VC4 processing and dedicated code. The
load tracking support in VC4 assumes it is dealing with vc4_plane_state
objects when up-casting with container_of, but FKMS uses unadorned
drm_plane_state structures causing the VC4 code to read off the end
into random portions of memory. Work around the problem in a minimally-
invasive way by over-allocating the FKMS plane state structures to be
large enough to contain a vc4_plane_state, filling the remainder with
zeroes.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Phil Elwell [Wed, 7 Aug 2019 16:19:33 +0000 (17:19 +0100)]
pcie-brcmstb: Don't set DMA ops for root complex
A change to arm_get_dma_map_ops has stopped get_dma_ops from working
on the root complex, causing an error to be logged. However, there is
no need to override the DMA ops in that case, so skip it and
eliminate the error message.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
popcornmix [Tue, 6 Aug 2019 14:23:14 +0000 (15:23 +0100)]
clk-bcm2835: Avoid null pointer exception
clk_desc_array[BCM2835_PLLB] doesn't exist so we dereference null when iterating
Signed-off-by: popcornmix <popcornmix@gmail.com>