[PATCH 2/5] vt: Fix up unregistration of vt drivers

2014-06-06 Thread David Herrmann
Hi On Fri, Jun 6, 2014 at 9:56 AM, Daniel Vetter wrote: > On Fri, Jun 06, 2014 at 09:24:35AM +0200, David Herrmann wrote: >> Hi >> >> On Thu, Jun 5, 2014 at 4:58 PM, Daniel Vetter >> wrote: >> > A bunch of issues: >> > - We should not kick

[PATCH 1/3] drm: add register and unregister functions for connectors

2014-06-10 Thread David Herrmann
| 4 ++-- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- > drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 2 +- > drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +- > drivers/staging/imx-drm/imx-drm-core.c| 6 +++--- You even caught imx.. and you removed the EXPORT_SYMBO

[PATCH 2/3] drm/debugfs: add a "force" file per connector

2014-06-10 Thread David Herrmann
Hi On Thu, May 29, 2014 at 5:57 PM, Thomas Wood wrote: > Add a file to debugfs for each connector to enable modification of the > "force" connector attribute. This allows connectors to be enabled or > disabled for testing and debugging purposes. > > Signed-off-by: Thomas Wood > --- > drivers/gp

[PATCH 3/3] drm/debugfs: add an "edid_override" file per connector

2014-06-10 Thread David Herrmann
Hi On Thu, May 29, 2014 at 5:57 PM, Thomas Wood wrote: > Add a file to debugfs for each connector that allows the edid data to be > overridden. > > Signed-off-by: Thomas Wood > --- > drivers/gpu/drm/drm_crtc.c | 4 +++ > drivers/gpu/drm/drm_debugfs.c | 56 > ++

[PATCH] drm: fix NULL pointer access by wrong ioctl

2014-06-20 Thread David Herrmann
i Yuan Reviewed-by: David Herrmann Cc: @Dave: Imo, this should go through stable. We initialize "kdata" to NULL, but "usize" can be up to 2^14, so it might write to real memory there. Most systems probably reserve the lower 64KB and the first write on the NULL-page should kill th

[PATCH 1/4] drm/mm: add "best_match" flag to drm_mm_insert_node()

2013-07-27 Thread David Herrmann
able, this converts the boolean argument to a flagset. There are pending patches that add additional flags for top-down allocators and more. v2: - use flag parameter instead of boolean "best_match" - convert *_search_free() helpers to also use flags argument Signed-off-by: David Herrma

[PATCH v2 2/4] drm/ttm: replace drm_mm_pre_get() by direct alloc

2013-07-27 Thread David Herrmann
GFP_KERNEL alloc in nouveau/nouveau_ttm.c in nouveau_gart_manager_new(). So we can do the same in ttm_bo_man_get_node(). Signed-off-by: David Herrmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_bo_manager.c | 42 +--- 1 file changed, 20 insertions(+), 22

[PATCH v2 3/4] drm/i915: pre-alloc instead of drm_mm search/get_block

2013-07-27 Thread David Herrmann
Wilson Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_gem_stolen.c | 75 +- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index e355170..0044e65 100644

[PATCH v2 4/4] drm/mm: remove unused API

2013-07-27 Thread David Herrmann
rm_mm_node into their objects so no allocation is needed at all. Thus, remove the old pre-alloc API and all the helpers that it provides. Drivers have already been converted and we should not use the old API for new code, anymore. Signed-off-by: David Herrmann Acked-by: Daniel Vetter ---

Re: [RFC 3/9] drm/agp: fix AGP cleanup paths

2013-07-27 Thread David Herrmann
Hi On Sat, Jul 27, 2013 at 8:05 AM, Dave Airlie wrote: > On Wed, Jul 24, 2013 at 11:43 PM, David Herrmann > wrote: >> Introduce two new helpers, drm_agp_clear() and drm_agp_destroy() which >> clear all AGP mappings and destroy the AGP head. This allows to reduce the >>

Re: [PATCH v2 3/4] drm/i915: pre-alloc instead of drm_mm search/get_block

2013-07-27 Thread David Herrmann
Hi On Sat, Jul 27, 2013 at 3:06 PM, Chris Wilson wrote: > On Sat, Jul 27, 2013 at 01:38:42PM +0200, David Herrmann wrote: >> i915 is the last user of the weird search+get_block drm_mm API. Convert it >> to an explicit kmalloc()+insert_node(). This drops the last user of the &

[PATCH v3 3/4] drm/i915: pre-alloc instead of drm_mm search/get_block

2013-07-27 Thread David Herrmann
even more Cc: Daniel Vetter Cc: Chris Wilson Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_gem_stolen.c | 78 -- 1 file changed, 47 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915

[PATCH] drm/agp: move AGP cleanup paths to drm_agpsupport.c

2013-07-27 Thread David Herrmann
Introduce two new helpers, drm_agp_clear() and drm_agp_destroy() which clear all AGP mappings and destroy the AGP head. This allows to reduce the AGP code in core DRM and move it all to drm_agpsupport.c. Signed-off-by: David Herrmann --- Hi Dave I exported the AGP cleanup from the previous

Re: [PATCH] Fix #include in drm_mm.h to unbreak ia64 build

2013-07-31 Thread David Herrmann
Hi On Mon, Jul 29, 2013 at 8:51 PM, Luck, Tony wrote: > Linux-next build on ia64 is falling over with errors like this: > > In file included from include/drm/drm_vma_manager.h:26, > from include/drm/ttm/ttm_bo_api.h:35, > from include/drm/ttm/ttm_bo_driver.h:33,

Re: [PATCH v2] drm/gem: fix mmap vma size calculations

2013-07-31 Thread David Herrmann
Hi On Tue, Jul 30, 2013 at 9:52 AM, Sedat Dilek wrote: > On Tue, Jul 30, 2013 at 9:41 AM, Sedat Dilek wrote: >> On Fri, Jul 26, 2013 at 10:15 PM, Daniel Vetter wrote: >>> On Fri, Jul 26, 2013 at 12:09:32PM +0200, David Herrmann wrote: >>>> The VMA

Re: [PATCH] drm: don't push static constants on stack for %*ph

2013-08-02 Thread David Herrmann
Hi On Fri, Aug 2, 2013 at 1:09 PM, Andy Shevchenko wrote: > There is no need to pass constants via stack. The width may be explicitly > specified in the format. Yupp, all 3 make sense and actually speed up "format_decode()". Reviewed-by: David Herrmann Regards David >

Re: [PATCH 3/3] drm: Remove drm_mode_validate_clocks

2013-08-02 Thread David Herrmann
Hi On Wed, Jul 31, 2013 at 2:23 AM, Stéphane Marchesin wrote: > Signed-off-by: Stéphane Marchesin Something like "unused" in the commit message makes "git log [--oneline]" much more verbose without the need to read the patch. Apart from that: Reviewed-by: David Herrma

Re: [PATCH 1/4] drm/mm: add "best_match" flag to drm_mm_insert_node()

2013-08-06 Thread David Herrmann
Hi On Mon, Aug 5, 2013 at 9:46 AM, Daniel Vetter wrote: > On Sat, Jul 27, 2013 at 01:36:27PM +0200, David Herrmann wrote: >> Add a "best_match" flag similar to the drm_mm_search_*() helpers so we >> can convert TTM to use them in follow up patches. We can also inline t

Re: [drm-intel:drm-intel-nightly 243/249] undefined reference to `drm_agp_clear'

2013-08-07 Thread David Herrmann
Hi On Wed, Aug 7, 2013 at 10:19 AM, kbuild test robot wrote: > tree: git://people.freedesktop.org/~danvet/drm-intel.git drm-intel-nightly > head: 3224cf6c3ee5ab9c280052c9fbed4f660310c411 > commit: 28ec711cd427f8b61f73712a43b8100ba8ca933b [243/249] drm/agp: move AGP > cleanup paths to drm_agp

Re: [PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms

2013-08-07 Thread David Herrmann
Hi On Wed, Aug 7, 2013 at 2:39 PM, Laurent Pinchart wrote: > Hi Daniel, > > On Wednesday 07 August 2013 14:19:34 Daniel Vetter wrote: >> On Wed, Aug 7, 2013 at 2:17 PM, Laurent Pinchart wrote: >> > The drm_agp_clear() function is only defined on platforms with AGP >> > support. Move the drm_core_

[PATCH] drm: provide agp dummies for CONFIG_AGP=n

2013-08-07 Thread David Herrmann
d by: commit 28ec711cd427f8b61f73712a43b8100ba8ca933b Author: David Herrmann Date: Sat Jul 27 16:37:00 2013 +0200 drm/agp: move AGP cleanup paths to drm_agpsupport.c Cc: Laurent Pinchart Cc: Daniel Vetter Signed-off-by: David Herrmann --- Hi guys I test-compiled this with AGP=y and AGP=n but I don't have the

Re: [PATCH] drm: provide agp dummies for CONFIG_AGP=n

2013-08-07 Thread David Herrmann
Hi On Wed, Aug 7, 2013 at 5:53 PM, Laurent Pinchart wrote: > Hi David, > > On Wednesday 07 August 2013 15:53:15 David Herrmann wrote: >> We currently rely on gcc dead-code elimination so the drm_agp_* helpers >> are not called if drm_core_has_AGP() is false. That's

Re: [PATCH 5/9] drm/gem: add drm_gem_create_mmap_offset_size()

2013-08-08 Thread David Herrmann
of a duplicated and slightly modified version of > drm_gem_create_mmap_offset() in omapdrm. > > Signed-off-by: Rob Clark Reviewed-by: David Herrmann Regards David > --- > drivers/gpu/drm/drm_gem.c | 28 > include/drm/drmP.h| 1 + > 2 fil

[PATCH] drm: fix minor number range calculation

2013-08-08 Thread David Herrmann
Currently, both ranges overlap. Fix the limits so both ranges are mutually exclusive. Also use the occasion to convert whitespaces to tabs. Signed-off-by: Kristian Høgsberg (fixed up tabs and adjust commit-msg accordingly) Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 12

Re: [PATCH] drm: fix minor number range calculation

2013-08-08 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 7:10 PM, David Herrmann wrote: > Currently, both ranges overlap. Fix the limits so both ranges are mutually > exclusive. Also use the occasion to convert whitespaces to tabs. > > Signed-off-by: Kristian Høgsberg > (fixed up tabs and adjust commit-

Re: [PATCH] drm/agp: Fix build for non-AGP platforms

2013-08-08 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 12:20 PM, Mark Brown wrote: > From: Mark Brown > > Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) > broke the build for platforms which do not have AGP since it moved the > AGP cleanup code inside an #ifdef __OS_HAS_AGP which are referenced > uncon

Re: drm/agp linux-next build broken for non-AGP platform

2013-08-08 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 12:01 PM, Vincent Stehlé wrote: > Hi, > > Linux next-20130808 link breaks for me with ARM config multi_v7defconfig. > > It seems this is due to the following commit: > > 28ec711 drm/agp: move AGP cleanup paths to drm_agpsupport.c > > ...which calls drm_agp_clear() with

Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"

2013-08-08 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren wrote: > In next-20130808, building tegra_defconfig for ARM yields: > >> drivers/built-in.o: In function `drm_lastclose': >> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: >> undefined reference to `drm_agp_clear' >

Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"

2013-08-08 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 9:21 PM, Stephen Warren wrote: > On 08/08/2013 12:13 PM, David Herrmann wrote: >> Hi >> >> On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren wrote: >>> In next-20130808, building tegra_defconfig for ARM yields: >>> >>>

[PATCH v2] drm: provide agp dummies for CONFIG_AGP=n

2013-08-08 Thread David Herrmann
d by: commit 28ec711cd427f8b61f73712a43b8100ba8ca933b Author: David Herrmann Date: Sat Jul 27 16:37:00 2013 +0200 drm/agp: move AGP cleanup paths to drm_agpsupport.c v2: switch #ifdef -> #if (spotted by Stephen) Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Stephen Warren Signed-off-by: David Herrmann ---

Re: [PATCH] drm: drm_drv: Only call drm_agp_clear() in __OS_HAS_AGP case

2013-08-12 Thread David Herrmann
Hi On Fri, Aug 9, 2013 at 12:00 AM, Fabio Estevam wrote: > From: Fabio Estevam > > Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) causes > the > following link error on ARM (imx_v6_v7_defconfig): > > drivers/built-in.o: In function `drm_lastclose': > :(.text+0x588a0): unde

[PATCH] drm/host1x: stop casting VMA offsets to 32bit

2013-08-13 Thread David Herrmann
VMA offsets are 64bit so do not cast them to "unsigned int". Also remove the (now useless) offset-retrieval helper. The VMA manager provides simple enough helpers. Cc: Thierry Reding Cc: "Terje Bergström" Cc: Arto Merilainen Signed-off-by: David Herrmann --- drivers/gpu/

[PATCH v2 0/4] Anonymous Inode Allocations

2013-08-13 Thread David Herrmann
hared anon_inode_inode, I'd be happy to implement it. However, I didn't succeed and I am actually not sure that separate "struct address_space" are actually supported. For instance, DRM core uses code like: container_of(dev_mapping, struct inode, i_data) which would break in thi

[PATCH v2 1/4] anon_inodes: allow external inode allocations

2013-08-13 Thread David Herrmann
mount, we extend it to also provide anonymous inodes for use in drivers like DRM. Signed-off-by: David Herrmann Wanted-by: Daniel Vetter --- fs/anon_inodes.c| 36 +--- include/linux/anon_inodes.h | 1 + 2 files changed, 30 insertions(+), 7 deletions

[PATCH v2 2/4] DRM: use anon_inode instead of delayed inode init

2013-08-13 Thread David Herrmann
r what reason?), but I remember Daniel told me that i810 might. Tested with nouveau on x86_64. Signed-off-by: David Herrmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 1 - drivers/gpu/drm/drm_fops.c | 24 +++- driver

[PATCH v2 3/4] drm: init TTM dev_mapping in ttm_bo_device_init()

2013-08-13 Thread David Herrmann
Ben Skeggs Cc: Maarten Lankhorst Cc: Alex Deucher Cc: Thomas Hellstrom Signed-off-by: David Herrmann --- drivers/gpu/drm/ast/ast_ttm.c | 4 +++- drivers/gpu/drm/cirrus/cirrus_ttm.c| 4 +++- drivers/gpu/drm/mgag200/mgag200_ttm.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_gem.c

[PATCH v2 4/4] drm/omap: remove useless if() in evict_entry()

2013-08-13 Thread David Herrmann
anon_inode->i_mapping is always set. This was needed before we introduced anon_inodes. We can safely remove it now. Cc: Rob Clark Signed-off-by: David Herrmann --- drivers/gpu/drm/omapdrm/omap_gem.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) d

Re: [PATCH 19/25] drm: remove the dma_ioctl special-case

2013-08-13 Thread David Herrmann
> > To make really sure no mis-guided user in a kms driver pops up again > explicitly check for that in the new ioctl implementation. > > v2: Drop the unused variable I've accidentally left in the code, > spotted by David Herrmann. > > Cc: David Herrmann > Signe

Re: [PATCH 25/25] drm: move dev data clearing from drm_setup to lastclose

2013-08-13 Thread David Herrmann
when X is being restarted), so > keep this around. But give it a clear drm_legacy_ prefix and > conditionalize the code on !DRIVER_MODESET. > > Cc: David Herrmann > Signed-off-by: Daniel Vetter Reviewed-by: David Herrmann Regards David > --- > drivers/gpu/drm/drm_drv.c | 27 ++

Re: [PATCH 13/25] drm: remove FASYNC support

2013-08-13 Thread David Herrmann
ie > Cc: Laurent Pinchart > Cc: Rob Clark > Acked-by: Laurent Pinchart > Signed-off-by: Daniel Vetter Looks good now. It reminds me that I should resend the O_NONBLOCK implementation of drm_read() which would properly replace any SIGIO uses... Reviewed-by: David Herrmann

[PATCH 00/16] DRM VMA Access Management

2013-08-13 Thread David Herrmann
GEM drivers and call drm_vma_node_allow() and drm_vma_node_revoke() respectively. Just let me know what you think is cleaner. Cheers David David Herrmann (16): drm/vma: add access management helpers drm/ast: implement mmap access managament drm/cirrus: implement mmap access managament drm/mgag200: i

[PATCH 01/16] drm/vma: add access management helpers

2013-08-13 Thread David Herrmann
r mmap() should be supported on the bo and avoid access-management if not. - .. there are probably more ideas once we have benchmarks .. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/drm_vma_manager.c | 155 ++

[PATCH 02/16] drm/ast: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/ast/ast_drv.c | 2 ++ drivers/gpu/drm/ast/ast_drv.h | 4 drivers/gpu/drm/ast/ast_main.c | 15 +++ 3 files changed

[PATCH 03/16] drm/cirrus: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/cirrus/cirrus_drv.h | 4 drivers/gpu/drm/cirrus/cirrus_main.c | 15 +++ 2 files changed, 19 insertions(+) diff --git

[PATCH 04/16] drm/mgag200: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ drivers/gpu/drm/mgag200/mgag200_drv.h | 4 drivers/gpu/drm/mgag200/mgag200_main.c | 15

[PATCH 05/16] drm/nouveau: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Ben Skeggs Signed-off-by: David Herrmann --- drivers/gpu/drm/nouveau/nouveau_gem.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau

[PATCH 06/16] drm/radeon: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Alex Deucher Signed-off-by: David Herrmann --- drivers/gpu/drm/radeon/radeon_gem.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm

[PATCH 07/16] drm/qxl: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/qxl/qxl_gem.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm

[PATCH 08/16] drm/vmwgfx: implement mmap access managament

2013-08-13 Thread David Herrmann
Correctly allow and revoke buffer access on each open/close via the new VMA offset manager. We also need to make vmw_user_dmabuf_reference() correctly increase the vma-allow counter, but it is unused so remove it instead. Cc: Thomas Hellstrom Signed-off-by: David Herrmann --- drivers/gpu/drm

[PATCH 09/16] drm/ttm: prevent mmap access to unauthorized users

2013-08-13 Thread David Herrmann
urrently unused, though. All TTM drivers already use the new VMA offset manager access management so we can enable TTM mmap access management now. Signed-off-by: David Herrmann --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH 10/16] drm/gem: implement mmap access management

2013-08-13 Thread David Herrmann
don't need its mmap helpers. To avoid unnecessary overhead, we limit GEM access management to drivers using DRIVER_GEM_MMAP. So for TTM drivers GEM will not call any *_allow() or *_revoke() helpers. Signed-off-by: David Herrmann --- Documentation/DocBook/drm.tmpl | 13 + drive

[PATCH 11/16] drm/i915: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: Daniel Vetter Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm

[PATCH 12/16] drm/exynos: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: Inki Dae Signed-off-by: David Herrmann --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b

[PATCH 14/16] drm/omap: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: Rob Clark Signed-off-by: David Herrmann --- drivers/gpu/drm/omapdrm/omap_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu

[PATCH 15/16] drm/udl: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: David Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/udl/udl_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl

[PATCH 13/16] drm/gma500: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: Patrik Jakobsson Signed-off-by: David Herrmann --- drivers/gpu/drm/gma500/psb_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers

[PATCH 16/16] drm/host1x: enable GEM mmap access management

2013-08-13 Thread David Herrmann
Set DRIVER_GEM_MMAP to make GEM core track buffer accesses via the DRM VMA Offset Manager. Cc: Thierry Reding Cc: "Terje Bergström" Cc: Arto Merilainen Signed-off-by: David Herrmann --- drivers/gpu/host1x/drm/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 08/16] drm/vmwgfx: implement mmap access managament

2013-08-13 Thread David Herrmann
Hi On Tue, Aug 13, 2013 at 9:38 PM, David Herrmann wrote: > Correctly allow and revoke buffer access on each open/close via the new > VMA offset manager. We also need to make vmw_user_dmabuf_reference() > correctly increase the vma-allow counter, but it is unused so remove it > ins

[PATCH 0/7] DRM: Remove gem_init_object() and friends

2013-08-14 Thread David Herrmann
unused and the callbacks are all empty (or BUG()). And the diff-stat looks pretty nice, too. Cheers David David Herrmann (7): drm/ast: remove unused driver_private access drm/mgag200: remove unused driver_private access drm/cirrus: remove unused driver_private access drm/qxl: re

[PATCH 1/7] drm/ast: remove unused driver_private access

2013-08-14 Thread David Herrmann
gem_bo->driver_private is never read by ast nor DRM core. No need to set it. Besides, drm core clears it during setup, anyway. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/ast/ast_ttm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ast/ast_ttm.

[PATCH 2/7] drm/mgag200: remove unused driver_private access

2013-08-14 Thread David Herrmann
gem_bo->driver_private is never read by mgag200 nor DRM core. No need to set it. Besides, drm core clears it during setup, anyway. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/mgag200/mgag200_ttm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mgag

[PATCH 3/7] drm/cirrus: remove unused driver_private access

2013-08-14 Thread David Herrmann
gem_bo->driver_private is never read by cirrus nor DRM core. No need to set it. Besides, drm core clears it during setup, anyway. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/cirrus/cirrus_ttm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/cir

[PATCH 4/7] drm/qxl: remove unused object_pin/unpin() helpers

2013-08-14 Thread David Herrmann
These two helpers are unused. Remove them. They rely on gem_obj->driver_private, which is set to NULL during setup. As this field isn't used by the driver, anymore, we can remove this assignment as well. Cc: Dave Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/qxl/qxl_drv.h

[PATCH 5/7] drm/radeon: remove stale gem->driver_private access

2013-08-14 Thread David Herrmann
This field is never read. No need to set it in radeon. Besides, DRM gem core clears it during setup, anyway. Cc: Dave Airlie Cc: Alex Deucher Signed-off-by: David Herrmann --- drivers/gpu/drm/radeon/radeon_object.c | 1 - drivers/gpu/drm/radeon/radeon_prime.c | 1 - 2 files changed, 2

[PATCH 6/7] drm/nouveau: embed gem object in nouveau_bo

2013-08-14 Thread David Herrmann
previous style. However, we no longer can check for bo->gem != NULL to test for a valid gem object. This wasn't done before, so we should be safe now. Cc: Ben Skeggs Cc: Maarten Lankhorst Cc: Martin Peres Signed-off-by: David Herrmann --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 4

[PATCH 7/7] drm: kill ->gem_init_object() and friends

2013-08-14 Thread David Herrmann
ie Cc: Alex Deucher Cc: Daniel Vetter Cc: Jerome Glisse Cc: Rob Clark Cc: Inki Dae Cc: Ben Skeggs Cc: Patrik Jakobsson Signed-off-by: David Herrmann --- drivers/gpu/drm/ast/ast_drv.c | 1 - drivers/gpu/drm/ast/ast_drv.h | 1 - drivers/gpu/drm/ast/ast_main.c

Re: [PATCH 6/7] drm/nouveau: embed gem object in nouveau_bo

2013-08-15 Thread David Herrmann
Hi On Wed, Aug 14, 2013 at 4:31 PM, Maarten Lankhorst wrote: > Op 14-08-13 15:07, David Herrmann schreef: >> There is no reason to keep the gem object separately allocated. nouveau is >> the last user of gem_obj->driver_private, so if we embed it, we can get >> rid

Re: [PATCH 17/25] drm: rip out drm_core_has_MTRR checks

2013-08-15 Thread David Herrmann
Hi On Thu, Aug 8, 2013 at 3:41 PM, Daniel Vetter wrote: > The new arch_phys_wc_add/del functions do the right thing both with > and without MTRR support in the kernel. So we can drop these > additional checks. > > David Herrmann suggest to also kill the DRIVER_USE_MTRR flag s

Re: [PATCH 08/16] drm/vmwgfx: implement mmap access managament

2013-08-16 Thread David Herrmann
Hi On Wed, Aug 14, 2013 at 7:35 PM, Thomas Hellstrom wrote: > (CC'ing the proper people since I'm still on parental leave). > > On 08/13/2013 11:44 PM, David Herrmann wrote: > > Please see inline comments. > > >> Hi >> >> On Tue,

Re: [PATCH 08/16] drm/vmwgfx: implement mmap access managament

2013-08-16 Thread David Herrmann
Hi On Fri, Aug 16, 2013 at 5:33 PM, Thomas Hellstrom wrote: > On 08/16/2013 03:19 PM, David Herrmann wrote: >> >> Hi >> >> On Wed, Aug 14, 2013 at 7:35 PM, Thomas Hellstrom >> wrote: >>> >>> (CC'ing the proper people since I'm st

Re: [PATCH] drm: Eliminate dev->vmalist

2013-08-17 Thread David Herrmann
er.c. On the other hand, this file exclusively uses "drm_vma_node_*" and "drm_vma_offset_*" prefixes, so maybe we're fine here. Don't know.. I tried removing drm_vma_open/close entirely, but it seems not all drivers set vma->vma_file->private_data to the drm_devi

Re: [PATCH v2 2/2] dma-buf: Add user interfaces for dmabuf sync support

2013-08-21 Thread David Herrmann
Hi On Wed, Aug 21, 2013 at 12:33 PM, Inki Dae wrote: > This patch adds lock and poll callbacks to dma buf file operations, > and these callbacks will be called by fcntl and select system calls. > > fcntl and select system calls can be used to wait for the completion > of DMA or CPU access to a sh

[PATCH v2 0/6] DRM: VMA Access Management and Render Nodes

2013-08-23 Thread David Herrmann
he end, though. Maybe we can get this into 3.11? Regards David David Herrmann (4): drm/vma: add access management helpers drm/gem: implement vma access management drm: verify vma access in TTM+GEM drivers drm: implement experimental render nodes Kristian Høgsberg (1): drm/i915: Sup

[PATCH v2 1/6] drm/vma: add access management helpers

2013-08-23 Thread David Herrmann
r mmap() should be supported on the bo and avoid access-management if not. - .. there are probably more ideas once we have benchmarks .. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/drm_vma_manager.c | 155 ++

[PATCH v2 2/6] drm/gem: implement vma access management

2013-08-23 Thread David Herrmann
done for drm_gem_mmap(). TTM drivers use the TTM mmap helpers, which need to do that separately. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index d6122ae

[PATCH v2 3/6] drm: verify vma access in TTM+GEM drivers

2013-08-23 Thread David Herrmann
the buffer must have a valid embedded gem object. This is true for all TTM+GEM drivers. But that's why this patch doesn't touch pure TTM drivers (ie, vmwgfx). Cc: Dave Airlie Cc: Alex Deucher Cc: Ben Skeggs Cc: Maarten Lankhorst Cc: Jerome Glisse Signed-off-by: David Herrmann ---

[PATCH v2 4/6] drm: implement experimental render nodes

2013-08-23 Thread David Herrmann
DRM-Master if they support DRIVER_RENDER. So far render-nodes are protected by "drm_rnodes". As long as this module-parameter is not set to 1, a driver will not create render nodes. This allows us to experiment with the API a bit before we stabilize it. Signed-off-by: David Herrmann ---

[PATCH v2 5/6] drm/i915: Support render nodes

2013-08-23 Thread David Herrmann
From: Kristian Høgsberg Enable support for drm render nodes for i915 by flagging the ioctls that are safe and just needed for rendering. Cc: Daniel Vetter Signed-off-by: Kristian Høgsberg Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_dma.c | 36

[PATCH v2 6/6] drm/nouveau: Support render nodes

2013-08-23 Thread David Herrmann
From: Martin Peres Enable support for drm render nodes for nouveau by flagging the ioctls that are safe and just needed for rendering. Cc: Ben Skeggs Cc: Maarten Lankhorst Signed-off-by: Martin Peres Signed-off-by: David Herrmann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 24

Re: [PATCH 10/16] drm/gem: implement mmap access management

2013-08-23 Thread David Herrmann
Hi On Tue, Aug 13, 2013 at 11:05 PM, Daniel Vetter wrote: > On Tue, Aug 13, 2013 at 09:38:31PM +0200, David Herrmann wrote: >> Implement automatic access management for mmap offsets for all GEM >> drivers. This prevents user-space applications from "guessing" GEM BO

Re: [PATCH v2 0/6] DRM: VMA Access Management and Render Nodes

2013-08-23 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 1:28 PM, Christian König wrote: > Hi David, > > Am 23.08.2013 13:13, schrieb David Herrmann: > >> Hi >> >> I reduced the vma access-management patches to a minimum. I now do filp* >> tracking in gem unconditionally and force dr

Re: [PATCH v2 0/6] DRM: VMA Access Management and Render Nodes

2013-08-23 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 2:34 PM, Christian König wrote: >> Feel free to send a patch to dri-devel or just let me know the ioctls >> and I will include it in this series. > > > Do you have a branch somewhere I can grab? > > That's a bit easier than applying the patchset from the list. https://

Re: [PATCH] drm/radeon: Support render nodes

2013-08-23 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 3:45 PM, Christian König wrote: > From: Christian König > > Enable support for drm render nodes for radeon by flagging the ioctls that > are safe and just needed for rendering. > > Signed-off-by: Christian König Looks good to me. I queued it locally. v3 will include

Re: [PATCH v2 0/6] DRM: VMA Access Management and Render Nodes

2013-08-25 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 2:00 PM, Martin Peres wrote: > Le 23/08/2013 13:13, David Herrmann a écrit : > >> Hi >> >> I reduced the vma access-management patches to a minimum. I now do filp* >> tracking in gem unconditionally and force drm_gem_mmap() to check this

[PATCH 1/7] drm/vma: add access management helpers

2013-08-25 Thread David Herrmann
r mmap() should be supported on the bo and avoid access-management if not. - .. there are probably more ideas once we have benchmarks .. v2: add drm_vma_node_verify_access() helper Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 1 + driv

[PATCH 3/7] drm: verify vma access in TTM+GEM drivers

2013-08-25 Thread David Herrmann
patch doesn't touch pure TTM drivers (ie, vmwgfx). v2: Switch to drm_vma_node_verify_access() to correctly return -EACCES if access was denied. Cc: Dave Airlie Cc: Alex Deucher Cc: Ben Skeggs Cc: Maarten Lankhorst Cc: Jerome Glisse Signed-off-by: David Herrmann --- drivers/g

[PATCH 2/7] drm/gem: implement vma access management

2013-08-25 Thread David Herrmann
done for drm_gem_mmap(). TTM drivers use the TTM mmap helpers, which need to do that separately. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index d6122ae

[PATCH 4/7] drm: implement experimental render nodes

2013-08-25 Thread David Herrmann
use of dmabuf Signed-off-by: David Herrmann --- Documentation/DocBook/drm.tmpl | 69 ++ drivers/gpu/drm/drm_drv.c | 13 drivers/gpu/drm/drm_fops.c | 14 - drivers/gpu/drm/drm_pci.c | 9 ++ drivers/gpu/drm/drm_pl

[PATCH 5/7] drm/i915: Support render nodes

2013-08-25 Thread David Herrmann
From: Kristian Høgsberg Enable support for drm render nodes for i915 by flagging the ioctls that are safe and just needed for rendering. v2: mark reg_read, set_caching and get_caching (ickle, danvet) Signed-off-by: Kristian Høgsberg Signed-off-by: David Herrmann Reviewed-by: Daniel Vetter

[PATCH 6/7] drm/nouveau: Support render nodes

2013-08-25 Thread David Herrmann
From: Martin Peres Enable support for drm render nodes for nouveau by flagging the ioctls that are safe and just needed for rendering. Cc: Ben Skeggs Cc: Maarten Lankhorst Signed-off-by: Martin Peres Signed-off-by: David Herrmann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 24

[PATCH 7/7] drm/radeon: support render nodes

2013-08-25 Thread David Herrmann
From: Christian König Enable support for drm render nodes for radeon by flagging the ioctls that are safe and just needed for rendering. Signed-off-by: Christian König Signed-off-by: David Herrmann --- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 22

[PATCH] drm: fix DRM_IOCTL_MODE_GETFB handle-leak

2013-08-25 Thread David Herrmann
this. Users shouldn't test for errors during GEM_CLOSE, anyway. And it is still better than a failing MODE_GETFB call. Cc: Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_crtc.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/gp

[PATCH v2] drm: fix DRM_IOCTL_MODE_GETFB handle-leak

2013-08-26 Thread David Herrmann
accept this. Users shouldn't test for errors during GEM_CLOSE, anyway. And it is still better as a failing MODE_GETFB call. v2: add capable(CAP_SYS_ADMIN) check for compatibility with i-g-t Cc: Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_crtc.c | 18 +++--- 1 file change

[PATCH] drm/tda998x: BUG() on invalid audio format

2013-09-01 Thread David Herrmann
Suppress warning of unused-variables by adding a BUG()+return for invalid audio-formats. Cc: Rob Clark Signed-off-by: David Herrmann --- Hey Rob No idea whether it's correct. But all I know is when we hit the default: path, several variables will be unset. To avoid gcc warn about it, I

[PATCH v4 0/6] SimpleDRM Driver

2013-09-01 Thread David Herrmann
o make x86 drivers kick out firmware-DRM drivers instead of only fbdev via remove_conflicting_framebuffers(). I tested this based on drm-next plus the x86/fb series merged with i915 and nouveau and it worked just fine. Regards David David Herrmann (6): drm: add SimpleDRM driver drm: simpledrm:

[PATCH v4 1/6] drm: add SimpleDRM driver

2013-09-01 Thread David Herrmann
. The buffer is directly mapped into user-space, so we have only resources for a single buffer. Otherwise, shadow buffers plus damage-request would be needed. Signed-off-by: David Herrmann Tested-by: Stephen Warren --- MAINTAINERS| 8 + drivers/gpu/drm/Kconfig

[PATCH v4 2/6] drm: simpledrm: add fbdev fallback support

2013-09-01 Thread David Herrmann
Create a simple fbdev device during SimpleDRM setup so legacy user-space and fbcon can use it. Signed-off-by: David Herrmann Tested-by: Stephen Warren --- drivers/gpu/drm/simpledrm/Kconfig | 11 ++ drivers/gpu/drm/simpledrm/Makefile | 1 + drivers/gpu/drm/simpledrm

[PATCH v4 3/6] drm: add helpers to kick out firmware drivers

2013-09-01 Thread David Herrmann
invalidate the firmware framebuffer. Otherwise, simpledrm could be loaded again, after a real hw-driver was unloaded (which is very unlikely to work, except if hw-drivers reset fw FBs during unload). Note that fbdev doesn't provide such protection against late driver probing. Signed-off-by: David Her

[PATCH v4 4/6] drm: nouveau: kick out firmware drivers during probe

2013-09-01 Thread David Herrmann
Use the new DRM infrastructure to kick out firmware drivers before probing the real driver. Cc: Maarten Lankhorst Cc: Ben Skeggs Signed-off-by: David Herrmann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff

[PATCH v4 5/6] drm/i915: use new drm_kick_out_firmware()

2013-09-01 Thread David Herrmann
Use the new DRM infrastructure to kick out firmware DRM drivers before loading i915. Cc: Daniel Vetter Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm

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