[PATCH 7/9] drm/vc4: Add support for drawing 3D frames.

2015-12-01 Thread Eric Anholt
The user submission is basically a pointer to a command list and a pointer to uniforms. We copy those in to the kernel, validate and relocate them, and store the result in a GPU BO which we queue for execution. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/Makefile | 7

[PATCH 5/9] drm/vc4: Fix a typo in a V3D debug register.

2015-12-01 Thread Eric Anholt
Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h index 9e4e904..4e52a0a 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++ b/drivers/gpu/drm/vc4

[PATCH 3/9] drm/vc4: Add create and map BO ioctls.

2015-12-01 Thread Eric Anholt
While there exist dumb APIs for creating and mapping BOs, one of the rules is that drivers doing 3D acceleration have to provide their own APIs for buffer allocation (besides, the pitch/height parameters of the dumb alloc don't really make sense for a lot of 3D allocations). Signed-off-by:

[PATCH 2/9] drm/vc4: Add a BO cache.

2015-12-01 Thread Eric Anholt
-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_bo.c | 336 +- drivers/gpu/drm/vc4/vc4_debugfs.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 6 +- drivers/gpu/drm/vc4/vc4_drv.h | 49 +- 4 files changed, 384 insertions(+), 8 deletions(-) diff

[PATCH 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs.

2015-12-01 Thread Eric Anholt
s (texture sampling). Once it's validated, we return a GEM BO containing the shader, which doesn't allow mapping for write or exporting to other subsystems. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/Makefile | 3 +- drivers/gpu/drm/vc4/vc4_bo.c | 1

[PATCH 9/9] drm/vc4: Add an interface for capturing the GPU state after a hang.

2015-12-01 Thread Eric Anholt
This can be parsed with vc4-gpu-tools tools for trying to figure out what was going on. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_drv.c | 2 + drivers/gpu/drm/vc4/vc4_drv.h | 4 + drivers/gpu/drm/vc4/vc4_gem.c | 185 ++ include/uapi/drm

[PATCH 6/9] drm/vc4: Bind and initialize the V3D engine.

2015-12-01 Thread Eric Anholt
This is the component of the GPU that does 3D rendering. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/vc4/vc4_debugfs.c | 2 + drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 13 +++ drivers/gpu/drm/vc4/vc4_v3d.c

Re: [PATCH 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs.

2015-12-02 Thread Eric Anholt
Emil Velikov writes: > Hi Eric, > > On 1 December 2015 at 20:35, Eric Anholt wrote: >> Since we have no MMU, the kernel needs to validate that the submitted >> shader code won't make any accesses to memory that the user doesn't >> control, which involves ban

Re: [PATCH 7/9] drm/vc4: Add support for drawing 3D frames.

2015-12-02 Thread Eric Anholt
Emil Velikov writes: > Hi Eric, > > On 1 December 2015 at 20:35, Eric Anholt wrote: >> The user submission is basically a pointer to a command list and a >> pointer to uniforms. We copy those in to the kernel, validate and >> relocate them, and store the result in

Re: [PATCH 9/9] drm/vc4: Add an interface for capturing the GPU state after a hang.

2015-12-02 Thread Eric Anholt
Emil Velikov writes: > On 1 December 2015 at 20:35, Eric Anholt wrote: >> This can be parsed with vc4-gpu-tools tools for trying to figure out >> what was going on. >> > I might be pushing my luck here ... have you thought about basing > (forking) vc4-gpu-tools of in

Re: [PATCH v2 1/3] clk: bcm2835: Always round up clock divisor

2015-12-03 Thread Eric Anholt
Remi Pommarel writes: > Hi, > > On Wed, Nov 18, 2015 at 10:25:45AM -0800, Eric Anholt wrote: >> Remi Pommarel writes: >> >> > Make bcm2835_clock_choose_div always round up the chosen MASH divisor so >> > that >> > the resulting averag

Re: [PATCH v2 2/3] clk: bcm2835: Support for clock parent selection

2015-12-03 Thread Eric Anholt
Remi Pommarel writes: > On Wed, Nov 18, 2015 at 10:30:17AM -0800, Eric Anholt wrote: > > [...] > >> > +static int bcm2835_clock_determine_rate(struct clk_hw *hw, >> > + struct clk_rate_request *req) >> > +{ >> > + struct bcm2835_clock *c

Re: [PATCH 8/9] drm/vc4: Add support for async pageflips.

2015-12-03 Thread Eric Anholt
Daniel Stone writes: > Hi, > > On 1 December 2015 at 20:35, Eric Anholt wrote: >> An async pageflip stores the modeset to be done and executes it once >> the BOs are ready to be displayed. This gets us about 3x performance >> in full screen rendering with pagefl

[PATCH] drm: Use the driver's gem_object_free function from CMA helpers.

2015-12-14 Thread Eric Anholt
VC4 wraps the CMA objects in its own structures, so it needs to do its own teardown (waiting for GPU to finish, updating bo_stats tracking). The other CMA drivers are using drm_gem_cma_free_object as their gem_free_object, so this should be a no-op for them. Signed-off-by: Eric Anholt

Re: [PATCH] drm: Use the driver's gem_object_free function from CMA helpers.

2015-12-15 Thread Eric Anholt
Daniel Vetter writes: > On Mon, Dec 14, 2015 at 04:26:26PM -0800, Eric Anholt wrote: >> VC4 wraps the CMA objects in its own structures, so it needs to do its >> own teardown (waiting for GPU to finish, updating bo_stats tracking). >> The other CMA drivers are using drm_g

[PATCH v3 4/4] ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT.

2015-12-15 Thread Eric Anholt
From: Alexander Aring This connects the USB driver to the USB power domain, so that USB can actually be turned on at boot if the bootloader didn't do it for us. Signed-off-by: Alexander Aring Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 +++ arch/arm

[PATCH v3 0/4] Raspberry Pi power domains

2015-12-15 Thread Eric Anholt
of_genpd_add_provider_onecell() fails. We can easily go back and update the driver when a pm_genpd_exit() lands. Alexander Aring (3): ARM: bcm2835: add rpi power domain driver dt-bindings: add rpi power domain driver bindings ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. Eric Anholt

[PATCH v3 1/4] ARM: bcm2835: Define two new packets from the latest firmware.

2015-12-15 Thread Eric Anholt
These packets give us direct access to the firmware's power management code, as opposed to GET/SET_POWER_STATE packets that only had a couple of domains implemented. Signed-off-by: Eric Anholt --- include/soc/bcm2835/raspberrypi-firmware.h | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH v3 2/4] ARM: bcm2835: add rpi power domain driver

2015-12-15 Thread Eric Anholt
From: Alexander Aring This patch adds support for several power domains on Raspberry Pi, including USB (so it can be enabled even if the bootloader didn't do it), and graphics. This patch is the combined work of Eric Anholt (who wrote USB support inside of the Raspberry Pi firmware driver

[PATCH v3 3/4] dt-bindings: add rpi power domain driver bindings

2015-12-15 Thread Eric Anholt
From: Alexander Aring This patch adds devicetree tree bindings for the Raspberry Pi power domain driver. Signed-off-by: Alexander Aring Acked-by: Rob Herring Signed-off-by: Eric Anholt --- v2: Add the new domains present in v2 to the list. .../bindings/arm/bcm/raspberrypi,bcm2835

Re: [PATCH 3/4] clk: bcm2835: Add support for programming the audio domain clocks.

2015-09-10 Thread Eric Anholt
Eric Anholt writes: > This adds support for enabling, disabling, and setting the rate of the > audio domain clocks. It will be necessary for setting the pixel clock > for HDMI in the VC4 driver and let us write a cpufreq driver. It will > also improve compatibility with user ch

[PATCH v2 1/4] clk: bcm2835: Move under bcm/ with other Broadcom SoC clk drivers.

2015-09-10 Thread Eric Anholt
clk-bcm2835.c predates the drivers under bcm/, but all the new BCM drivers are going in there so let's follow them. Signed-off-by: Eric Anholt --- drivers/clk/Makefile| 1 - drivers/clk/bcm/Makefile| 1 + drivers/clk/{ => bcm}/clk-bcm2835.c | 0 3 files ch

[PATCH v2 4/4] ARM: bcm2835: Switch to using the new clock driver support.

2015-09-10 Thread Eric Anholt
but it turns out the firmware needed to change to running it at the 250Mhz core clock speed to avoid a bug in clock domain crossing. Additionally, anything using BCM2835_CLOCK_VPU will now have a correct clock rate if the user configures the boot-time core clock speed using config.txt. Signed

[PATCH v2 3/4] clk: bcm2835: Add support for programming the audio domain clocks.

2015-09-10 Thread Eric Anholt
e() results would be incorrect, but that's no worse than our current state where we used fixed clocks. The existing fixed clocks in the code are left in place to provide backwards compatibility with old device tree files. Signed-off-by: Eric Anholt --- v2: Fix onecell->clks[] allocation

[PATCH v2 2/4] clk: bcm2835: Add binding docs for the new platform clock driver.

2015-09-10 Thread Eric Anholt
Previously we've only supported a few fixed clocks based on assumptions about how the firmware sets up the clocks, but this binding will let us control the actual (audio power domain) clock manager. Signed-off-by: Eric Anholt --- .../bindings/clock/brcm,bcm2835-cprman.txt

BCM2835 auxiliary peripheral clocks.

2015-09-10 Thread Eric Anholt
This is a followup to the main audio domain clocks series I just posted. There's a clock gate register controlling the clocks for a few extra peripherals, and Martin Sperl has been working on the SPI driver for 2/3 of them (the other is a simple UART). This gives those drivers the clock gate enab

[PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates.

2015-09-10 Thread Eric Anholt
There are a pair of SPI masters and a mini UART that were last minute additions. As a result, they didn't get integrated in the same way as the other gates off of the VPU clock in CPRMAN. Signed-off-by: Eric Anholt --- drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm2835-

[PATCH 1/3] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates.

2015-09-10 Thread Eric Anholt
These will be used for enabling UART1, SPI1, and SPI2. Signed-off-by: Eric Anholt --- .../bindings/clock/brcm,bcm2835-aux-clock.txt | 30 ++ include/dt-bindings/clock/bcm2835-aux.h| 17 2 files changed, 47 insertions(+) create mode 100644

[PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

2015-09-10 Thread Eric Anholt
These will be used for enabling UART1, SPI1, and SPI2. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index a6a55b7..7c37956 100644 --- a/arch/arm/boot/dts

Re: [PATCH] dmaengine: bcm2835-dma: Convert to use DMA pool

2015-11-24 Thread Eric Anholt
ff-by: Peter Ujfalusi It sounds like you got positive testing feedback. Using the DMA pool for our bcm2835_dma_cbs makes sense to me, too. Reviewed-by: Eric Anholt signature.asc Description: PGP signature

Re: [PATCH 3/9] drm/vc4: Add create and map BO ioctls.

2015-12-07 Thread Eric Anholt
Michel Dänzer writes: > On 08.12.2015 10:16, Eric Anholt wrote: >> Emil Velikov writes: >> >>> Hi Eric, >>> >>> A couple of suggestions/requests on the UAPI header side >>> >>> On 1 December 2015 at 20:35, Eric Anholt wrote:

Re: [PATCH v3 4/4] clk: bcm2835: Add PWM clock support to the device tree

2015-12-07 Thread Eric Anholt
Stefan Wahren writes: > Hi Remi, > > Am 07.12.2015 um 19:17 schrieb Remi Pommarel: >> Hi Stefan, >> >> On Sun, Dec 06, 2015 at 10:16:25PM +0100, Stefan Wahren wrote: >>> Hi Remi, >>> >>> please send this patch to devicet...@vger.kernel.org. >> >> Ok, just to be sure I understand the process here.

[PATCH v2 0/9] VC4 3D rendering support.

2015-12-08 Thread Eric Anholt
h-2 and a version for booting and testing can be found at: https://github.com/anholt/linux/tree/vc4-kms-v3d-squash-2-boot Eric Anholt (9): drm: Create a driver hook for allocating GEM object structs. drm/vc4: Add a BO cache. drm/vc4: Add create and map BO ioctls. drm/vc4: Add an API for cr

[PATCH v2 1/9] drm: Create a driver hook for allocating GEM object structs.

2015-12-08 Thread Eric Anholt
The CMA helpers had no way for a driver to extend the struct with its own fields. Since the CMA helpers are mostly "Allocate a drm_gem_cma_object, then fill in a few fields", it's hard to write as pure helpers without passing in a driver callback for the allocate step. Signed-off-

[PATCH v2 2/9] drm/vc4: Add a BO cache.

2015-12-08 Thread Eric Anholt
-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_bo.c | 336 +- drivers/gpu/drm/vc4/vc4_debugfs.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 6 +- drivers/gpu/drm/vc4/vc4_drv.h | 49 +- 4 files changed, 384 insertions(+), 8 deletions(-) diff

[PATCH v2 3/9] drm/vc4: Add create and map BO ioctls.

2015-12-08 Thread Eric Anholt
While there exist dumb APIs for creating and mapping BOs, one of the rules is that drivers doing 3D acceleration have to provide their own APIs for buffer allocation (besides, the pitch/height parameters of the dumb alloc don't really make sense for a lot of 3D allocations). Signed-off-by:

[PATCH v2 5/9] drm/vc4: Fix a typo in a V3D debug register.

2015-12-08 Thread Eric Anholt
Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h index 9e4e904..4e52a0a 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++ b/drivers/gpu/drm/vc4

[PATCH v2 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs.

2015-12-08 Thread Eric Anholt
s (texture sampling). Once it's validated, we return a GEM BO containing the shader, which doesn't allow mapping for write or exporting to other subsystems. Signed-off-by: Eric Anholt --- v2: Use __u32-style types. drivers/gpu/drm/vc4/Makefile | 3 +- drivers/

[PATCH v2 9/9] drm/vc4: Add an interface for capturing the GPU state after a hang.

2015-12-08 Thread Eric Anholt
This can be parsed with vc4-gpu-tools tools for trying to figure out what was going on. Signed-off-by: Eric Anholt --- v2: Use __u32-style types. drivers/gpu/drm/vc4/vc4_drv.c | 2 + drivers/gpu/drm/vc4/vc4_drv.h | 4 + drivers/gpu/drm/vc4/vc4_gem.c | 185

[PATCH v2 6/9] drm/vc4: Bind and initialize the V3D engine.

2015-12-08 Thread Eric Anholt
This is the component of the GPU that does 3D rendering. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/Makefile | 1 + drivers/gpu/drm/vc4/vc4_debugfs.c | 2 + drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 13 +++ drivers/gpu/drm/vc4/vc4_v3d.c

[PATCH v2 8/9] drm/vc4: Add support for async pageflips.

2015-12-08 Thread Eric Anholt
An async pageflip stores the modeset to be done and executes it once the BOs are ready to be displayed. This gets us about 3x performance in full screen rendering with pageflipping. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 99 +- drivers/gpu/drm

[PATCH v2 7/9] drm/vc4: Add support for drawing 3D frames.

2015-12-08 Thread Eric Anholt
The user submission is basically a pointer to a command list and a pointer to uniforms. We copy those in to the kernel, validate and relocate them, and store the result in a GPU BO which we queue for execution. Signed-off-by: Eric Anholt --- v2: Drop support for NV shader recs (not necessary

[PATCH v4 1/8] clk: bcm2835: Add binding docs for the Raspberry Pi clock provider

2015-07-20 Thread Eric Anholt
The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). Signed-off-by: Eric Anholt Acked-by: Stephen Warren Acked

[PATCH v4 0/8] Raspberry Pi clock support

2015-07-20 Thread Eric Anholt
This is a respin of my rpi-dt-clocks series (also available at https://github.com/anholt/linux/tree/rpi-dt-clocks). New in this version is mentioning the clk subsystem for drivers/clk/* patches, some better documentation of behavior in clk-raspberrypi.c, and a new patch at the tail of the series f

[PATCH v4 6/8] ARM: bcm2835: Use the RPi firmware clocks for uart.

2015-07-20 Thread Eric Anholt
This gets us a correct apb_pclk, which previously was accidentally using the "20201000.uart" clock from clk-bcm2835.c, due to the fallback clk_get_sys() path. Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 7 +++ arch/arm/boot/dts/bc

[PATCH v4 3/8] ARM: bcm2835: Add DT for the firmware clocks driver.

2015-07-20 Thread Eric Anholt
Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- v2: Rename our compat string to mention bcm2835, and make our firmware phandle be under a vendor-namespaced property. arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v4 4/8] ARM: bcm2835: Drop never-used clock-frequency property of uart0.

2015-07-20 Thread Eric Anholt
This appears to have been copy-and-paste from another serial driver's DT. The driver has never used this value -- instead, the pl011 driver is getting the fixed 20201000.uart clock from clk-bcm2835.c. Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- arch/arm/boot/dts/bcm2835.dts

[PATCH v4 7/8] ARM: bcm2835: Tie SPI clock to the core clock rate.

2015-07-20 Thread Eric Anholt
We were previously using a fixed clock declared in the 2835 DT, but it's actually the core clock, and it might not be the same if you had adjusted it using the firmware's config.txt. Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 ++

[PATCH v4 2/8] clk: Add a Raspberry Pi-specific clock driver.

2015-07-20 Thread Eric Anholt
n the firmware driver isn't supported yet, but it also avoids issues with disabling "unused" clocks due to them not yet being connected to their consumers in the DT. Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- v2: Declare the mutex static (from review by Baruch Siach), m

[PATCH v4 5/8] clk: bcm2835: Drop the fixed sys_pclk.

2015-07-20 Thread Eric Anholt
Nothing uses it, and I can't find any evidence that anything ever has. Its role is now filled by the core clock in the firmware driver. Signed-off-by: Eric Anholt Acked-by: Stephen Warren --- drivers/clk/clk-bcm2835.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/cl

[PATCH v4 8/8] ARM: bcm2835: Use the firmware on rpi to get the EMMC clock.

2015-07-20 Thread Eric Anholt
This updates the MMC frequency from 100Mhz to 250Mhz. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index 0a32123..5d370cb 100644 --- a/arch/arm/boot

Re: [PATCH v2 1/3] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates.

2016-01-02 Thread Eric Anholt
Michael Turquette writes: > Hi Arnd, > > Quoting Arnd Bergmann (2015-12-30 01:29:02) >> It's also ok to merge the header file and binding with either the dts file >> changes or the driver and then do the other part the following release. >> >> In the past, we've worked around the issue by mergin

Re: [PATCH v5 01/13] mmc: sdhci-bcm2835: use sdhci_pltfm_init for private allocation

2016-02-16 Thread Eric Anholt
Signed-off-by: Jisheng Zhang > Acked-by: Arnd Bergmann > Acked-by: Adrian Hunter Acked-by: Eric Anholt signature.asc Description: PGP signature

Re: [PATCH 2/3] drm/vc4: Enable runtime PM.

2016-02-16 Thread Eric Anholt
Eric Anholt writes: > +#ifdef CONFIG_PM_SLEEP > +static int vc4_v3d_runtime_suspend(struct device *dev) > +{ > + struct vc4_v3d *v3d = dev_get_drvdata(dev); > + struct vc4_dev *vc4 = v3d->vc4; > + > + vc4_irq_uninstall(vc4->dev); > + > +

[PATCH 3/6] drm/vc4: Add another reg to HDMI debug dumping.

2016-02-16 Thread Eric Anholt
This is also involved in the HDMI setup sequence so it's nice to see it. Signed-off-by: Eric Anholt --- This patch and the next one I'd target for -next, since they aren't functional fixes. drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driv

[PATCH 4/6] drm/vc4: Fix the name of the VSYNCD_EVEN register.

2016-02-16 Thread Eric Anholt
It's used for delaying vsync in interlaced mode. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_regs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c

drm/vc4: Modesetting fixes

2016-02-16 Thread Eric Anholt
This series fixes the highest priority problems reported from the driver getting enabled in Raspbian: modesetting on HDMI was broken if you weren't at the same resolution that the firmware had set up, or if the firmware hadn't set up HDMI at all.

[PATCH 2/6] drm/vc4: Bring HDMI up from power off if necessary.

2016-02-16 Thread Eric Anholt
If the firmware hadn't brought up HDMI for us, we need to do its power-on reset sequence (reset HD and and clear its STANDBY bits, reset HDMI, and leave the PHY disabled). Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_hdmi.c | 29 - drivers/gpu/dr

[PATCH 6/6] drm/vc4: Initialize scaler DISPBKGND on modeset.

2016-02-16 Thread Eric Anholt
We weren't updating the interlaced bit, so we'd scan out incorrectly if the firmware had brought up the TV encoder and we were switching to HDMI. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++ drivers/gpu/drm/vc4/vc4_regs.h | 14 ++ 2 files c

[PATCH 5/6] drm/vc4: Fix setting of vertical timings in the CRTC.

2016-02-16 Thread Eric Anholt
It looks like when I went to add the interlaced bits, I just took the existing PV_VERT* block and indented it, instead of copy and pasting it first. Without this, changing resolution never worked. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 10 ++ 1 file changed, 10

[PATCH 1/6] drm/vc4: Fix a framebuffer reference leak on async flip interrupt.

2016-02-16 Thread Eric Anholt
We'd need X to queue up an async pageflip while another is outstanding, and then take a SIGIO. I think X actually avoids sending out the next pageflip while one's already queued, but I'm not sure. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_crtc.c | 1 + 1 file chang

[GIT PULL 2/2] bcm2835 changes to DT for 4.6

2016-02-17 Thread Eric Anholt
The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d: Linux 4.5-rc1 (2016-01-24 13:06:47 -0800) are available in the git repository at: g...@github.com:anholt/linux.git bcm2835-dt-next-2016-02-17 for you to fetch changes up to 1305141d1a7254b53b35303ee84f4c4948007bd0:

Re: [GIT PULL] bcm2835 DT changes for 4.6

2016-02-17 Thread Eric Anholt
Florian Fainelli writes: > On 12/02/2016 16:53, Eric Anholt wrote: >> Florian Fainelli writes: >> >>> On 10/02/2016 10:51, Eric Anholt wrote: >>>> Martin Sperl writes: >>>> >>>>>> On 09.02.2016, at 01:32, Eric Anholt wro

[GIT PULL 1/2] bcm2835 changes to defconfigs for 4.6

2016-02-17 Thread Eric Anholt
The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d: Linux 4.5-rc1 (2016-01-24 13:06:47 -0800) are available in the git repository at: g...@github.com:anholt/linux.git bcm2835-defconfig-next-2016-02-17 for you to fetch changes up to 0a05d3b71ada526ef93019fb3fbd6a9556

[GIT PULL] drm/vc4: changes for drm-next.

2016-02-17 Thread Eric Anholt
d1f68b46: drm/vc4: Add support for YUV planes. (2016-02-16 11:24:08 -0800) This pull request brings in overlay plane support for vc4. ---- Eric Anholt (10): drm/v

[GIT PULL] drm/vc4: changes for drm-fixes

2016-02-17 Thread Eric Anholt
r V3D integration due to build breakage) and waits for idle in the presence of signals (which X likes to do a lot). Eric Anholt (8): drm/vc4: Validate that WAIT_BO padding is cleared. drm/vc4: Fix the clear color for the

[PATCH] i2c: bcm2835: Don't complain on -EPROBE_DEFER from getting our clock

2016-02-18 Thread Eric Anholt
Fixes dmesg spam when we just need to wait a moment for the clock driver to probe. Signed-off-by: Eric Anholt --- drivers/i2c/busses/i2c-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index

[PATCH 3/3] drm/vc4: Use runtime PM to power cycle the device when the GPU hangs.

2016-02-08 Thread Eric Anholt
This gets us functional GPU reset again, like we had until a refactor at merge time. Tested with a little patch to stuff in a broken binner job every 100 frames. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_drv.h | 6 +- drivers/gpu/drm/vc4/vc4_gem.c | 26

[PATCH 0/3] vc4: Runtime PM and GPU reset.

2016-02-08 Thread Eric Anholt
thout GPU reset we can end up with a totally wedged desktop (and we do still have some known GPU hangs). If not, I'm fine with the first patch to -fixes and the other two to -next. Eric Anholt (3): drm/vc4: Fix spurious GPU resets due to BO reuse. drm/vc4: Enable runtime PM. drm/vc4: U

[PATCH 1/3] drm/vc4: Fix spurious GPU resets due to BO reuse.

2016-02-08 Thread Eric Anholt
We were tracking the "where are the head pointers pointing" globally, so if another job reused the same BOs and execution was at the same point as last time we checked, we'd stop and trigger a reset even though the GPU had made progress. Signed-off-by: Eric Anholt --- driv

[PATCH 2/3] drm/vc4: Enable runtime PM.

2016-02-08 Thread Eric Anholt
so much, but in steady-state GPU-bound rendering we keep the power on (since we keep multiple jobs outstanding) and even if we power cycle on every job we can still manage at least 680 fps. More importantly, though, runtime PM will allow us to power off the device to do a GPU reset. Signed-off-

[GIT PULL] bcm2835 DT changes for 4.6

2016-02-08 Thread Eric Anholt
Hi Florian. Here's the first set of patches for bcm2835 for 4.6. We've got more DT patches that are going to happen for new boards, too, but they're still getting polished. The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d: Linux 4.5-rc1 (2016-01-24 13:06:47 -0800) a

[PATCH 1/5] ARM: bcm2835: Define standard pinctrl groups in the gpio node.

2016-02-26 Thread Eric Anholt
cific groups we want enabled. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 170 + 1 file changed, 170 insertions(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 8aaf193..e91198e 100644 ---

[PATCH 5/5] ARM: bcm2835: Move most RPi default pin groups to their devices.

2016-02-26 Thread Eric Anholt
This way we can get the duplicated pin group definitions out of each RPi board file, and just leave the i2s variations in them. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 14 +++--- arch/arm/boot/dts/bcm2835-rpi-a.dts | 14 +++--- arch/arm

[PATCH 2/5] ARM: bcm2835: Replace alt0/i2s_alt[02] with standard groups.

2016-02-26 Thread Eric Anholt
Since all of these pins were documented, we can use their names to explain what's going on. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 17 ++--- arch/arm/boot/dts/bcm2835-rpi-a.dts | 17 ++--- arch/arm/boot/dts/bcm2835-rpi-b-plu

[PATCH 4/5] ARM: bcm2835: Add a group for mapping pins 48-53 to sdhost.

2016-02-26 Thread Eric Anholt
This pin group definition comes from downstream. We don't have a driver for sdhost integrated yet, but they've been experimenting with it and it sounds useful to bring over. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 4 1 file changed, 4 insertions(+) di

[PATCH 3/5] ARM: bcm2835: Move the emmc pin group to bcm283x.dtsi.

2016-02-26 Thread Eric Anholt
While it's not documented in the public PDF, it is internally. This is a standard pin group for the 283x, not rpi-specific. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 4 ++-- arch/arm/boot/dts/bcm2835-rpi-a.dts | 4 ++-- arch/arm/boot/dts/bcm2835-

[PATCH 0/5] BCM2835 pinctrl DT rework (resend)

2016-02-26 Thread Eric Anholt
f my mails this week. I've now swapped systems. Eric Anholt (5): ARM: bcm2835: Define standard pinctrl groups in the gpio node. ARM: bcm2835: Replace alt0/i2s_alt[02] with standard groups. ARM: bcm2835: Move the emmc pin group to bcm283x.dtsi. ARM: bcm2835: Add a group for mapping pins

[PATCH 1/4] dt-bindings: Add binding for brcm,bcm2835-sdhost.

2016-02-26 Thread Eric Anholt
This is the other SD controller on the platform, which can be swapped to the role of SD card host using pin muxing. Signed-off-by: Eric Anholt --- .../bindings/mmc/brcm,bcm2835-sdhost.txt | 25 ++ 1 file changed, 25 insertions(+) create mode 100644 Documentation

[PATCH 0/4] bcm2835 SDHOST controller

2016-02-26 Thread Eric Anholt
les, speed tests), but I'm not sure what a good testing regimen for storage drivers would be. Eric Anholt (4): dt-bindings: Add binding for brcm,bcm2835-sdhost. mmc: bcm2835-sdhost: Add new driver for the internal SD controller. ARM: bcm2835: Include SDHOST in the device tree. ARM:

[PATCH 2/4] mmc: bcm2835-sdhost: Add new driver for the internal SD controller.

2016-02-26 Thread Eric Anholt
written by Phil Elwell in the downstream Rasbperry Pi tree, and I did a major cleanup on it (+319, -721 lines out of the original 2055) for inclusion. Signed-off-by: Eric Anholt --- drivers/mmc/host/Kconfig |9 + drivers/mmc/host/Makefile |1 + drivers/mmc/host/bcm2835-sdhost.c

[PATCH 3/4] ARM: bcm2835: Include SDHOST in the device tree.

2016-02-26 Thread Eric Anholt
equest/config process. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 597a78f..7b2721b 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/b

[PATCH 4/4] ARM: bcm2835: Enable SDHOST by default.

2016-02-26 Thread Eric Anholt
This improves read speed on my SD card (as reported by hdparm -t) from 10.15MB/sec to 16.70MB/sec. Once we add slave DMA, we can get to 18.45MB/sec. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a

[PATCH] pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing

2016-02-29 Thread Eric Anholt
From: Phil Elwell The DT bindings for pinctrl-bcm2835 allow both the function and pull to contain either one entry or one per pin. However, an error in the DT parsing can cause failures if the number of pulls differs from the number of functions. Signed-off-by: Eric Anholt Cc: sta

[PATCH 1/2] drm/vc4: Let gpiolib know that we're OK with sleeping for HPD.

2016-02-29 Thread Eric Anholt
Fixes an error thrown every few seconds when we poll HPD when it's on a I2C to GPIO expander. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c

[PATCH 0/2] drm/vc4: Fixes for Raspberry Pi 3

2016-02-29 Thread Eric Anholt
These are for fixing the vc4 driver on the Pi 3. Note that patch 2 will also be necessary for fixing HPD on the Pi2, which we've been carrying downstream patches to work around until now. Eric Anholt (2): drm/vc4: Let gpiolib know that we're OK with sleeping for HPD. drm/vc

[PATCH 2/2] drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set in the devicetree.

2016-02-29 Thread Eric Anholt
The original Raspberry Pi had the GPIO active high, but the later models are active low. The DT GPIO bindings allow specifying the active flag, except that it doesn't get propagated to the gpiodesc, so you have to handle it yourself. Signed-off-by: Eric Anholt --- drivers/gpu/dr

[PATCH 2/2] clk: bcm2835: Reuse CLK_DIVIDER_MAX_AT_ZERO for recalc_rate()

2016-02-15 Thread Eric Anholt
We were rolling this ourselves, but clk-divider can do it now. Signed-off-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 9f4df8f..353e438

[PATCH 1/2] clk: bcm2835: Fix setting of PLL divider clock rates

2016-02-15 Thread Eric Anholt
on my HDMI monitor (everything except 720x400). Cc: sta...@vger.kernel.org Signed-off-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 015e687..9f4d

[PATCH 2/5] ARM: bcm2835: Replace alt0/i2s_alt[02] with standard groups.

2016-02-23 Thread Eric Anholt
Since all of these pins were documented, we can use their names to explain what's going on. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 17 ++--- arch/arm/boot/dts/bcm2835-rpi-a.dts | 17 ++--- arch/arm/boot/dts/bcm2835-rpi-b-plu

[PATCH 5/5] ARM: bcm2835: Move most RPi default pin groups to their devices.

2016-02-25 Thread Eric Anholt
This way we can get the duplicated pin group definitions out of each RPi board file, and just leave the i2s variations in them. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 14 +++--- arch/arm/boot/dts/bcm2835-rpi-a.dts | 14 +++--- arch/arm

[PATCH 1/5] ARM: bcm2835: Define standard pinctrl groups in the gpio node.

2016-02-25 Thread Eric Anholt
cific groups we want enabled. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 170 + 1 file changed, 170 insertions(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 8aaf193..e91198e 100644 ---

[PATCH 4/5] ARM: bcm2835: Add a group for mapping pins 48-53 to sdhost.

2016-02-25 Thread Eric Anholt
This pin group definition comes from downstream. We don't have a driver for sdhost integrated yet, but they've been experimenting with it and it sounds useful to bring over. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 4 1 file changed, 4 insertions(+) di

Re: [PATCH 1/5] ARM: bcm2835: Define standard pinctrl groups in the gpio node.

2016-02-25 Thread Eric Anholt
Eric Anholt writes: > The BCM2835-ARM-Peripherals.pdf documentation specifies what the > function selects do for the pins, and there are a bunch of obvious > groupings to be made. With these created, we'll be able to replace > bcm2835-rpi.dtsi's main "set all

Re: [PATCH 2/3 v8] mailbox: Enable BCM2835 mailbox support

2015-05-07 Thread Eric Anholt
Noralf Trønnes writes: > Den 05.05.2015 22:27, skrev Eric Anholt: >> From: Lubomir Rintel >> >> This mailbox driver provides a single mailbox channel to write 32-bit >> values to the VPU and get a 32-bit response. The Raspberry Pi >> firmware uses this mail

Re: Re: [PATCH 2/3 v8] mailbox: Enable BCM2835 mailbox support

2015-05-08 Thread Eric Anholt
Alexander Stein writes: > On Thursday 07 May 2015, 12:54:20 wrote Eric Anholt: >> Noralf Trønnes writes: >> >> > Den 05.05.2015 22:27, skrev Eric Anholt: >> >> From: Lubomir Rintel >> >> >> >> This mailbox driver provides a single

[PATCH] ARM: bcm2835: Use 0x4 prefix for DMA bus addresses to SDRAM.

2015-05-04 Thread Eric Anholt
that dma_alloc_coherent() and friends return addresses with 0x4 bits and avoid cache incoherency. This matches the behavior in the downstream 2708 kernel (see BUS_OFFSET in arch/arm/mach-bcm2708/include/mach/memory.h). Signed-off-by: Eric Anholt Cc: popcorn...@gmail.com --- arch/arm/boot/dts/bc

Re: [PATCH] ARM: bcm2835: Use 0x4 prefix for DMA bus addresses to SDRAM.

2015-05-04 Thread Eric Anholt
Noralf Trønnes writes: > Den 04.05.2015 21:33, skrev Eric Anholt: >> There exists a tiny MMU, configurable only by the VC (running the >> closed firmware), which maps from the ARM's physical addresses to bus >> addresses. These bus addresses determine the caching beh

Re: [PATCH] ARM: bcm2835: Use 0x4 prefix for DMA bus addresses to SDRAM.

2015-05-05 Thread Eric Anholt
Stephen Warren writes: > On 05/04/2015 01:33 PM, Eric Anholt wrote: >> There exists a tiny MMU, configurable only by the VC (running the >> closed firmware), which maps from the ARM's physical addresses to bus >> addresses. These bus addresses determine the caching beh

[PATCH v2] ARM: bcm2835: Use 0x4 prefix for DMA bus addresses to SDRAM.

2015-05-05 Thread Eric Anholt
that dma_alloc_coherent() and friends return addresses with 0x4 bits and avoid cache incoherency. This matches the behavior in the downstream 2708 kernel (see BUS_OFFSET in arch/arm/mach-bcm2708/include/mach/memory.h). Signed-off-by: Eric Anholt Tested-by: Noralf Trønnes Acked-by: Ste

<    1   2   3   4   5   6   7   8   9   10   >