[Bug 89829] [bisected] radeonsi, commit 2cf48c creates artefacts in some applications (worst being Flash animations that are garbage)

2015-04-02 Thread bugzilla-dae...@freedesktop.org
correctly. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150402/665d0259/attachment.html>

[Bug 89829] [bisected] radeonsi, commit 2cf48c creates artefacts in some applications (worst being Flash animations that are garbage)

2015-04-02 Thread bugzilla-dae...@freedesktop.org
) libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x7f5b85094000) libnsl.so.1 => /usr/lib/libnsl.so.1 (0x7f5b84e7c000) libattr.so.1 => /usr/lib/libattr.so.1 (0x7f5b84c77000) -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150402/17c986d4/attachment-0001.html>

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread Emil Velikov
On 2 April 2015 at 19:07, wrote: > Thanks Emil. Please check the comments embedded and for the rest I will > update the code. > >> Hi Jilai, >> >> Just a few questions, not really a review as I'm not that familiar >> with the code. >> >> >>> +++ b/drivers/gpu/drm/msm/Kconfig >>> @@ -27,6 +27,16 @

[PATCH drm] drm/vgem: vgem_gem_dumb_map() can be static

2015-04-02 Thread Zachary Reizner
---- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150402/9b6d9867/attachment.html>

[GIT PULL] exynos-drm-fixes

2015-04-02 Thread inki....@samsung.com
Hi Dave, Fix display on issue to Exynos5250 based Snow(1366x768) board. Please kindly let me know if there is any problem. Thanks, Inki Dae The following changes since commit 91fd89660ba2e8ee59a587294fa9b17761691b05: Merge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/l

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread Paul Bolle
LANE; > >> + q->io_modes = VB2_DMABUF; > >> + q->drv_priv = dev; > >> + q->buf_struct_size = sizeof(struct msm_wb_v4l2_buffer); > >> + q->ops = &msm_wb_vb2_ops; > >> + q->mem_ops = &msm_wb_vb2_mem_ops; > >> + q-

[PATCH RFC 005/111] staging: etnaviv: remove IOMMUv2 stubs

2015-04-02 Thread Lucas Stach
Am Donnerstag, den 02.04.2015, 12:14 -0500 schrieb Robert Nelson: > On Thu, Apr 2, 2015 at 10:29 AM, Lucas Stach > wrote: > > IOMMUv2 support isn't implemented yet, so don't pretend it is there. > > > > Signed-off-by: Lucas Stach > > --- > > drivers/staging/etnaviv/etnaviv_gpu.c | 10 +

[GIT PULL] drm/panel: Changes for v4.1-rc1

2015-04-02 Thread Thierry Reding
Hi Dave, The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539: Linux 4.0-rc1 (2015-02-22 18:21:14 -0800) are available in the git repository at: git://anongit.freedesktop.org/tegra/linux tags/drm/panel/for-4.1-rc1 for you to fetch changes up to 1c550fa193d08920255240

[PATCH] drm/bridge: dw-hdmi: Staticize dw_hdmi_bridge_funcs

2015-04-02 Thread Fabio Estevam
From: Fabio Estevam Staticize dw_hdmi_bridge_funcs to fix the following sparse warning: drivers/gpu/drm/bridge/dw_hdmi.c:1458:25: warning: symbol 'dw_hdmi_bridge_funcs' was not declared. Should it be static? Signed-off-by: Fabio Estevam --- drivers/gpu/drm/bridge/dw_hdmi.c | 2 +- 1 file cha

[GIT PULL] drm/tegra: Changes for v4.1-rc1

2015-04-02 Thread Thierry Reding
Hi Dave, The following changes since commit 13a7a6ac0a11197edcd0f756a035f472b42cdf8b: Linux 4.0-rc2 (2015-03-03 09:04:59 -0800) are available in the git repository at: git://anongit.freedesktop.org/tegra/linux tags/drm/tegra/for-4.1-rc1 for you to fetch changes up to 535a65db484ff4e4654a03

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread jil...@codeaurora.org
intf() into just "msm_wb". >>> > >>> >> + ret = v4l2_device_register(NULL, &dev->v4l2_dev); >>> >> + if (ret) >>> >> + goto free_dev; >>> >> + >>> >> + /* default ARGB

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread jil...@codeaurora.org
intf() into just "msm_wb". >>> > >>> >> + ret = v4l2_device_register(NULL, &dev->v4l2_dev); >>> >> + if (ret) >>> >> + goto free_dev; >>> >> + >>> >> + /* default ARGB

[PATCH] drm/exynos: dsi: remove the empty mode_valid callback

2015-04-02 Thread Hyungwon Hwang
Because the helper function which calls this callback checks whether it is registered or not. It is not necessary if it does nothing. So it would be better to remove the function for clarity. Signed-off-by: Hyungwon Hwang --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 7 --- 1 file changed, 7

[PATCH RFC 087/111] staging: etnaviv: align command stream size to 64 bit

2015-04-02 Thread Lucas Stach
Am Donnerstag, den 02.04.2015, 17:45 +0100 schrieb Russell King - ARM Linux: > On Thu, Apr 02, 2015 at 06:29:24PM +0200, Lucas Stach wrote: > > The start of the commands must always be 64bit aligned, it's the same > > for all pipes. The size can be dword aligned if the last command in the > > strea

[PATCH RFC 090/111] staging: etnaviv: fix cache cleaning for uncached SHM buffers

2015-04-02 Thread Lucas Stach
Am Donnerstag, den 02.04.2015, 17:22 +0100 schrieb Russell King - ARM Linux: > On Thu, Apr 02, 2015 at 05:30:32PM +0200, Lucas Stach wrote: > > The intention clearly was to do the same thing for WC and UC buffers, > > not for cached ones. > > Err, from one of my previous commits: > > staging:

[PATCH RFC 087/111] staging: etnaviv: align command stream size to 64 bit

2015-04-02 Thread Lucas Stach
Am Donnerstag, den 02.04.2015, 17:20 +0100 schrieb Russell King - ARM Linux: > On Thu, Apr 02, 2015 at 05:30:29PM +0200, Lucas Stach wrote: > > It is legal for the userspace to pass in a command stream of a size > > aligned to 32 bit, if that is where the last user command ends. The > > kernel then

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread jil...@codeaurora.org
Thanks Emil. Please check the comments embedded and for the rest I will update the code. > Hi Jilai, > > Just a few questions, not really a review as I'm not that familiar > with the code. > > >> +++ b/drivers/gpu/drm/msm/Kconfig >> @@ -27,6 +27,16 @@ config DRM_MSM_FBDEV >> support. Not

[PATCH 10/10] drm/exynos: atomic dpms support

2015-04-02 Thread Joonyoung Shim
Hi, On 03/31/2015 04:11 AM, Gustavo Padovan wrote: > From: Gustavo Padovan > > Run dpms operations through the atomic intefaces. This basically removes > the .dpms() callback from econders and crtcs and use .disable() and > .enable() to turn the crtc on and off. > > Signed-off-by: Gustavo Padov

[PATCH RFC 000/111] Etnaviv DRM driver

2015-04-02 Thread Lucas Stach
Am Donnerstag, den 02.04.2015, 16:43 +0100 schrieb Russell King - ARM Linux: > On Thu, Apr 02, 2015 at 05:29:02PM +0200, Lucas Stach wrote: > > Hey all, > > > > this is the Etnaviv DRM driver for Vivante embedded GPUs. It is heavily > > influenced by the MSM driver, as can be clearly seen with the

[PATCH 2/3] drm:msm: Initial Add Writeback Support

2015-04-02 Thread jil...@codeaurora.org
Thanks Paul. Some comments embedded and for the rest I will update the code accordingly. > A few nits follow. > > On Wed, 2015-04-01 at 17:12 -0400, Jilai Wang wrote: >> --- a/drivers/gpu/drm/msm/Kconfig >> +++ b/drivers/gpu/drm/msm/Kconfig > >> +config DRM_MSM_WB >> +bool "Enable writeback su

[PATCH v2 3/4] Add virtio gpu driver.

2015-04-02 Thread Marc-André Lureau
should be changed: + BUG_ON(size >= MAX_INLINE_CMD_SIZE); -- Marc-André Lureau -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150402/8b8205a9/attachment-0001.html>

[PATCH] drm/msm/hdmi: add hdmi hdcp support (V3)

2015-04-02 Thread Jilai Wang
Add HDMI HDCP support including HDCP PartI/II/III authentication. V1: Initial Change V2: Address Bjorn&Rob's comments Refactor the authentication process to use single work instead of multiple work for different authentication stages. V3: Update to align with qcom SCM api. Signed-off-by: J

[PATCH RFC 087/111] staging: etnaviv: align command stream size to 64 bit

2015-04-02 Thread Russell King - ARM Linux
On Thu, Apr 02, 2015 at 06:29:24PM +0200, Lucas Stach wrote: > The start of the commands must always be 64bit aligned, it's the same > for all pipes. The size can be dword aligned if the last command in the > stream is something like SET_STATE with a length of 2. In that case one > needs to insert

[PATCH 09/10] drm/exynos: remove exported functions from exynos_drm_plane

2015-04-02 Thread Joonyoung Shim
Hi, On 03/28/2015 12:58 AM, Gustavo Padovan wrote: > From: Gustavo Padovan > > Now that no one is using the functions exported by exynos_drm_plane due > to the atomic conversion we can make remove some of the them or make them > static. > > Signed-off-by: Gustavo Padovan > --- > drivers/gpu/d

[PATCH RFC 102/111] staging: etnaviv: separate GPU pipes from execution state

2015-04-02 Thread Russell King - ARM Linux
On Thu, Apr 02, 2015 at 05:30:44PM +0200, Lucas Stach wrote: > While this isn't the case on i.MX6 a single GPU pipe can have > multiple rendering backend states, which can be selected by the > pipe switch command, so there is no strict mapping between the > user "pipes" and the PIPE_2D/PIPE_3D exec

[PATCH RFC 111/111] ARM: imx6: add Vivante GPU nodes

2015-04-02 Thread Lucas Stach
This adds the device nodes for 2D, 3D and VG GPU cores. Signed-off-by: Lucas Stach --- arch/arm/boot/dts/imx6dl.dtsi | 5 + arch/arm/boot/dts/imx6q.dtsi | 14 ++ arch/arm/boot/dts/imx6qdl.dtsi | 19 +++ 3 files changed, 38 insertions(+) diff --git a/arch/arm/

[PATCH RFC 110/111] staging: etnaviv: some final trivial changes to the module

2015-04-02 Thread Lucas Stach
- correct license to the proper GPLv2 - add correct author names - remove double MODULE_DEVICE_TABLE - update driver date Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/etnaviv

[PATCH RFC 109/111] staging: etnaviv: add proper license header to all files

2015-04-02 Thread Lucas Stach
Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_buffer.c | 2 +- drivers/staging/etnaviv/etnaviv_cmd_parser.c | 16 drivers/staging/etnaviv/etnaviv_drv.c| 3 +-- drivers/staging/etnaviv/etnaviv_drv.h| 3 +-- drivers/staging/etnaviv/etnaviv_ge

[PATCH RFC 108/111] staging: etnaviv: quiten down kernel log output

2015-04-02 Thread Lucas Stach
From: Christian Gmeiner There is no need to spam the kernel logs with the GPU specs and features at startup. If someone wants to know about this stuff debugfs should be the right place to look at. Also use better format specifiers to make it easier for humans to read. Signed-off-by: Christian G

[PATCH RFC 107/111] staging: etnaviv: rename last remaining bits from msm to etnaviv

2015-04-02 Thread Lucas Stach
Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c| 6 +++--- drivers/staging/etnaviv/etnaviv_drv.h| 7 +++ drivers/staging/etnaviv/etnaviv_gem.c| 8 drivers/staging/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/staging/etnaviv/etnaviv_gpu.c

[PATCH RFC 106/111] staging: etnaviv: properly prefix all prime functions to etnaviv

2015-04-02 Thread Lucas Stach
This is a simple rename without functional changes. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c | 10 +- drivers/staging/etnaviv/etnaviv_drv.h | 12 ++-- drivers/staging/etnaviv/etnaviv_gem.c | 2 +- drivers/staging/etnaviv/etnaviv_gem_

[PATCH RFC 105/111] staging: etnaviv: prune dumb buffer support

2015-04-02 Thread Lucas Stach
Dumb buffers must be only used as backing storage for scanout only surfaces. Any acceleration operation on them is not allowed. So there is no point in having dumb buffer support in a driver that isn't able to drive any scanout hardware. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/et

[PATCH RFC 104/111] staging: etnaviv: clean up public API

2015-04-02 Thread Lucas Stach
Drop the last remaining MSM bits and things we don't need for Vivante GPUs. Those include shifting and or-ing of reloc addresses and IB buffers. Signed-off-by: Russell King Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gem_submit.c | 9 + include/uapi/drm/etnaviv_drm.h

[PATCH RFC 103/111] staging: etnaviv: make sure to unlock DRM mutex when component bind fails

2015-04-02 Thread Lucas Stach
In case the component bind fails the mutex should not be left locked. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/drivers/staging/etnaviv/etnaviv_drv.c index 8

[PATCH RFC 102/111] staging: etnaviv: separate GPU pipes from execution state

2015-04-02 Thread Lucas Stach
While this isn't the case on i.MX6 a single GPU pipe can have multiple rendering backend states, which can be selected by the pipe switch command, so there is no strict mapping between the user "pipes" and the PIPE_2D/PIPE_3D execution states. We need to respect this in the public userspace API. T

[PATCH RFC 101/111] staging: etnaviv: don't override platform provided IRQ flags

2015-04-02 Thread Lucas Stach
The platform should specify the appropriate IRQ flags and it's a really bad idea to override them in individual drivers. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_gp

[PATCH RFC 100/111] staging: etnaviv: use more natural devicetree abstraction

2015-04-02 Thread Lucas Stach
The GPU cores are possibly scattered in the SoC address space, so the current abstraction of having a parent node for the master device and the cores as child nodes doesn't fit too well. Instead take the same approach as with imx-drm to have a logical master node that refers to the other component

[PATCH RFC 099/111] staging: etnaviv: add flag to force buffer through MMU

2015-04-02 Thread Lucas Stach
At least the GC2000 I'm testing with seems to have a bug that all vertex streams have to be mapped either through the MMU or without it. Mixing between both mapping types in a single draw command results in corrupted vertex data. As we can not quarantee that a buffer may be mappable without the MM

[PATCH RFC 098/111] staging: etnaviv: flush MMU when switching context

2015-04-02 Thread Lucas Stach
The MMU needs to be flushed when changing the render context to get rid of stale TLB entries left behind by the last context. While we do not support context switching between different processes yet this commit fixes memory corruptions seen when executing different 3D applications one after anoth

[PATCH RFC 097/111] staging: etnaviv: use GPU device to construct MMU

2015-04-02 Thread Lucas Stach
The MMU is per GPU (pipe), rather than per DRM device, so it makes a lot more sense to use the GPU device instead of the DRM device for the MMU to hang off from. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gpu.c | 2 +- drivers/staging/etnaviv/etnaviv_mmu.c | 2 +- drivers/sta

[PATCH RFC 096/111] staging: etnaviv: don't pretend to have a single MMU

2015-04-02 Thread Lucas Stach
Each pipe has it's own MMU, so there is no point in pretending to have a single one at the DRM driver level. All MMU management has to happen on a per-pipe level. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c | 7 --- drivers/staging/etnaviv/etnaviv_drv.h | 5 - dr

[PATCH RFC 095/111] staging: etnaviv: allow to map buffer object into multiple address spaces

2015-04-02 Thread Lucas Stach
As single buffer object may be mapped into different address spaces at the same time. For now we only have two different address spaces for the 3D and 2D pipe, but this may change as soon as we implement per-process page tables. Allow this by having each buffer object manage a list of all it's map

[PATCH RFC 094/111] staging: etnaviv: plug in fence waiting in cpu_prepare

2015-04-02 Thread Lucas Stach
Allows userspace to properly synchronize with the GPU when accessing buffers. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gem.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnav

[PATCH RFC 093/111] staging: etnaviv: take gpu instead of pipe as input to fence wait function

2015-04-02 Thread Lucas Stach
Other users may only have the gpu pointer available and it's easy to convert from pipe to gpu in the ioctl path. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_drv.c | 24 +--- drivers/staging/etnaviv/etnaviv_drv.h | 5 +++-- 2 files changed, 16 insertions(+)

[PATCH RFC 092/111] staging: etnaviv: convert to_etnaviv_bo() to real function

2015-04-02 Thread Lucas Stach
This provides a bit more type safety. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gem.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/etnaviv/etnaviv_gem.h b/drivers/staging/etnaviv/etnaviv_gem.h index cfade337d4db..fadd5198b3e8 100

[PATCH RFC 091/111] staging: etnaviv: properly flush all TLBs on MMUv1

2015-04-02 Thread Lucas Stach
Avoids memory corruptions seen due to stale TLB entries. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_buffer.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/etnaviv/etnaviv_buffer.c b/drivers/staging/etnaviv/etnaviv_buffer.c index 391b

[PATCH RFC 090/111] staging: etnaviv: fix cache cleaning for uncached SHM buffers

2015-04-02 Thread Lucas Stach
The intention clearly was to do the same thing for WC and UC buffers, not for cached ones. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnaviv/etn

[PATCH RFC 089/111] staging: etnaviv: reconfigure bus mapping on GC2000

2015-04-02 Thread Lucas Stach
This is taken from the Vivante kernel driver and seems to improve stability and performance. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gpu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnav

[PATCH RFC 088/111] staging: etnaviv: correct instruction count for GC2000 and GC880

2015-04-02 Thread Lucas Stach
These two GPUs seems to be in the transition state between two generations and report a wrong instuction count. Fix it up in the kernel like the Vivante driver does. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_gpu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

[PATCH RFC 087/111] staging: etnaviv: align command stream size to 64 bit

2015-04-02 Thread Lucas Stach
It is legal for the userspace to pass in a command stream of a size aligned to 32 bit, if that is where the last user command ends. The kernel then needs to insert a LINK command at the end of the stream, which needs to be aligned to 64 bit, so the kernel may insert an additional 32bits of padding

[PATCH RFC 086/111] staging: etnaviv: allow to draw up to 256 rectangles in one draw call

2015-04-02 Thread Lucas Stach
The hardware interprets a value of 0 as the maximium number of rectangles which is 256. Allow this in the command parser. Signed-off-by: Lucas Stach --- drivers/staging/etnaviv/etnaviv_cmd_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/etnaviv/etnaviv_cmd_parser.c

[PATCH RFC 085/111] staging: etnaviv: add support for offset physical memory

2015-04-02 Thread Lucas Stach
From: Russell King On iMX6, memory starts at 256MB physical, and if we have 2GB of memory, this causes it to extend beyond 0x8000. All memory is available for DMA coherent allocations, which can result in the command buffers being allocated from addresses above 0x8000. However, the Viva

[PATCH RFC 084/111] staging: etnaviv: runtime PM: add initial support

2015-04-02 Thread Lucas Stach
From: Russell King Add initial runtime PM support. We manage the runtime PM state based on the events: when we allocate an event upon command submission, we "get" the runtime PM state, causing it to resume if not already resumed. When we receive an interrupt, and free an event, we "put" the run

[PATCH RFC 083/111] staging: etnaviv: add support to shutdown and restore the front end

2015-04-02 Thread Lucas Stach
From: Russell King Add support to append an END command to the GPU command stream so we cleanly shutdown the GPU on driver removal and suspend. This properly quiesces the GPU, allowing it to come back up on SoCs such as iMX6. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_buf

[PATCH RFC 082/111] staging: etnaviv: separate out etnaviv gpu hardware initialisation

2015-04-02 Thread Lucas Stach
From: Russell King We need to reprogram various registers when coming out of runtime PM, many of which are those which are setup by the main initialisation. Abstract this code out and arrange for the runtime PM resume method to call it. Signed-off-by: Russell King --- drivers/staging/etnaviv/e

[PATCH RFC 081/111] staging: etnaviv: move PM calls into bind/unbind callbacks

2015-04-02 Thread Lucas Stach
From: Russell King Power management of each GPU core should be a matter for the driver of each GPU core itself. Move the basic power management calls out of etnaviv_drv.c and into etnaviv_gpu.c so that we can add runtime PM. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.

[PATCH RFC 080/111] staging: etnaviv: move mutex around component_{un, }bind_all()

2015-04-02 Thread Lucas Stach
From: Russell King Hold the mutex while calling component_{un,}bind_all() so that components can perform initialisation in their bind and unbind callbacks from the component helper. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.c | 11 ++- drivers/staging/etnaviv/

[PATCH RFC 079/111] staging: etnaviv: NULL out stale pointers at unbind time

2015-04-02 Thread Lucas Stach
From: Russell King The etnaviv_gpu structure can have a longer lifetime than the GPU command buffer, MMU and drm_device structures. When these other structures are freed (via the unbind method) we may be tempted to access these via other functions after they've been freed. Leaving pointers in t

[PATCH RFC 078/111] staging: etnaviv: remove powerrail support

2015-04-02 Thread Lucas Stach
From: Russell King Remove the etnaviv specific power rail support, which is mostly disabled anyway. This really wants to be using the power domain support instead, which allows the SoC specifics to be abstracted from the driver, rather than a home-cooked version of it. For example, on Dove, it

[PATCH RFC 077/111] staging: etnaviv: fix event allocation failure path

2015-04-02 Thread Lucas Stach
From: Russell King If we fail to allocate an event, we leave the submitted fence number incremented. This can cause an already running hangcheck timer to believe that we should be waiting for further events when no event has actually been queued. Resolve this by moving the fence allocation (whi

[PATCH RFC 076/111] staging: etnaviv: fix busy reporting

2015-04-02 Thread Lucas Stach
From: Russell King GC600 does not set busy bits in its idle register for modules which are not present. Add handling to ensure that we don't misinterpret these zero bits as indicating that these modules are busy. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 15 +

[PATCH RFC 075/111] staging: etnaviv: allow get_param without auth

2015-04-02 Thread Lucas Stach
From: Russell King There is no need to restrict access to the get_param ioctl; this is used to obtain information about the device and has no side effects. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH RFC 074/111] staging: etnaviv: validate user supplied command stream

2015-04-02 Thread Lucas Stach
From: Russell King Parse the submitted command buffer for allowable GPU commands, and validate that all commands fit wholely within the submitted buffer. We allow the following commands: - load state - any of the draw commands - stall - nop which denies attempts to link, call, return, etc from

[PATCH RFC 073/111] staging: etnaviv: iommu: add a poisoned bad page

2015-04-02 Thread Lucas Stach
From: Russell King Add a poisoned bad page to map unused MMU entries to. This gives us a certain amount of protection against bad command streams causing us to hit regions of memory we really shouldn't be touching. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_iommu.c | 29 +

[PATCH RFC 072/111] staging: etnaviv: "better" DMA API usage

2015-04-02 Thread Lucas Stach
From: Russell King The DMA API usage by etnaviv is really not up to scratch. It does not respect the buffer ownership rules, which are vitally necessary when using DMA_BIDIRECTIONAL, as mapping /only/ cleans the cache lines, causing dirty data to be written back to RAM and an unmap /only/ invali

[PATCH RFC 071/111] staging: etnaviv: clean up etnaviv mmu scatterlist code

2015-04-02 Thread Lucas Stach
From: Russell King Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_mmu.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_mmu.c b/drivers/staging/etnaviv/etnaviv_mmu.c index 5647768c2be4..0a2f9dd5bb7a 100644 --- a/d

[PATCH RFC 070/111] staging: etnaviv: remove presumption of BO addresses

2015-04-02 Thread Lucas Stach
From: Russell King We never pass the GPU addresses of BOs to userspace, so userspace can never specify the correct address. Hence, this code serves no useful purpose, and can be removed. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.h| 1 - drivers/staging/etnav

[PATCH RFC 069/111] staging: etnaviv: move scatterlist map/unmap

2015-04-02 Thread Lucas Stach
From: Russell King Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 89 --- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnaviv/etnaviv_gem.c index 2f2bf5619ffd..8

[PATCH RFC 068/111] staging: etnaviv: fix fence wrapping for gem objects

2015-04-02 Thread Lucas Stach
From: Russell King Gem objects compared fences using simple <= tests. This is problematical when the fences wrap past (uint32_t)~0. Resolve this by using our helpers. However, this is complicated by the use of '0' to indicate that the fence has not been set (eg, because we are not writing to a

[PATCH RFC 067/111] staging: etnaviv: use definitions for constants

2015-04-02 Thread Lucas Stach
From: Russell King Use the etnaviv definitions for feature constants, rather than BIT()s. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etna

[PATCH RFC 066/111] staging: etnaviv: dump mmu allocations

2015-04-02 Thread Lucas Stach
From: Russell King Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/drivers/staging/etnaviv/etnaviv_drv.c index 568615154845..77e05b80f18d 100644 --- a/drivers/

[PATCH RFC 065/111] staging: etnaviv: allow non-DT use

2015-04-02 Thread Lucas Stach
From: Russell King Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.c | 50 --- drivers/staging/etnaviv/etnaviv_gpu.c | 18 ++--- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/

[PATCH RFC 064/111] staging: etnaviv: increase iommu page table size to 512KiB

2015-04-02 Thread Lucas Stach
From: Russell King Increase the iommu page table size to 512KiB so we can map a maximum of 512MiB of memory. GC600 (at least) seems happy with this change. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH RFC 063/111] staging: etnaviv: add workarounds for GC320 on iMX6

2015-04-02 Thread Lucas Stach
From: Russell King Add the workarounds found in the GALCORE code (and found to be required) for the GC320 2D core found on iMX6 to etnaviv. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 24 1 file changed, 24 insertions(+) diff --git a/driver

[PATCH RFC 062/111] staging: etnaviv: ensure GPU reset times out

2015-04-02 Thread Lucas Stach
From: Russell King Rather than waiting indefinitely for the GPU to reset, bound this and if it doesn't appear to be successful, bail out and report why we failed. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 32 +++- 1 file changed, 27 ins

[PATCH RFC 061/111] staging: etnaviv: ensure that we retire all pending events

2015-04-02 Thread Lucas Stach
From: Russell King If we queue up multiple buffers, each with their own event, where the first buffer takes a while to execute, but subsequent buffers do not, we can end up receiving multiple events simultaneously. (eg, 0, 1, 2). In this case, we only look at event 2, which updates the last fen

[PATCH RFC 060/111] staging: etnaviv: stop the hangcheck timer mis-firing

2015-04-02 Thread Lucas Stach
From: Russell King If we queue up a large command buffer (32K) containing about 164 1080p blit operations, it can take the GPU several seconds to complete before raising the next event. Our existing hangcheck code decides after a second that the GPU is stuck, and provokes a retirement of the eve

[PATCH RFC 059/111] staging: etnaviv: move hangcheck disable to separate function

2015-04-02 Thread Lucas Stach
From: Russell King Provide a function to safely take down the hangcheck timer and workqueue. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/sta

[PATCH RFC 058/111] staging: etnaviv: safely take down hangcheck

2015-04-02 Thread Lucas Stach
From: Russell King We need to synchronously take down the hangcheck timer, and then cancel the recovery work when we're unbinding the GPU to avoid these timers and workers running after we clean up. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gpu.c | 6 -- 1 file change

[PATCH RFC 057/111] staging: etnaviv: clean up printk()s etc

2015-04-02 Thread Lucas Stach
From: Russell King Report messages against the component device rather than the subsystem device, so that the component responsible for the message is identified rather than having to be separately formatted in the string. This ensures that many of the debug messages are properly attributed to t

[PATCH RFC 056/111] staging: etnaviv: call the DRM device 'drm'

2015-04-02 Thread Lucas Stach
From: Russell King Call the DRM device 'drm' in the etnaviv_gpu structure, so that we can add a struct device pointer. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_buffer.c | 2 +- drivers/staging/etnaviv/etnaviv_gpu.c| 74 drivers/stagi

[PATCH RFC 055/111] staging: etnaviv: add userptr mapping support

2015-04-02 Thread Lucas Stach
From: Russell King Add support for mapping userspace memory to the GPU. This is useful for cases where we have some malloc()'d memory which we wish to pass to the GPU or shmem memory via Xv, and wish to avoid the overhead of an additional memcpy(), especially as is is expensive to memcpy()ing a

[PATCH RFC 054/111] staging: etnaviv: move scatterlist creation to etnaviv_gem_get_pages()

2015-04-02 Thread Lucas Stach
From: Russell King Move the scatterlist creation from etnaviv_gem_shmem_get_pages() into etnaviv_gem_get_pages() as we always want a scatterlist internally for the IOMMU code. It makes little sense to have each get_pages() method re-implement this code. However, we still allow a get_pages() met

[PATCH RFC 053/111] staging: etnaviv: implement MMU reaping

2015-04-02 Thread Lucas Stach
From: Russell King We can easily exhaust the MMU space since we leave mappings in place until the underlying buffers are freed. Solve this by reaping inactive MMU entries using the drm_mm scanning facility to select candidate(s), which will then have their MMU mappings released. Signed-off-by:

[PATCH RFC 052/111] staging: etnaviv: fix etnaviv_iommu_map_gem() return paths

2015-04-02 Thread Lucas Stach
From: Russell King If etnaviv_iommu_map() fails, we returned an error, but we didn't clean up the allocated drm_mm node. Simplify the return path and add the necessary failure clean up. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_mmu.c | 28 +--- 1

[PATCH RFC 051/111] staging: etnaviv: implement round-robin GPU MMU allocation

2015-04-02 Thread Lucas Stach
From: Russell King In order to avoid flushing the GPU MMU every time we unmap and remap, allocate MMU addresses in a round-robin fashion. When we have to wrap back to the beginning, indicate that the MMU needs to be flushed. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_mmu.

[PATCH RFC 050/111] staging: etnaviv: hack: bypass iommu with contiguous buffers

2015-04-02 Thread Lucas Stach
From: Russell King Bypass the iommu when we are dealing with single-entry scatterlists. The etnaviv iommu code needs to be more inteligent: as it currently stands, it is unusable as it always allocates from the bottom upwards. This causes entries to be re-used without the MMU TLB being flushed,

[PATCH RFC 049/111] staging: etnaviv: move MMU setup and teardown code to etnaviv_mmu.c

2015-04-02 Thread Lucas Stach
From: Russell King Move the code which sets up and tears down the MMU mappings (iow, allocates a node in the drm_mm, and then calls the iommu to setup the actual mapping, and the reverse) into etnaviv_mmu.c Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 33

[PATCH RFC 048/111] staging: etnaviv: mmuv1: ensure we unmap all entries

2015-04-02 Thread Lucas Stach
From: Russell King Ensure that we unmap all MMU entries when unmapping a region. We fail to do this because we assume that the return value from the unmap method should be zero. It should be the size of entry which has been unmapped. Signed-off-by: Russell King --- drivers/staging/etnaviv/et

[PATCH RFC 047/111] staging: etnaviv: publish and use mmu geometry

2015-04-02 Thread Lucas Stach
From: Russell King We model the GPU MMU using the iommu layer, which supports exporting the iommu domain geometry. Use this feature to publish the size of the MMU window, and initialise the MMU drm_mm object according to the available MMU window size. As we only allocate a MMU page table which

[PATCH RFC 046/111] staging: etnaviv: move GPU memory management into MMU

2015-04-02 Thread Lucas Stach
From: Russell King The GPU memory management (managed by a drm_mm object) is used to track which areas of the MMU address space are in-use. Therefore, this should be tied to the MMU object, rather than the GPU object. This means we could (as comments suggest) have multiple MMU objects, one for

[PATCH RFC 045/111] staging: etnaviv: add support to insert a MMU flush into GPU stream

2015-04-02 Thread Lucas Stach
From: Russell King Add a flag to indicate that the GPU MMU needs to be flushed before executing the next set of command buffers. This is necessary to ensure that the GPU sees updated page table entries which may have been modified by GEM. It is expected that userspace will have flushed the cach

[PATCH RFC 044/111] staging: etnaviv: fix DMA API usage

2015-04-02 Thread Lucas Stach
From: Russell King We test for write-combine and non-cacheable mappings before calling the DMA API. This is werid, because non-cacheable mappings are DMA coherent by definition, whereas cacheable mappings need cache maintanence provided by the DMA API. This seems to be a typo: ETNA_BO_CACHED sh

[PATCH RFC 043/111] staging: etnaviv: add gem get_pages() method

2015-04-02 Thread Lucas Stach
From: Russell King Provide a get_pages() method for gem objects, which allows our objects to provide their own method to obtain the struct page array and scatterlist. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 67 - drivers/staging

[PATCH RFC 042/111] staging: etnaviv: clean up etnaviv_gem_{get, put}_pages()

2015-04-02 Thread Lucas Stach
From: Russell King Move the locking into etnaviv_gem_prime.c and pass an etnaviv_gem_object rather than drm_gem_object. As this becomes an internal gem function, move the prototype into etnaviv_gem.h. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.h | 2 -- drivers

[PATCH RFC 041/111] staging: etnaviv: convert get_pages()/put_pages() to take etnaviv_obj

2015-04-02 Thread Lucas Stach
From: Russell King Convert the internal get_pages()/put_pages() functions to take an etnaviv_obj rather tha converting between drm_gem_object and our private one. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 33 - 1 file changed, 16 in

[PATCH RFC 040/111] staging: etnaviv: clean up prime import

2015-04-02 Thread Lucas Stach
From: Russell King Clean up the etnaviv prime import handling by combining msm_gem_import() and msm_gem_prime_import_sg_table(), and then giving it an etnaviv_ prefix. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_drv.c | 2 +- drivers/staging/etnaviv/etnaviv_drv.h

[PATCH RFC 039/111] staging: etnaviv: move msm_gem_import() etc to etnaviv_gem_prime.c

2015-04-02 Thread Lucas Stach
From: Russell King Move the prime import code out into etnaviv_gem_prime.c, which keeps all this functionality together. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 55 - drivers/staging/etnaviv/etnaviv_gem_prime.c | 55

[PATCH RFC 038/111] staging: etnaviv: provide etnaviv_gem_new_private()

2015-04-02 Thread Lucas Stach
From: Russell King etnaviv_gem_new_private() creates a private non-shmem gem object which can be used to create these kinds of objects. Fix up msm_gem_import() to use it. Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 32 ++-- drivers/stagi

[PATCH RFC 037/111] staging: etnaviv: clean up etnaviv_gem_free_object()

2015-04-02 Thread Lucas Stach
From: Russell King As the tail of etnaviv_free_obj() is identical to etnaviv_free_cmd(), we can eliminate etnaviv_free_obj() entirely by moving it into etnaviv_gem_free_object(). Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_gem.c | 19 +++ 1 file changed, 3 i

  1   2   3   >