Hi
On Wed, Jul 3, 2013 at 11:45 PM, Ben Widawsky wrote:
> For an upcoming patch where we introduce the i915 VMA, it's ideal to
> have the drm_mm_node as part of the VMA struct (ie. it's pre-allocated).
> Part of the conversion to VMAs is to kill off obj->gtt_space. Doing this
> will break a bunch
ysfb_efi.c, too? We
could make the DMI table __init then.
I tested this (including DRM handover) with vesafb, efifb and simpledrm. It all
worked well without problems. More testing is highly welcome! Also feel free
to pickup individual fixes which don't directly depend on the series (eg. #
it is not needed. The headers
provide proper dummies for the case OF is disabled.
Furthermore, we move the FORMAT-definitions to the common platform header
so initialization code can use it to transform "struct screen_info" to
the right format-name.
Signed-off-by: David Herrmann
--
for VGA/vesa/EFI framebuffers, but is also of great use for all other
systems.
Especially with x86 support for simplefb, this information is needed to
unload simplefb before a real hw-driver (like i915, radeon, nouveau) is
loaded.
Signed-off-by: David Herrmann
---
drivers/video/simplefb.c | 10
and
provide a generic simple-framebuffer. For backwards-compatibility (if
strange formats are used), we still allow vesafb/efifb to be loaded
simultaneously and pick up all remaining devices.
Signed-off-by: David Herrmann
---
arch/x86/Kconfig | 26 +++
arch/x86/in
The EFI FB quirks from efifb.c are useful for simple-framebuffer devices
as well. Apply them by default so we can convert efifb.c to use
efi-framebuffer platform devices.
Signed-off-by: David Herrmann
---
arch/x86/include/asm/sysfb.h | 57 +++
arch/x86/kernel/Makefile | 1 +
arch
32bit XRGB and ARGB are used by modern x86 systems for EFI and VESA
framebuffers. Add both variants so simplefb can be used on such systems.
Signed-off-by: David Herrmann
---
include/linux/platform_data/simplefb.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/platform_data
x86 creates platform-framebuffer platform devices for every system
framebuffer. Use these instead of creating a dummy device.
This requires us to remove the __init annotations as hotplugging may occur
during runtime.
Signed-off-by: David Herrmann
---
drivers/video/vesafb.c | 55
Instead of creating a dummy device, we now bind to the efi-fb device
which is provided by x86 initialization code.
Signed-off-by: David Herrmann
---
drivers/video/efifb.c | 68 +--
1 file changed, 22 insertions(+), 46 deletions(-)
diff --git a
and I couldn't figure out why. Hence, lets just require
console-unbinding so fbdev hotplugging works with fbcon.
Signed-off-by: David Herrmann
---
drivers/video/console/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/console/Kconfig b/drivers/
. 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
---
MAINTAINERS| 8 +
drivers/gpu/drm/Kconfig| 2
Create a simple fbdev device during SimpleDRM setup so legacy user-space
and fbcon can use it.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/simpledrm/Kconfig | 11 ++
drivers/gpu/drm/simpledrm/Makefile | 1 +
drivers/gpu/drm/simpledrm/simpledrm.h | 22
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
Use the new DRM infrastructure to kick out firmware drivers before probing
the real driver.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau
Use the new DRM infrastructure to kick out firmware DRM drivers before
loading i915.
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/i915/i915_dma.c
Kick out firmware DRM and fbdev drivers via the new
drm_kick_out_firmware() before loading radeon.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/radeon/radeon_drv.c | 28
drivers/gpu/drm/radeon/radeon_kms.c | 30 ++
2 files changed
(David)
> Free node, and NULL it in failed create_stolen (David)
> Add back accidentally removed newline (David)
>
> CC:
> CC: David Herrmann
> Signed-off-by: Ben Widawsky
I already suspected that you'd embed drm_mm_node in a follow-up patch
but I am not subscribed to in
Hi
On Thu, Jul 4, 2013 at 7:48 PM, H. Peter Anvin wrote:
> On 07/04/2013 05:25 AM, David Herrmann wrote:
>>
>> - What FB formats are common on x86 that we should add to
>> SIMPLEFB_FORMATS?
>> (other than ARGB/XRGB32)
>
>
> The common pixel formats on x8
de driver patches:
https://gitorious.org/linux-nouveau-pm/linux-nouveau-pm/commits/render_nodes
David Herrmann (20):
drm: add unified vma offset manager
drm/gem: convert to new unified vma manager
drm/ttm: convert to unified vma offset manager
drm/vma: provide drm_vma_node_unmap() helper
- use drm_vma_node_reset() for initialization, too
Signed-off-by: David Herrmann
---
Documentation/DocBook/drm.tmpl| 6 +
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/drm_vma_manager.c | 260 ++
include/drm/drm_vma_manager.h
which strictly wouldn't be
needed for gem.
v2:
- rebase on drm-next
- init nodes via drm_vma_node_reset() in drm_gem.c
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_gem.c | 90 ++
drivers/gpu/drm/drm_gem_cma_helper.c | 9 +--
driv
e during
lookup. However, this lock is not needed during vm-setup as we still
hold a reference there.
This also drops the addr_space_offset member as it is a copy of vm_start
in vma_node objects. Use the accessor functions instead.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/ast/as
-by: Daniel Vetter
Signed-off-by: David Herrmann
---
drivers/gpu/drm/i915/i915_gem.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo.c| 11 +--
include/drm/drm_vma_manager.h | 16
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.
Add a "best_match" argument similar to the drm_mm_search_*() helpers so we
can convert TTM to use them in follow up patches.
Also move the non-generic aliases to drm_mm.h header instead of keeping
them in the source file.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_mm.c
Instead of calling drm_mm_pre_get() in a row, we now preallocate the node
and then use the atomic insertion functions. This has the exact same
semantics and there is no reason to use the racy pre-allocations.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/ttm/ttm_bo_manager.c | 40
i915 is the last user of the weird search+get_block drm_mm API. Convert it
to an explicit kmalloc()+insert_node().
Signed-off-by: David Herrmann
---
drivers/gpu/drm/i915/i915_gem.c| 9 +++--
drivers/gpu/drm/i915/i915_gem_stolen.c | 72 ++
2 files changed
These calls are no longer used. Remove them.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_mm.c | 116 ---
include/drm/drm_mm.h | 74 --
2 files changed, 19 insertions(+), 171 deletions(-)
diff --git a/drivers
node as there is no generic lock available
for the caller to protect the node easily.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_vma_manager.c | 148 ++
include/drm/drm_vma_manager.h | 16 +
2 files changed, 164 insertions(+)
diff --g
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
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
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
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
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
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
Correctly allow and revoke buffer access on each open/close via the new
VMA offset manager.
Also remove unused vmw_user_dmabuf_reference() to prevent from using it
later without correctly adding mmap permissions.
Cc: Thomas Hellstrom
Signed-off-by: David Herrmann
---
drivers/gpu/drm/vmwgfx
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/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 54a67f1..756adc7 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++
Implement automatic access management for mmap offsets for all GEM
drivers. This prevents user-space applications from "guessing" GEM BO
offsets and accessing buffers which they don't own.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_gem.c | 21 +
1 f
Currently, both ranges overlap. Fix the limits so both ranges are mutually
exclusive. Also use the occasion to convert whitespaces to tabs.
Cc: Martin Peres
Cc: Kristian Høgsberg
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_stub.c | 12 ++--
1 file changed, 6 insertions(+), 6
DRM-Master if they
support DRIVER_RENDER.
Cc: Kristian Høgsberg
Signed-off-by: David Herrmann
---
Documentation/DocBook/drm.tmpl | 71 ++
drivers/gpu/drm/drm_drv.c | 15 -
drivers/gpu/drm/drm_fops.c | 14 -
drivers/gpu/drm/drm_pc
licts with my VMA-manager patches, but that should be easily
solvable. Anyway, all 5 patches:
Reviewed-by: David Herrmann
Cheers
David
> drivers/gpu/drm/drm_gem.c | 119 +++-
> drivers/gpu/drm/gma500/gtt.c | 38 +--
> drivers/gpu/drm/o
Hi
On Wed, Jul 10, 2013 at 2:11 PM, Daniel Vetter wrote:
> We kzalloc the driver node at init time, so no need to do this again.
>
> Signed-off-by: Daniel Vetter
> ---
> drivers/gpu/drm/drm_fops.c | 9 -
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fops.c b/driv
Hi
On Wed, Jul 10, 2013 at 2:12 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.
>
> Cc: Andy Lutomirski
> Signed-off-by: Daniel Vetter
> ---
> drivers/gpu/drm/drm_
Hi
On Wed, Jul 10, 2013 at 2:12 PM, Daniel Vetter wrote:
> We might as well have a real ioctl function which checks for the
> callbacks. This seems to be a remnant from back in the days when each
> drm driver had their own complete ioctl table, with no shared core
> drm table at all.
>
> To make
remove a bunch of unused #defines from drmP.h
> drm: rip out drm_core_has_MTRR checks
> drm: remove the dma_ioctl special-case
> drm/memory: don't export agp helpers
> drm: hollow-out GET_CLIENT ioctl
> drm: no-op out GET_STATS ioctl
> drm: fix locking in gem debug
Hi
On Wed, Jul 10, 2013 at 5:22 PM, Daniel Vetter wrote:
> On Wed, Jul 10, 2013 at 3:51 PM, David Herrmann wrote:
>>> -#if __OS_HAS_MTRR
>>> -static inline int drm_core_has_MTRR(struct drm_device *dev)
>>> -{
>>> - return drm_core_check_feature(d
Hi
On Tue, Jul 9, 2013 at 11:02 PM, Stephen Warren wrote:
> On 07/04/2013 06:25 AM, David Herrmann wrote:
>> Hi
>>
>> This series changes the way we handle firmware framebuffers on x86 systems.
>> On
>> other architectures the recently introduced "simple-fr
_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)
So I didn't spent much time on th
FS mount, we extend it to also provide
anonymous inodes for use in drivers like DRM.
Signed-off-by: David Herrmann
---
fs/anon_inodes.c| 36 +---
include/linux/anon_inodes.h | 1 +
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/f
r what reason?), but I remember Daniel
told me that i810 might.
Tested with nouveau on x86_64.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_drv.c | 1 -
drivers/gpu/drm/drm_fops.c | 24 +++-
drivers/gpu/drm/drm_stub.c | 12 +
igned-off-by: David Herrmann
---
drivers/gpu/drm/drm_gem.c | 20
drivers/gpu/drm/gma500/framebuffer.c | 6 ++
drivers/gpu/drm/gma500/gem.c | 7 ---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 7 +--
drivers/gpu/drm/i915/i915_gem_stolen.c
These don't make any sense, really..
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_pci.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 80c0b2b..a7b46ff 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gp
Hi
On Sun, Jul 7, 2013 at 7:17 PM, David Herrmann wrote:
> Use the new vma manager instead of the old hashtable. Also convert all
> drivers to use the new convenience helpers. This drops all the
> (map_list.hash.key << PAGE_SHIFT) non-sense.
>
> Locking and access-managemen
Hi
On Thu, Jul 11, 2013 at 1:12 PM, Martin Peres wrote:
> On 07/07/2013 19:17, David Herrmann wrote:
>>
>> Hi
>>
>> This is v2 of the unified VMA offset manager series. The first draft is
>> available at LWN [1]. This series replaces the VMA offset managers in
Hi
On Thu, Jul 11, 2013 at 11:43 PM, Jean-Sébastien Pédron
wrote:
> Hi,
>
> Thank you Jérôme and Daniel for your input, that's really helpful!
>
> I have another question: in ttm_bo_mmap(), a reference to the buffer object
> is acquired at the beginning of the function. Another reference is acqui
already authenticated or not.
> So we need to keep that part of things working. Simplest way is to
> just return one entry to keep va_drm_is_authenticated in
> libva/va/drm/va_drm_auth.c working.
>
> Cc: Gwenole Beauchesne
> Cc: David Herrmann
> Cc: Eric Anholt
> Signed-o
aware of the handle, yet. And if user-space
already has a handle, then "handle_count" is >0, anyway.
And gem_object_handle_unreference can only be called if another handle
exists (thus, handle_count > 0).
Or am I missing something?
> *handlep = ret;
>
> - d
e them as handle_reference() is only
called by handle_create().
Anyway:
Reviewed-by: David Herrmann
Cheers
David
> Signed-off-by: Daniel Vetter
> ---
> drivers/gpu/drm/drm_gem.c | 2 +-
> include/drm/drmP.h| 1 -
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
>
Hi
Any comments on this?
On Thu, Jul 4, 2013 at 2:25 PM, David Herrmann wrote:
> The current situation regarding boot-framebuffers (VGA, VESA/VBE, EFI) on
> x86 causes troubles when loading multiple fbdev drivers. The global
> "struct screen_info" does not provide any state-t
intentionally excluded the access-management patches from this series. Please
see v2 for information on these. I will resend them once this series gets
merged.
Comments welcome!
Cheers
David
David Herrmann (4):
drm: add unified vma offset manager
drm/gem: convert to new unified vma manager
drm/ttm
- use drm_vma_node_reset() for initialization, too
Signed-off-by: David Herrmann
---
Documentation/DocBook/drm.tmpl| 6 +
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/drm_vma_manager.c | 260 ++
include/drm/drm_vma_manager.h
which strictly wouldn't be
needed for gem.
v2:
- rebase on drm-next
- init nodes via drm_vma_node_reset() in drm_gem.c
v3:
- fix tegra
Cc: Inki Dae
Cc: Patrik Jakobsson
Cc: Daniel Vetter
Cc: Rob Clark
Cc: Dave Airlie
Cc: Thierry Reding
Signed-off-by: David Herrmann
---
driv
eres
Cc: Alex Deucher
Cc: Thomas Hellstrom
Signed-off-by: David Herrmann
---
drivers/gpu/drm/ast/ast_main.c| 2 +-
drivers/gpu/drm/cirrus/cirrus_main.c | 2 +-
drivers/gpu/drm/mgag200/mgag200_main.c| 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
drivers/gpu/drm
lie
Cc: Maarten Lankhorst
Cc: Thomas Hellstrom
Reviewed-by: Daniel Vetter
Signed-off-by: David Herrmann
---
drivers/gpu/drm/i915/i915_gem.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo.c| 11 +--
include/drm/drm_vma_manager.h | 16
3 files changed, 18 insertions(+),
and _unlock_lookup() helpers which just wrap
the read_lock() and read_unlock?
Thanks!
David
> Thanks,
> Thomas
>
>
>
>
> On 07/17/2013 08:14 PM, David Herrmann wrote:
>>
>> Use the new vma-manager infrastructure. This doesn't change any
>> implementation
Hi
On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom wrote:
> On 07/18/2013 01:07 PM, David Herrmann wrote:
>>
>> Hi
>>
>> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom
>> wrote:
>>>
>>> A quick look, but not a full review:
>>>
&g
Sorry, I forgot to CC correctly.
On Mon, Jul 22, 2013 at 12:53 PM, David Herrmann wrote:
> Hi
>
> On Fri, Jul 19, 2013 at 11:13 AM, Thomas Hellstrom
> wrote:
>> On 07/18/2013 10:54 PM, David Herrmann wrote:
>>>
>>> Hi
>>>
>>> On Thu
typos and comments
- Rebase on drm-next
Comments welcome!
Cheers
David
David Herrmann (4):
drm: add unified vma offset manager
drm/gem: convert to new unified vma manager
drm/ttm: convert to unified vma offset manager
drm/vma: provide drm_vma_node_unmap() helper
Documentation/DocBook
- use drm_vma_node_reset() for initialization, too
v4:
- allow external locking via drm_vma_offset_un/lock_lookup()
- add locked lookup helper drm_vma_offset_lookup_locked()
Signed-off-by: David Herrmann
---
Documentation/DocBook/drm.tmpl| 6 +
drivers/gpu/drm/Makefile | 2 +-
driver
b Clark
Cc: Dave Airlie
Cc: Thierry Reding
Signed-off-by: David Herrmann
Acked-by: Patrik Jakobsson
---
drivers/gpu/drm/drm_gem.c | 89 +-
drivers/gpu/drm/drm_gem_cma_helper.c | 16 ++
drivers/gpu/drm/exynos/exynos_drm_gem.c| 14 ++-
strom
Signed-off-by: David Herrmann
---
drivers/gpu/drm/ast/ast_main.c| 2 +-
drivers/gpu/drm/cirrus/cirrus_main.c | 2 +-
drivers/gpu/drm/mgag200/mgag200_main.c| 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +-
dr
ook comments
Cc: Dave Airlie
Cc: Maarten Lankhorst
Cc: Thomas Hellstrom
Signed-off-by: David Herrmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/i915/i915_gem.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo.c| 11 +--
include/drm/drm_vma_manager.h | 22 ++
3 fi
Hi Al
Any comment on this?
Regards
David
On Thu, Jul 11, 2013 at 1:45 AM, David Herrmann wrote:
> DRM core shares a single address_space across all inodes that belong to
> the same DRM device. This allows efficient unmapping of user-space
> mappings during buffer destruction. However,
vers, but I thought I'd just send a first RFC so people can comment on that.
Furthermore, the first 6 patches can be applied right away and fix error-paths
during allocation and unify all the bus systems to use a single helper for
device allocation.
Cheers
David
David Herrmann (9):
drm:
phase, and a registration phase.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_pci.c | 4 +-
drivers/gpu/drm/drm_platform.c | 3 +-
drivers/gpu/drm/drm_stub.c | 121 +
drivers/gpu/drm/drm_usb.c | 7 +--
include/drm/drmP.h
called this in any other error
path either. Follow up patches will fix AGP error paths.
We also keep a DRIVER_MODESET condition around pci_set_drvdata() to keep
semantics.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_pci.c | 47 --
drivers/gpu/drm/drm_platform.c
ioctl)
- drm_drv.c: Global DRM init + ioctl handling
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_drv.c | 49 --
drivers/gpu/drm/drm_fops.c | 49 ++
2 files changed, 49 insertions(+), 49 deletions
_ht_remove(), drm_ctxbitmap_cleanup() and
drm_gem_destroy() are all fine in that regard.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_pci.c | 2 +-
drivers/gpu/drm/drm_platform.c | 2 +-
drivers/gpu/drm/drm_stub.c | 35 +--
drivers/gpu/drm/drm_usb.c
wever, drm_dev_put() definitely does not do any kind of ref-counting.
Hence, use the more appropriate *_register(), *_unregister(), *_alloc()
and *_free() names.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_stub.c | 57 --
include/drm/d
DRM could make great use of percpu-rwsems to track active users and wait
for them during hw hotplugging. Export symbols and allow using them in
runtime loadable modules.
Signed-off-by: David Herrmann
---
lib/Makefile | 2 +-
lib/percpu-rwsem.c | 7 +++
2 files changed, 8 insertions
r buffer access. The percpu-rwsem avoids this by
protecting a whole file-op call and waiting with unplugging a device until
all pending calls are finished.
FIXME: We still need to update all the driver's fops in case they don't
use the DRM core stubs. A quick look showed only custom mmap ca
.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_agpsupport.c | 51
drivers/gpu/drm/drm_drv.c| 21 +
drivers/gpu/drm/drm_pci.c| 12 ++
drivers/gpu/drm/drm_stub.c | 12 --
include/drm/drmP.h
until last put_device() call), but allows immediate device
deregistration via unregister_device().
Signed-off-by: David Herrmann
---
Documentation/DocBook/drm.tmpl | 5 ++
drivers/gpu/drm/drm_fops.c | 85 +-
drivers/gpu/drm/drm_stub.c
Hi
On Wed, Jul 24, 2013 at 4:03 PM, Maarten Lankhorst
wrote:
> Op 24-07-13 15:43, David Herrmann schreef:
>> If we want to support real hotplugging, we need to block new syscalls from
>> entering any drm_* fops. We also need to wait for these to finish before
>> u
Hi
On Wed, Jul 24, 2013 at 5:35 PM, Daniel Vetter wrote:
> On Tue, Jul 23, 2013 at 02:47:13PM +0200, David Herrmann wrote:
>> If we want to map GPU memory into user-space, we need to linearize the
>> addresses to not confuse mm-core. Currently, GEM and TTM both implement
>
Hi
On Wed, Jul 24, 2013 at 5:52 PM, Daniel Vetter wrote:
> On Tue, Jul 23, 2013 at 02:47:14PM +0200, David Herrmann wrote:
>> Use the new vma manager instead of the old hashtable. Also convert all
>> drivers to use the new convenience helpers. This drops all the
>&g
)
- fix drm_vma_offset_exact_lookup() to actually do what it says
- remove redundant vm_pages member (add drm_vma_node_size() helper)
- remove unneeded goto
- fix documentation
Signed-off-by: David Herrmann
Reviewed-by: Daniel Vetter
---
Documentation/DocBook/drm.tmpl| 6 +
drivers/gpu/drm/Makefile
to kzalloc()
- do not allow mapping gem-objects with offsets (backwards compat)
- remove unneccessary casts
Cc: Inki Dae
Cc: Rob Clark
Cc: Dave Airlie
Cc: Thierry Reding
Signed-off-by: David Herrmann
Acked-by: Patrik Jakobsson
Reviewed-by: Daniel Vetter
---
drivers/gpu/dr
strom
Signed-off-by: David Herrmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/ast/ast_main.c| 2 +-
drivers/gpu/drm/cirrus/cirrus_main.c | 2 +-
drivers/gpu/drm/mgag200/mgag200_main.c| 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
drivers/gpu/drm/no
ook comments
v5: use drm_vma_node_size()
Cc: Dave Airlie
Cc: Maarten Lankhorst
Cc: Thomas Hellstrom
Signed-off-by: David Herrmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/i915/i915_gem.c | 6 +-
drivers/gpu/drm/ttm/ttm_bo.c| 11 +--
include/drm/drm_vma_manager.h |
This helper is used only once and just wraps a call to
drm_vma_offset_add(). Remove this unneeded indirection to safe 10 lines of
code.
Signed-off-by: David Herrmann
---
drivers/gpu/drm/ttm/ttm_bo.c | 22 ++
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a
e, so Daniel can tackle his
"drm_mm documentation" TODO list.
Cheers
David
David Herrmann (4):
drm/mm: add "best_match" to drm_mm_insert_node()
drm/ttm: replace drm_mm_pre_get() by direct alloc
drm/i915: pre-alloc instead of drm_mm search/get_block
drm/mm: remove unu
Add a "best_match" argument similar to the drm_mm_search_*() helpers so we
can convert TTM to use them in follow up patches. We can also inline the
non-generic helpers and move them into the header to allow compile-time
optimizations.
Signed-off-by: David Herrmann
---
drivers/gpu/dr
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
---
drivers/gpu/drm/ttm/ttm_bo_manager.c | 40 +---
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a
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
---
drivers/gpu/drm
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
node-cache in drm_mm. We can remove it now in a follow-up patch.
Cc: Daniel Vetter
Signed-off-by: David Herrmann
---
drivers/gpu/drm/i915
We need BUG_ON(), spinlock_t and standard kernel data-types so include the
right headers.
Signed-off-by: David Herrmann
---
include/drm/drm_mm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index a30c9aa..d3f0aa1 100644
--- a/include/drm
t occur
here on my machine, hmm. But I think fixing drm_mm.h is better than
changing the include-order in drm_vma_manager.h, so this is what I
did.
On Thu, Jul 25, 2013 at 6:02 PM, David Herrmann wrote:
> We need BUG_ON(), spinlock_t and standard kernel data-types so include the
> right h
mmap failure reported by Sedat Dilek in:
Re: linux-next: Tree for Jul 25 [ call-trace: drm | drm-intel related? ]
Cc: Sedat Dilek
Cc: Daniel Vetter
Cc: Chris Wilson
Signed-off-by: David Herrmann
---
drivers/gpu/drm/drm_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
:
0de23977cfeb5b357ec884ba15417ae118ff9e9b
"drm/gem: convert to new unified vma manager"
Fixes i915 gtt mmap failure reported by Sedat Dilek in:
Re: linux-next: Tree for Jul 25 [ call-trace: drm | drm-intel related? ]
Cc: Daniel Vetter
Cc: Chris Wilson
Signed-off-by: David Herrmann
Reported-by: Sedat Dilek
Tested
Hi
On Wed, Mar 28, 2012 at 8:14 PM, Ville Syrj?l?
wrote:
> On Wed, Mar 28, 2012 at 10:30:20AM -0700, Jesse Barnes wrote:
>> On Tue, 27 Mar 2012 16:57:29 +0200
>> David Herrmann wrote:
>>
>> > Hi
>> >
>> > Motivated by Jesse's letter to
501 - 600 of 1115 matches
Mail list logo