[Freedreno] [PATCH] drm/msm: correct attempted NULL pointer dereference in put_iova

2019-06-02 Thread Brian Masney
put_iova() would attempt to dereference a NULL pointer via the address space pointer when no IOMMU is present. Correct this by adding the appropriate check. Signed-off-by: Brian Masney --- drivers/gpu/drm/msm/msm_gem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-28 Thread Brian Masney
On Tue, May 28, 2019 at 03:46:14PM +0200, Linus Walleij wrote: > On Thu, May 9, 2019 at 4:04 AM Brian Masney wrote: > > > Here is a patch series that adds initial display support for the LG > > Nexus 5 (hammerhead) phone. It's not fully working so that's why some > >

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-28 Thread Brian Masney
On Tue, May 28, 2019 at 07:32:14PM -0600, Jeffrey Hugo wrote: > On Tue, May 28, 2019 at 7:17 PM Brian Masney wrote: > > > > On Tue, May 28, 2019 at 03:46:14PM +0200, Linus Walleij wrote: > > > On Thu, May 9, 2019 at 4:04 AM Brian Masney wrote: > > > > &g

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-28 Thread Brian Masney
On Tue, May 28, 2019 at 07:42:19PM -0600, Jeffrey Hugo wrote: > > > Do you know if the nexus 5 has a video or command mode panel? There > > > is some glitchyness with vblanks and command mode panels. > > > > Its in command mode. I know this because I see two 'pp done time out' > > messages, even

[Freedreno] [PATCH v3 1/6] drm/msm: add dirty framebuffer helper

2019-05-31 Thread Brian Masney
Use drm_atomic_helper_dirtyfb() as the dirty callback in the msm_framebuffer_funcs struct. Call drm_plane_enable_fb_damage_clips() when the planes are initialized in mdp4, mdp5, and dpu1. Signed-off-by: Brian Masney --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3 +++ drivers/gpu/drm/msm

[Freedreno] [PATCH v3 2/6] drm/msm: add support for per-CRTC max_vblank_count on mdp5

2019-05-31 Thread Brian Masney
-by: Brian Masney Suggested-by: Jeffrey Hugo --- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 16 +++- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5

[Freedreno] [PATCH v3 3/6] ARM: qcom_defconfig: add display-related options

2019-05-31 Thread Brian Masney
Add the CMA (Contiguous Memory Allocator) for the MSM DRM/KMS driver, the simple panel, and the TI LM3630A driver in order to support the display on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- arch/arm/configs/qcom_defconfig | 5 + 1 file

[Freedreno] [PATCH v3 5/6] ARM: dts: msm8974: add display support

2019-05-31 Thread Brian Masney
Add the MDP5, DSI and DSI PHY blocks for the display found on the msm8974 SoCs. This is based on work from msm8916.dtsi and Jonathan Marek. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- arch/arm/boot/dts/qcom-msm8974.dtsi | 132 1 file changed, 132

[Freedreno] [PATCH v3 0/6] ARM: qcom: working Nexus 5 display support

2019-05-31 Thread Brian Masney
reviewed-by to patches 3-6 My status page at https://masneyb.github.io/nexus-5-upstream/ describes what is working so far with the upstream kernel on the Nexus 5. Brian Masney (6): drm/msm: add dirty framebuffer helper drm/msm: add support for per-CRTC max_vblank_count on mdp5 ARM

[Freedreno] [PATCH v3 6/6] ARM: dts: qcom: msm8974-hammerhead: add support for display

2019-05-31 Thread Brian Masney
Add initial support for the display found on the LG Nexus 5 (hammerhead) phone. This is based on work from Jonathan Marek. Signed-off-by: Brian Masney --- .../qcom-msm8974-lge-nexus5-hammerhead.dts| 58 +++ 1 file changed, 58 insertions(+) diff --git a/arch/arm/boot/dts

[Freedreno] [PATCH v3 4/6] ARM: dts: qcom: msm8974-hammerhead: add support for backlight

2019-05-31 Thread Brian Masney
Add necessary device tree nodes for the main LCD backlight. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- .../qcom-msm8974-lge-nexus5-hammerhead.dts| 34 +++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-29 Thread Brian Masney
On Wed, May 29, 2019 at 08:23:17AM +0200, Linus Walleij wrote: > On Wed, May 29, 2019 at 3:17 AM Brian Masney wrote: > > > It's in low speed mode but its usable. > > How low speed is that? I don't have a number but my test with 4.17 is to run 'cat /etc/passwd > /dev/tty1

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-29 Thread Brian Masney
On Wed, May 29, 2019 at 08:41:31AM -0600, Jeffrey Hugo wrote: > On Wed, May 29, 2019 at 4:28 AM Brian Masney wrote: > > > > On Tue, May 28, 2019 at 08:53:49PM -0600, Jeffrey Hugo wrote: > > > On Tue, May 28, 2019 at 8:46 PM Brian Masney > > > wrote: > > &g

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-29 Thread Brian Masney
On Wed, May 29, 2019 at 01:58:16PM -0600, Jeffrey Hugo wrote: > On 5/29/2019 1:30 PM, Brian Masney wrote: > > On Wed, May 29, 2019 at 08:41:31AM -0600, Jeffrey Hugo wrote: > > > On Wed, May 29, 2019 at 4:28 AM Brian Masney > > > wrote: > > > > > >

Re: [Freedreno] [PATCH 6/6] drm/msm/gpu: add ocmem init/cleanup functions

2019-06-16 Thread Brian Masney
Hi Bjorn, On Sun, Jun 16, 2019 at 11:06:33AM -0700, Bjorn Andersson wrote: > > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c > > b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > > index 6f7f4114afcf..e0a9409c8a32 100644 > > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c > > +++

Re: [Freedreno] [PATCH 5/6] soc: qcom: add OCMEM driver

2019-06-17 Thread Brian Masney
Hi Rob Clark, On Sun, Jun 16, 2019 at 10:41:06AM -0700, Bjorn Andersson wrote: > > diff --git a/drivers/soc/qcom/ocmem.xml.h b/drivers/soc/qcom/ocmem.xml.h > > I would prefer that these lived at the top of the c file, rather than > being generated. I think it would be nice to make this change

[Freedreno] [PATCH v2 2/6] dt-bindings: display: msm: gmu: add optional ocmem property

2019-06-18 Thread Brian Masney
Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney --- Changes since v1: - None Documentation

[Freedreno] [PATCH v2 5/6] soc: qcom: add OCMEM driver

2019-06-18 Thread Brian Masney
driver, this is just a minimal implementation sufficient for statically allocating to the GPU it's chunk of OCMEM. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark --- Pay attention to qcom_scm_restore_sec_cfg() in the probe function, specifically the 0 as the third

[Freedreno] [PATCH v2 0/6] qcom: add OCMEM support

2019-06-18 Thread Brian Masney
patches for the changelog. This was tested with the GPU on a LG Nexus 5 (hammerhead) phone and this will work on other msm8974-based systems. For a summary of what currently works upstream on the Nexus 5, see my status page at https://masneyb.github.io/nexus-5-upstream/. Brian Masney (4): dt

[Freedreno] [PATCH v2 6/6] drm/msm/gpu: add ocmem init/cleanup functions

2019-06-18 Thread Brian Masney
that OCMEM support is upstream. Signed-off-by: Brian Masney --- Changes since v1: - remove CONFIG_QCOM_OCMEM #ifdefs - use unsigned long for memory addresses instead of uint32_t - add 'depends on QCOM_OCMEM || QCOM_OCMEM=n' to Kconfig drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm

[Freedreno] [PATCH v2 3/6] firmware: qcom: scm: add OCMEM lock/unlock interface

2019-06-18 Thread Brian Masney
From: Rob Clark Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masn...@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed

[Freedreno] [PATCH v2 4/6] firmware: qcom: scm: add support to restore secure config to qcm_scm-32

2019-06-18 Thread Brian Masney
-by: Brian Masney --- Changes since v1: - Use existing __qcom_scm_restore_sec_cfg() function stub in qcom_scm-32.c that was unimplemented - Set the cfg.ctx_bank_num to the spare function parameter. It was previously set to the device_id. drivers/firmware/qcom_scm-32.c | 17

[Freedreno] [PATCH v2 1/6] dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings

2019-06-18 Thread Brian Masney
Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney --- Changes since v1: - Rename qcom,ocmem-msm8974 to qcom,msm8974-ocmem - Renamed reg-names to ctrl and mem - update hardware description - moved from soc to sram

Re: [Freedreno] [PATCH v2 5/6] soc: qcom: add OCMEM driver

2019-06-19 Thread Brian Masney
On Tue, Jun 18, 2019 at 10:32:08PM -0400, Brian Masney wrote: > +++ b/include/soc/qcom/ocmem.h > @@ -0,0 +1,62 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * The On Chip Memory (OCMEM) allocator allows various clients to allocate > + * memory from OCMEM based on pe

Re: [Freedreno] [PATCH 2/6] dt-bindings: display: msm: gmu: add optional ocmem property

2019-06-20 Thread Brian Masney
On Wed, Jun 19, 2019 at 01:21:20PM -0700, Rob Clark wrote: > On Wed, Jun 19, 2019 at 1:17 PM Rob Herring wrote: > > > > On Sun, Jun 16, 2019 at 7:29 AM Brian Masney wrote: > > > > > > Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and > &g

Re: [Freedreno] [PATCH RFC 4/6] ARM: dts: msm8974: add display support

2019-05-09 Thread Brian Masney
On Wed, May 08, 2019 at 08:00:47PM -0700, Bjorn Andersson wrote: > On Wed 08 May 19:25 PDT 2019, Rob Clark wrote: > > > On Wed, May 8, 2019 at 7:16 PM Brian Masney wrote: > > > > > > On Mon, May 06, 2019 at 11:39:02PM -0700, Bjorn Andersson wrote: > > >

Re: [Freedreno] [PATCH v2 1/6] drm: msm: remove resv fields from msm_gem_object struct

2019-05-13 Thread Brian Masney
On Mon, May 13, 2019 at 01:32:39PM -0700, Bjorn Andersson wrote: > On Wed 08 May 19:03 PDT 2019, Brian Masney wrote: > > > The msm_gem_object structure contains resv and _resv fields that are > > no longer needed since the reservation object is now stored on

[Freedreno] [PATCH 2/2] drm/msm: correct attempted NULL pointer dereference in debugfs

2019-05-13 Thread Brian Masney
msm_gem_describe() would attempt to dereference a NULL pointer via the address space pointer when no IOMMU is present. Correct this by adding the appropriate check. Signed-off-by: Brian Masney Fixes: 575f0485508b ("drm/msm: Clean up and enhance the output of the 'gem' debugfs

[Freedreno] [PATCH v2.1 1/2] drm/msm: remove resv fields from msm_gem_object struct

2019-05-13 Thread Brian Masney
pointer. Correct those two cases to point to the correct reservation object. Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson Fixes: dd55cf6929e6 ("drm: msm: Switch to use drm_gem_object reservation_object") --- This is a split out version of this

[Freedreno] [PATCH v2 3/6] ARM: qcom_defconfig: add display-related options

2019-05-08 Thread Brian Masney
Add the CMA (Contiguous Memory Allocator) for the MSM DRM driver, the simple panel, and the TI LM3630A driver in order to support the display on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- Changes since v1: - None arch/arm/configs

[Freedreno] [PATCH v2 6/6] ARM: dts: qcom: msm8974-hammerhead: add support for display

2019-05-08 Thread Brian Masney
Add initial support for the display found on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- Changes since v1: - None .../qcom-msm8974-lge-nexus5-hammerhead.dts| 45 +++ 1 file changed, 45 insertions(+) diff --git a/arch/arm

[Freedreno] [PATCH v2 5/6] ARM: dts: qcom: msm8974-hammerhead: add support for backlight

2019-05-08 Thread Brian Masney
Add necessary device tree nodes for the main LCD backlight. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- This requires this series that should be merged soon: https://lore.kernel.org/lkml/20190424092505.6578-1-masn...@onstation.org/ The device tree bindings have been reviewed

[Freedreno] [PATCH v2 4/6] ARM: dts: msm8974: add display support

2019-05-08 Thread Brian Masney
Add the MDP5, DSI and DSI PHY blocks for the display found on the msm8974 SoCs. This is based on work from msm8916.dtsi and Jonathan Marek. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij --- Changes since v1: - None arch/arm/boot/dts/qcom-msm8974.dtsi | 132

[Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-08 Thread Brian Masney
drm_plane_enable_fb_damage_clips() to plane init for mdp4, mdp5, and dpu1. - Add Linus Walleij's reviewed-by to patches 3-6 Brian Masney (6): drm: msm: remove resv fields from msm_gem_object struct drm: msm: add dirty framebuffer helper ARM: qcom_defconfig: add display-related options ARM: dts: msm8974: add display

[Freedreno] [PATCH v2 1/6] drm: msm: remove resv fields from msm_gem_object struct

2019-05-08 Thread Brian Masney
pointer. Correct those two cases to point to the correct reservation object. Signed-off-by: Brian Masney Fixes: dd55cf6929e6 ("drm: msm: Switch to use drm_gem_object reservation_object") --- Patch introduced in v2 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 +--- drivers/g

[Freedreno] [PATCH RFC v2 2/6] drm: msm: add dirty framebuffer helper

2019-05-08 Thread Brian Masney
Use drm_atomic_helper_dirtyfb() as the dirty callback in the msm_framebuffer_funcs struct. Call drm_plane_enable_fb_damage_clips() when the planes are initialized in mdp4, mdp5, and dpu1. Signed-off-by: Brian Masney --- Changes since v1: - Add drm_plane_enable_fb_damage_clips() to plane init

Re: [Freedreno] [PATCH RFC 4/6] ARM: dts: msm8974: add display support

2019-05-08 Thread Brian Masney
On Mon, May 06, 2019 at 11:39:02PM -0700, Bjorn Andersson wrote: > On Sun 05 May 06:04 PDT 2019, Brian Masney wrote: > > diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi > > b/arch/arm/boot/dts/qcom-msm8974.dtsi > [..] > > +

Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-08 Thread Brian Masney
On Wed, May 08, 2019 at 10:03:46PM -0400, Brian Masney wrote: > Here is a patch series that adds initial display support for the LG > Nexus 5 (hammerhead) phone. It's not fully working so that's why some > of these patches are RFC until we can get it fully working. > > T

Re: [Freedreno] [PATCH RFC 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-06 Thread Brian Masney
On Mon, May 06, 2019 at 08:42:36AM +0200, Linus Walleij wrote: > On Sun, May 5, 2019 at 3:04 PM Brian Masney wrote: > > > mdp5_get_scanoutpos() and mdp5_get_vblank_counter() both return 0, which > > is causing this stack trace to be dumped into the system log

[Freedreno] [PATCH RFC 2/6] drm/msm: add dirty framebuffer helper

2019-05-05 Thread Brian Masney
Add drm_atomic_helper_dirtyfb() callback to the msm framebuffer driver for the dirty ioctl. Signed-off-by: Brian Masney --- drivers/gpu/drm/msm/msm_fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c index 136058978e0f

[Freedreno] [PATCH RFC 1/6] drm/msm: fix null pointer dereference in msm_atomic_prepare_fb()

2019-05-05 Thread Brian Masney
_msm_gem_new() calls msm_gem_new_impl() with a NULL reservation_object struct. msm_atomic_prepare_fb() assumes that the reservation_object is always set, and attempts to reference a NULL pointer. Correct this by checking to see if this value is NULL. Signed-off-by: Brian Masney --- drivers/gpu

[Freedreno] [PATCH RFC 6/6] ARM: dts: qcom: msm8974-hammerhead: add support for display

2019-05-05 Thread Brian Masney
Add initial support for the display found on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney --- See the cover letter on this patch series for details about the issue that I'm running into with this board. .../qcom-msm8974-lge-nexus5-hammerhead.dts| 45 +++ 1

[Freedreno] [PATCH RFC 0/6] ARM: qcom: initial Nexus 5 display support

2019-05-05 Thread Brian Masney
of power on commands listed in the downstream device tree that aren't listed in mipi_display.h. Thanks in advance for any advice that you can provide. Brian Masney (6): drm/msm: fix null pointer dereference in msm_atomic_prepare_fb() drm/msm: add dirty framebuffer helper ARM: qcom_defconfig: add

[Freedreno] [PATCH RFC 5/6] ARM: dts: qcom: msm8974-hammerhead: add support for backlight

2019-05-05 Thread Brian Masney
Add necessary device tree nodes for the main LCD backlight. Signed-off-by: Brian Masney --- This requires this series that I submitted to the LED / backlight subsystem: https://lore.kernel.org/lkml/20190424092505.6578-1-masn...@onstation.org/ It's received 3 {Reviewed,Acked}-Bys, and has

[Freedreno] [PATCH RFC 4/6] ARM: dts: msm8974: add display support

2019-05-05 Thread Brian Masney
Add the MDP5, DSI and DSI PHY blocks for the display found on the msm8974 SoCs. This is based on work from msm8916.dtsi and Jonathan Marek. Signed-off-by: Brian Masney --- arch/arm/boot/dts/qcom-msm8974.dtsi | 132 1 file changed, 132 insertions(+) diff --git

[Freedreno] [PATCH RFC 3/6] ARM: qcom_defconfig: add display-related options

2019-05-05 Thread Brian Masney
Add the CMA (Contiguous Memory Allocator) for the MSM DRM driver, the simple panel, and the TI LM3630A driver in order to support the display on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney --- The panel and backlight are currently compiled into the kernel, but will be moved

[Freedreno] [PATCH] drm/msm/phy/dsi_phy: silence -EPROBE_DEFER warnings

2019-07-06 Thread Brian Masney
dsi_phy_regulator_init() already logs the error, so no need to log the same error a second time in dsi_phy_driver_probe(). This patch also changes dsi_phy_regulator_init() to not log the error if the error code is -EPROBE_DEFER to reduce noise in dmesg. Signed-off-by: Brian Masney --- drivers/gpu

[Freedreno] [PATCH] drm/msm: correct NULL pointer dereference in context_init

2019-06-26 Thread Brian Masney
Correct attempted NULL pointer dereference in context_init() when running without an IOMMU. Signed-off-by: Brian Masney Fixes: 295b22ae596c ("drm/msm: Pass the MMU domain index in struct msm_file_private") --- The no IOMMU case seems like functionality that we may want to

[Freedreno] [PATCH v3 4/6] firmware: qcom: scm: add support to restore secure config to qcm_scm-32

2019-06-25 Thread Brian Masney
-by: Brian Masney --- Changes since v2: - None Changes since v1: - Use existing __qcom_scm_restore_sec_cfg() function stub in qcom_scm-32.c that was unimplemented - Set the cfg.ctx_bank_num to the spare function parameter. It was previously set to the device_id. drivers/firmware/qcom_scm-32

[Freedreno] [PATCH v3 5/6] soc: qcom: add OCMEM driver

2019-06-25 Thread Brian Masney
to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark --- Changes since v2 - Changed static inline stubs

[Freedreno] [PATCH v3 3/6] firmware: qcom: scm: add OCMEM lock/unlock interface

2019-06-25 Thread Brian Masney
From: Rob Clark Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masn...@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed

[Freedreno] [PATCH v3 6/6] drm/msm/gpu: add ocmem init/cleanup functions

2019-06-25 Thread Brian Masney
The files a3xx_gpu.c and a4xx_gpu.c have ifdefs for the OCMEM support that was missing upstream. Add two new functions (adreno_gpu_ocmem_init and adreno_gpu_ocmem_cleanup) that removes some duplicated code. Signed-off-by: Brian Masney --- Changes since v2: - Check for -ENODEV error of_get_ocmem

[Freedreno] [PATCH v3 0/6] qcom: add OCMEM support

2019-06-25 Thread Brian Masney
patches for the changelog. This was tested with the GPU on a LG Nexus 5 (hammerhead) phone and this will work on other msm8974-based systems. For a summary of what currently works upstream on the Nexus 5, see my status page at https://masneyb.github.io/nexus-5-upstream/. Brian Masney (4): dt

[Freedreno] [PATCH v3 1/6] dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings

2019-06-25 Thread Brian Masney
Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney --- Changes since v2: - Add *-sram node and gmu-sram to example. Changes since v1: - Rename qcom,ocmem-msm8974 to qcom,msm8974-ocmem - Renamed reg-names to ctrl

[Freedreno] [PATCH v3 2/6] dt-bindings: display: msm: gmu: add optional ocmem property

2019-06-25 Thread Brian Masney
Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney --- Changes since v2: - Add a3xx example with OCMEM

[Freedreno] [PATCH v4 1/6] dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings

2019-08-03 Thread Brian Masney
Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney --- Changes since v3 - add ranges property - remove unnecessary literal block | - add #address-cells and #size-cells to binding - rename path devicetree/bindings

[Freedreno] [PATCH v4 2/6] dt-bindings: display: msm: gmu: add optional ocmem property

2019-08-03 Thread Brian Masney
Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney --- Changes since v3: - correct link to qcom

[Freedreno] [PATCH v4 5/6] soc: qcom: add OCMEM driver

2019-08-03 Thread Brian Masney
to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark --- Changes since v3: - None Changes since v2

[Freedreno] [PATCH v4 3/6] firmware: qcom: scm: add OCMEM lock/unlock interface

2019-08-03 Thread Brian Masney
From: Rob Clark Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masn...@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed

[Freedreno] [PATCH v4 0/6] qcom: add OCMEM support

2019-08-03 Thread Brian Masney
patches for the changelog. This was tested with the GPU on a LG Nexus 5 (hammerhead) phone and this will work on other msm8974-based systems. For a summary of what currently works upstream on the Nexus 5, see my status page at https://masneyb.github.io/nexus-5-upstream/. Brian Masney (4): dt

[Freedreno] [PATCH v4 6/6] drm/msm/gpu: add ocmem init/cleanup functions

2019-08-03 Thread Brian Masney
The files a3xx_gpu.c and a4xx_gpu.c have ifdefs for the OCMEM support that was missing upstream. Add two new functions (adreno_gpu_ocmem_init and adreno_gpu_ocmem_cleanup) that removes some duplicated code. Signed-off-by: Brian Masney --- Changes since v3: - None Changes since v2: - Check

[Freedreno] [PATCH v4 4/6] firmware: qcom: scm: add support to restore secure config to qcm_scm-32

2019-08-03 Thread Brian Masney
-by: Brian Masney --- Changes since v3: - None Changes since v2: - None Changes since v1: - Use existing __qcom_scm_restore_sec_cfg() function stub in qcom_scm-32.c that was unimplemented - Set the cfg.ctx_bank_num to the spare function parameter. It was previously set to the device_id

[Freedreno] [PATCH 09/11] ARM: dts: qcom: pm8941: add 5vs2 regulator node

2019-08-14 Thread Brian Masney
-by: Brian Masney --- arch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi index f198480c8ef4..c1f2012d1c8b 100644 --- a/arch/arm/boot/dts/qcom-pm8941.dtsi +++ b/arch/arm/boot/dts

[Freedreno] [PATCH 05/11] drm/bridge: analogix-anx78xx: correct value of TX_P0

2019-08-14 Thread Brian Masney
. [1] https://github.com/AICP/kernel_lge_hammerhead/blob/n7.1/drivers/video/slimport/slimport_tx_reg.h Signed-off-by: Brian Masney --- drivers/gpu/drm/bridge/analogix-anx78xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.h b/drivers

[Freedreno] [PATCH RFC 11/11] ARM: dts: qcom: msm8974-hammerhead: add support for external display

2019-08-14 Thread Brian Masney
Add HDMI nodes and other supporting infrastructure in order to support the external display. This is based on work from Jonathan Marek. Signed-off-by: Brian Masney --- The hdmi-tx node in the downstream MSM sources: https://github.com/AICP/kernel_lge_hammerhead/blob/n7.1/arch/arm/boot/dts

[Freedreno] [PATCH RFC 06/11] drm/bridge: analogix-anx78xx: add support for avdd33 regulator

2019-08-14 Thread Brian Masney
get the external display fully working on the Nexus 5 and then I can submit proper support then that powers down this regulator in the power off function. Signed-off-by: Brian Masney --- drivers/gpu/drm/bridge/analogix-anx78xx.c | 33 +++ 1 file changed, 33 insertions(+) diff

[Freedreno] [PATCH 00/11] ARM: dts: qcom: msm8974: add support for external display

2019-08-14 Thread Brian Masney
RFC'. I'm using an Analogix Semiconductor SP6001 SlimPort Micro-USB to 4K HDMI Adapter to connect my phone to an external display via a standard HDMI cable. This works just fine with the downstream MSM kernel using Android. Brian Masney (11): dt-bindings: drm/bridge: analogix-anx78xx: add new

[Freedreno] [PATCH 04/11] drm/bridge: analogix-anx78xx: convert to i2c_new_dummy_device

2019-08-14 Thread Brian Masney
The i2c_new_dummy() function is deprecated since it returns NULL on error. Change this to use the recommended replacement i2c_new_dummy_device() that returns an error code that can be read with PTR_ERR() and friends. Signed-off-by: Brian Masney --- drivers/gpu/drm/bridge/analogix-anx78xx.c | 15

[Freedreno] [PATCH 01/11] dt-bindings: drm/bridge: analogix-anx78xx: add new variants

2019-08-14 Thread Brian Masney
Add support for the analogix,anx7808, analogix,anx7812, and analogix,anx7818 variants. Signed-off-by: Brian Masney --- .../devicetree/bindings/display/bridge/anx7814.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display

[Freedreno] [PATCH 07/11] ARM: qcom_defconfig: add CONFIG_DRM_ANALOGIX_ANX78XX

2019-08-14 Thread Brian Masney
Add CONFIG_DRM_ANALOGIX_ANX78XX as a module so that the external display can be used on the Nexus 5 phones. Signed-off-by: Brian Masney --- arch/arm/configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig index

[Freedreno] [PATCH RFC 10/11] ARM: dts: qcom: msm8974: add HDMI nodes

2019-08-14 Thread Brian Masney
Add HDMI tx and phy nodes to support an external display that can be connected over the SlimPort. This is based on work from Jonathan Marek. Signed-off-by: Brian Masney --- The hdmi-tx node in the downstream MSM sources: https://github.com/AICP/kernel_lge_hammerhead/blob/n7.1/arch/arm/boot/dts

[Freedreno] [PATCH 08/11] drm/msm/hdmi: silence -EPROBE_DEFER warning

2019-08-14 Thread Brian Masney
Silence a warning message due to an -EPROBE_DEFER error to help cleanup the system boot log. Signed-off-by: Brian Masney --- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm

[Freedreno] [PATCH 02/11] drm/bridge: analogix-anx78xx: add new variants

2019-08-14 Thread Brian Masney
Add support for the 7808 variant. While we're here, the of match table was missing support for the 7812 and 7818 variants, so add them as well. Signed-off-by: Brian Masney --- drivers/gpu/drm/bridge/analogix-anx78xx.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm

[Freedreno] [PATCH 03/11] drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings

2019-08-14 Thread Brian Masney
Silence two warning messages that occur due to -EPROBE_DEFER errors to help cleanup the system boot log. Signed-off-by: Brian Masney --- drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix

Re: [Freedreno] [PATCH 09/11] ARM: dts: qcom: pm8941: add 5vs2 regulator node

2019-08-15 Thread Brian Masney
On Thu, Aug 15, 2019 at 10:34:17AM +0200, Linus Walleij wrote: > On Thu, Aug 15, 2019 at 2:49 AM Brian Masney wrote: > > > pm8941 is missing the 5vs2 regulator node so let's add it since its > > needed to get the external display working. This regulator was alre

Re: [Freedreno] [PATCH RFC 06/11] drm/bridge: analogix-anx78xx: add support for avdd33 regulator

2019-08-15 Thread Brian Masney
On Thu, Aug 15, 2019 at 10:22:45AM +0200, Linus Walleij wrote: > On Thu, Aug 15, 2019 at 2:49 AM Brian Masney wrote: > > > Add support for the avdd33 regulator to the analogix-anx78xx driver. > > Note that the regulator is currently enabled during driver probe and > >

Re: [Freedreno] [PATCH 1/7] drm/msm/mdp4: Drop unused GPIO include

2019-08-12 Thread Brian Masney
Walleij For the series: Reviewed-by: Brian Masney ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno

Re: [Freedreno] [PATCH v5 2/7] dt-bindings: display: msm: gmu: add optional ocmem property

2019-08-21 Thread Brian Masney
On Wed, Aug 21, 2019 at 02:26:02PM -0500, Rob Herring wrote: > On Mon, Aug 05, 2019 at 08:22:24PM -0400, Brian Masney wrote: > > Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and > > must use the On Chip MEMory (OCMEM) in order to be functional. Add the >

[Freedreno] [PATCH v6 1/7] dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings

2019-08-22 Thread Brian Masney
Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney Reviewed-by: Rob Herring --- Changes since v5: - None Changes since v4: - remove qcom from path in $id Changes since v3: - add ranges property - remove

[Freedreno] [PATCH v6 5/7] soc: qcom: add OCMEM driver

2019-08-22 Thread Brian Masney
to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- Changes since v5

[Freedreno] [PATCH v6 2/7] dt-bindings: display: msm: gmu: add optional ocmem property

2019-08-22 Thread Brian Masney
Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney --- Changes since v5: - rename ocmem property

[Freedreno] [PATCH v6 3/7] firmware: qcom: scm: add OCMEM lock/unlock interface

2019-08-22 Thread Brian Masney
From: Rob Clark Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masn...@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed

[Freedreno] [PATCH v6 7/7] ARM: qcom_defconfig: add ocmem support

2019-08-22 Thread Brian Masney
Add ocmem driver that's needed for some a3xx and a4xx based systems. Signed-off-by: Brian Masney --- Changes since v5: - None This patch was introduced in v5. arch/arm/configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs

[Freedreno] [PATCH v6 4/7] firmware: qcom: scm: add support to restore secure config to qcm_scm-32

2019-08-22 Thread Brian Masney
-by: Brian Masney --- Changes since v5: - None Changes since v4: - None Changes since v3: - None Changes since v2: - None Changes since v1: - Use existing __qcom_scm_restore_sec_cfg() function stub in qcom_scm-32.c that was unimplemented - Set the cfg.ctx_bank_num to the spare function

[Freedreno] [PATCH v6 6/7] drm/msm/gpu: add ocmem init/cleanup functions

2019-08-22 Thread Brian Masney
The files a3xx_gpu.c and a4xx_gpu.c have ifdefs for the OCMEM support that was missing upstream. Add two new functions (adreno_gpu_ocmem_init and adreno_gpu_ocmem_cleanup) that removes some duplicated code. Signed-off-by: Brian Masney --- Changes since v5: - None Changes since v4: - None

[Freedreno] [PATCH v6 0/7] qcom: add OCMEM support

2019-08-22 Thread Brian Masney
ocmem device tree property to sram See individual patches for changelogs for previous versions. Brian Masney (5): dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings dt-bindings: display: msm: gmu: add optional ocmem property soc: qcom: add OCMEM driver drm/msm/gpu: add ocmem init

Re: [Freedreno] [PATCH v7 0/7] qcom: add OCMEM support

2019-09-01 Thread Brian Masney
Hi Rob C / Sean P, On Fri, Aug 23, 2019 at 05:16:30AM -0700, Brian Masney wrote: > This patch series adds support for Qualcomm's On Chip MEMory (OCMEM) > that is needed in order to support some a3xx and a4xx-based GPUs > upstream. This is based on Rob Clark's patch series that he

[Freedreno] [PATCH v7 4/7] firmware: qcom: scm: add support to restore secure config to qcm_scm-32

2019-08-23 Thread Brian Masney
-by: Brian Masney Reviewed-by: Bjorn Andersson --- Changes since v6: - None Changes since v5: - None Changes since v4: - None Changes since v3: - None Changes since v2: - None Changes since v1: - Use existing __qcom_scm_restore_sec_cfg() function stub in qcom_scm-32.c that was unimplemented

[Freedreno] [PATCH v7 1/7] dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings

2019-08-23 Thread Brian Masney
Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney Reviewed-by: Rob Herring --- Changes since v6: - None Changes since v5: - None Changes since v4: - remove qcom from path in $id Changes since v3: - add ranges

[Freedreno] [PATCH v7 2/7] dt-bindings: display: msm: gmu: add optional ocmem property

2019-08-23 Thread Brian Masney
Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney --- Changes since v6: - link to gmu-sram in example

[Freedreno] [PATCH v7 3/7] firmware: qcom: scm: add OCMEM lock/unlock interface

2019-08-23 Thread Brian Masney
From: Rob Clark Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masn...@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed

[Freedreno] [PATCH v7 6/7] drm/msm/gpu: add ocmem init/cleanup functions

2019-08-23 Thread Brian Masney
The files a3xx_gpu.c and a4xx_gpu.c have ifdefs for the OCMEM support that was missing upstream. Add two new functions (adreno_gpu_ocmem_init and adreno_gpu_ocmem_cleanup) that removes some duplicated code. Signed-off-by: Brian Masney --- Changes since v6: - None Changes since v5: - None

[Freedreno] [PATCH v7 7/7] ARM: qcom_defconfig: add ocmem support

2019-08-23 Thread Brian Masney
Add ocmem driver that's needed for some a3xx and a4xx based systems. Signed-off-by: Brian Masney --- Changes since v6: - None Changes since v5: - None This patch was introduced in v5. arch/arm/configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs

[Freedreno] [PATCH v7 5/7] soc: qcom: add OCMEM driver

2019-08-23 Thread Brian Masney
to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- Changes since v6

[Freedreno] [PATCH v7 0/7] qcom: add OCMEM support

2019-08-23 Thread Brian Masney
to gmu-sram child node in device tree - add ranges property to ocmem example in adreno GMU example (patch 2) to match bindings in patch 1 See individual patches for changelogs for previous versions. Brian Masney (5): dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings dt-bindings

Re: [Freedreno] [PATCH 00/11] ARM: dts: qcom: msm8974: add support for external display

2019-09-16 Thread Brian Masney
Hi Andrzej, On Mon, Sep 16, 2019 at 10:13:58AM +0200, Andrzej Hajda wrote: > Hi Brian, > > On 15.08.2019 02:48, Brian Masney wrote: > > This patch series begins to add support for the external display over > > HDMI that is supported on msm8974 SoCs. I'm testing this seri

Re: [Freedreno] [PATCH 05/11] drm/bridge: analogix-anx78xx: correct value of TX_P0

2019-09-16 Thread Brian Masney
On Mon, Sep 16, 2019 at 01:32:58PM +0200, Enric Balletbo i Serra wrote: > Hi, > > On 16/9/19 12:49, Laurent Pinchart wrote: > > Hi Brian, > > > > On Mon, Sep 16, 2019 at 06:36:14AM -0400, Brian Masney wrote: > >> On Mon, Sep 16, 2019 at 12:02:09PM +0200, Andr

Re: [Freedreno] [PATCH 05/11] drm/bridge: analogix-anx78xx: correct value of TX_P0

2019-09-16 Thread Brian Masney
On Mon, Sep 16, 2019 at 12:02:09PM +0200, Andrzej Hajda wrote: > On 15.08.2019 02:48, Brian Masney wrote: > > When attempting to configure this driver on a Nexus 5 phone (msm8974), > > setting up the dummy i2c bus for TX_P0 would fail due to an -EBUSY > > error. The downstre

Re: [Freedreno] [PATCH 05/11] drm/bridge: analogix-anx78xx: correct value of TX_P0

2019-09-16 Thread Brian Masney
On Mon, Sep 16, 2019 at 12:36:19PM +0200, Enric Balletbo i Serra wrote: > Hi Andrzej and Brian > > On 16/9/19 12:02, Andrzej Hajda wrote: > > On 15.08.2019 02:48, Brian Masney wrote: > >> When attempting to configure this driver on a Nexus 5 phone (msm8974), > >

[Freedreno] [PATCH v5 5/7] soc: qcom: add OCMEM driver

2019-08-05 Thread Brian Masney
to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- Changes since v4

  1   2   >