Re: [PATCH v1 1/1] drm: drop drm_bus from todo

2019-01-27 Thread David Herrmann
Hey On Sat, Jan 26, 2019 at 8:27 PM Sam Ravnborg wrote: > David Herrmann removed the last bits of drm_bus in: > c5786fe5f1c50941dbe27fc8b4aa1afee46ae893 ("drm: Goody bye, drm_bus!") > > Remove the todo item. > > Signed-off-by: Sam Ravnborg > Cc: David Herrmann &

Re: [PATCH] efifb: BGRT: Add nobgrt option

2018-09-13 Thread David Herrmann
Hi On Wed, Sep 12, 2018 at 11:12 AM Hans de Goede wrote: > > In some setups restoring the BGRT logo is undesirable, allow passing > video=efifb:nobgrt on the kernel commandline to disable it. > > Cc: David Herrmann > Reported-by: David Herrmann > Signed-off-by: Hans de Go

Re: [REGRESSION] boot-screen override by "34db50e55656 efifb: Copy the ACPI BGRT"

2018-09-03 Thread David Herrmann
Hey On Mon, Sep 3, 2018 at 4:47 PM Hans de Goede wrote: > > Hi, > > On 03-09-18 16:16, Bartlomiej Zolnierkiewicz wrote: > > > > Hi, > > > > On Monday, September 03, 2018 03:23:38 PM David Herrmann wrote: > >> Hey > >> > >> Since thi

[REGRESSION] boot-screen override by "34db50e55656 efifb: Copy the ACPI BGRT"

2018-09-03 Thread David Herrmann
Hey Since this commit: 34db50e55656 efifb: Copy the ACPI BGRT the kernel will override boot-splashs unasked. This breaks the graphical boot-process on our setups. In particular, we have a setup where an efi-boot-entry draws the early boot-splash on-screen, then hands-over to the

Re: [RFC v2 1/8] drm: provide management functions for drm_file

2018-01-09 Thread David Herrmann
Hi On Tue, Jan 9, 2018 at 11:20 AM, Daniel Vetter <dan...@ffwll.ch> wrote: > On Wed, Jan 03, 2018 at 11:21:03PM +0100, Noralf Trønnes wrote: >> From: David Herrmann <dh.herrm...@gmail.com> >> >> Rather than doing drm_file allocation/destruction right in the fops,

Re: [RFC v2 3/8] drm: Export some ioctl functions

2018-01-09 Thread David Herrmann
Hi On Tue, Jan 9, 2018 at 11:16 AM, Daniel Vetter wrote: > On Wed, Jan 03, 2018 at 11:21:05PM +0100, Noralf Trønnes wrote: >> Export the following functions so in-kernel users can allocate >> dumb buffers: >> - drm_file_alloc >> - drm_file_free >> - drm_prime_handle_to_fd_ioctl

Re: [PATCH v4] dma-buf/sync-file: Defer creation of sync_file->name

2017-05-15 Thread David Herrmann
Hey On Mon, May 15, 2017 at 1:42 PM, Chris Wilson <ch...@chris-wilson.co.uk> wrote: > On Mon, May 15, 2017 at 12:50:04PM +0200, David Herrmann wrote: >> Hey >> >> On Mon, May 15, 2017 at 12:10 PM, Chris Wilson <ch...@chris-wilson.co.uk> >> wrote: >&g

Re: [PATCH v4] dma-buf/sync-file: Defer creation of sync_file->name

2017-05-15 Thread David Herrmann
Hey On Mon, May 15, 2017 at 12:10 PM, Chris Wilson wrote: > Constructing the name takes the majority of the time for allocating a > sync_file to wrap a fence, and the name is very rarely used (only via > the sync_file status user interface). To reduce the impact on the

Re: [PATCH] drm: Document code of conduct

2017-04-11 Thread David Herrmann
morning: > > https://cgit.freedesktop.org/wayland/wayland/commit/?id=0eefe99fe0683ae409b665a8b18cc7eb648c6c0c > > Cc: Daniel Stone <dani...@collabora.com> > Cc: Keith Packard <kei...@keithp.com> > Cc: tfh...@err.no > Signed-off-by: Daniel Vetter <daniel.vet...@intel.com> Reviewe

Re: [PATCHv3 06/30] drm/omap: Add support for render nodes

2017-03-30 Thread David Herrmann
Hey On Wed, Mar 29, 2017 at 11:42 PM, Laurent Pinchart <laurent.pinch...@ideasonboard.com> wrote: > Hi David, > > On Wednesday 29 Mar 2017 14:51:48 David Herrmann wrote: >> On Wed, Mar 29, 2017 at 2:20 PM, Laurent Pinchart wrote: >> > On Wednesday 29 Mar 2017

Re: [PATCHv3 06/30] drm/omap: Add support for render nodes

2017-03-29 Thread David Herrmann
pdrm? > > It could be a valid use case, but it's still an API abuse. It starts sounding > like a DRM core issue to me. The DRIVER_RENDER flag is not documented, so its > exact meaning isn't defined. I thought it was supposed to flag the device as a > renderer (GPU). > > comm

Re: [PATCH 08/24] drm: Remove DRM_MINOR_CNT

2017-03-08 Thread David Herrmann
Hi On Wed, Mar 8, 2017 at 3:12 PM, Daniel Vetter <daniel.vet...@ffwll.ch> wrote: > This was originally added by David Herrmann for range checks, but > entirely unused. It confused me, so let's remove it. > > Cc: David Herrmann <dh.herrm...@gmail.com> > Signed-off-by

[PATCH] drm: add fourcc codes for 16bit R and GR

2017-01-02 Thread David Herrmann
Hi On Mon, Jan 2, 2017 at 11:41 AM, Rainer Hochecker wrote: > From: Rainer Hochecker > > Add fourcc codes for 16bit planes. Required by mesa for > eglCreateImageKHR to access P010 surfaces created by vaapi. > > Signed-off-by: Rainer Hochecker > --- > include/uapi/drm/drm_fourcc.h | 6 ++

[PATCH 10/17] drm/atomic-helpers: Remove outdated comment

2016-12-30 Thread David Herrmann
Hi On Thu, Dec 29, 2016 at 9:48 PM, Daniel Vetter wrote: > We forgot to clean this up when adding connector refcounting. > > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic_helper.c | 5 - > 1 file changed, 5 deletions(-) Patch 1-10 all: Reviewed-

[PATCH 04/17] dma-buf: use preferred struct reference in kernel-doc

2016-12-30 Thread David Herrmann
/linux/dma-buf.h | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) Reviewed-by: David Herrmann Thanks David > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index 91aff74ed092..ab814aff0a5b 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/dri

[PATCH 03/17] drm/mm: Some doc polish

2016-12-30 Thread David Herrmann
rst | 2 +- > drivers/gpu/drm/drm_mm.c | 41 +++-- > include/drm/drm_mm.h | 84 > ++-- > 3 files changed, 89 insertions(+), 38 deletions(-) I liked the "DRM Roaster" more than the "Roster"! Reviewed-by: David Herrmann T

[PATCH 01/17] drm/docs: Small cleanup in drm-uapi.rst

2016-12-30 Thread David Herrmann
> Cc: Tomeu Vizoso > Cc: Jani Nikula > Signed-off-by: Daniel Vetter > --- > Documentation/gpu/drm-uapi.rst | 25 +++-- > 1 file changed, 11 insertions(+), 14 deletions(-) Reviewed-by: David Herrmann Thanks David > diff --git a/Documentation/gpu/drm-ua

[PATCH 06/34] drm: Add a simple linear congruent generator PRNG

2016-12-13 Thread David Herrmann
Hey Chris On Tue, Dec 13, 2016 at 4:40 PM, Chris Wilson wrote: > On Tue, Dec 13, 2016 at 04:18:35PM +0100, David Herrmann wrote: >> On Tue, Dec 13, 2016 at 4:16 PM, David Herrmann >> wrote: >> > On Mon, Dec 12, 2016 at 12:53 PM, Chris Wilson > > chris-wilson.co

[PATCH 06/34] drm: Add a simple linear congruent generator PRNG

2016-12-13 Thread David Herrmann
On Tue, Dec 13, 2016 at 4:16 PM, David Herrmann wrote: > On Mon, Dec 12, 2016 at 12:53 PM, Chris Wilson > wrote: > for (i = 0; i < count; ++i) > swap(order[i], order[drm_lcg_random(state) % count]); > > Much simpler and I cannot see why it wouldn't work. Hint:

[PATCH 06/34] drm: Add a simple linear congruent generator PRNG

2016-12-13 Thread David Herrmann
Hey Chris On Mon, Dec 12, 2016 at 12:53 PM, Chris Wilson wrote: > For testing, we want a reproducible PRNG, a plain linear congruent > generator is suitable for our very limited selftests. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/Kconfig| 5 + >

[PATCH] drm: Add fake controlD* symlinks for backwards compat

2016-12-09 Thread David Herrmann
d a comment what exactly userspace minimally needs. > - Correct the analysis for -intel (Chris). > > Fixes: 8a357d10043c ("drm: Nerf DRM_CONTROL nodes") > Cc: Dave Airlie > Reported-by: Alex Deucher > Cc: Alex Deucher > Cc: David Herrmann > Cc: Greg Kroah-Hartman

[RFC PATCH 0/3] staging: remove fbdev drivers

2016-12-09 Thread David Herrmann
Hey On Fri, Dec 9, 2016 at 2:33 PM, Daniel Vetter wrote: >> > So it is possible, only reason vram dumb buffers look worse is that there's >> > only 3 and no one cares about them, vs about 20 and a very active community >> > of contributors (also for core drm improvements) for the other case. >>

[PATCH] drm: Add fake controlD* symlinks for backwards compat

2016-12-09 Thread David Herrmann
patch seems to be for sysfs. Yes, typo. It is meant to be sysfs. >> Fixes: 8a357d10043c ("drm: Nerf DRM_CONTROL nodes") >> Cc: Dave Airlie >> Reported-by: Alex Deucher >> Cc: Alex Deucher >> Cc: David Herrmann >> Cc: Greg Kroah-Hartman >> Signed-of

[PATCH] drm: Add fake controlD* symlinks for backwards compat

2016-12-09 Thread David Herrmann
ng, and the simplest way is to add a > symlink at the right place in debugfs from controlD* to card*. > > Fixes: 8a357d10043c ("drm: Nerf DRM_CONTROL nodes") > Cc: Dave Airlie > Reported-by: Alex Deucher > Cc: Alex Deucher > Cc: David

drm: GPF in drm_getcap

2016-11-26 Thread David Herrmann
Hi On Sat, Nov 26, 2016 at 7:07 PM, Dmitry Vyukov wrote: > grep "card0" dmesg: > [5.298617] device: 'card0': device_add > [5.298946] PM: Adding info for No Bus:card0 > [6.436178] device: 'card0': device_add > [6.436488] PM: Adding info for No Bus:card0 > > > # ls -l

drm: GPF in drm_getcap

2016-11-26 Thread David Herrmann
Hi On Sat, Nov 26, 2016 at 6:50 PM, Dmitry Vyukov wrote: > On Sat, Nov 26, 2016 at 6:35 PM, David Herrmann > wrote: >> Hi >> >> On Sat, Nov 26, 2016 at 6:17 PM, Dmitry Vyukov wrote: >>> On Fri, Sep 9, 2016 at 1:56 PM, Dmitry Vyukov wrote: >>>> He

drm: GPF in drm_getcap

2016-11-26 Thread David Herrmann
Hi On Sat, Nov 26, 2016 at 6:17 PM, Dmitry Vyukov wrote: > On Fri, Sep 9, 2016 at 1:56 PM, Dmitry Vyukov wrote: >> Hello, >> >> The following program triggers GPF in drm_getcap: >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >> #include >> #include >>

[PATCH] drm: Convert prime dma-buf <-> handle to rbtree

2016-09-27 Thread David Herrmann
ll time (igt/benchmarks/prime_lookup) - both are dramatic > improvements over the existing linear lists. > > v2: Favour rbtree over rhashtable > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94631 > Signed-off-by: Chris Wilson > Cc: Sean Paul > C

[PATCH] drm/udl: fix line iterator in damage handling

2016-09-23 Thread David Herrmann
Author: Noralf Trønnes Date: Thu Apr 28 17:18:37 2016 +0200 drm/udl: Use drm_fb_helper deferred_io support Tested-by: poma Reviewed-by: Daniel Vetter Signed-off-by: David Herrmann --- drivers/gpu/drm/udl/udl_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/2] drm: Don't swallow error codes in drm_dev_alloc()

2016-09-22 Thread David Herrmann
Hey On Wed, Sep 21, 2016 at 4:59 PM, Tom Gundersen wrote: > There are many reasons other than ENOMEM that drm_dev_init() can > fail. Return ERR_PTR rather than NULL to be able to distinguish > these in the caller. > > Signed-off-by: Tom Gundersen > --- Reviewed-by: David

[PATCH] drm/udl: Fix for the X server screen update v3

2016-09-21 Thread David Herrmann
Hi On Wed, Sep 21, 2016 at 1:19 PM, poma wrote: > On 21.09.2016 09:34, David Herrmann wrote: >> Hi >> >> On Wed, Sep 21, 2016 at 6:47 AM, poma wrote: >>> Within X server, on top of DisplayLink GPU USB2.0 device, >>> screen content is not refreshed

drm: NULL pointer dereference in drm_mode_object_find()

2016-09-21 Thread David Herrmann
Hi On Tue, Sep 20, 2016 at 11:25 AM, Alexander Potapenko wrote: > On Tue, Sep 20, 2016 at 11:21 AM, David Herrmann > wrote: >> Hi >> >> On Mon, Sep 5, 2016 at 10:30 AM, Dmitry Vyukov wrote: >>> On Fri, Aug 19, 2016 at 7:10 PM, Alexander

[PATCH] drm/udl: Fix for the X server screen update v3

2016-09-21 Thread David Herrmann
support" > > Thanks Noralf and Daniel for the comments. > > Tested-by: poma Can you provide your Signed-off-by: line? Reviewed-by: David Herrmann Thanks David > --- > drivers/gpu/drm/udl/udl_fb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

drm: NULL pointer dereference in drm_mode_object_find()

2016-09-20 Thread David Herrmann
Hi On Mon, Sep 5, 2016 at 10:30 AM, Dmitry Vyukov wrote: > On Fri, Aug 19, 2016 at 7:10 PM, Alexander Potapenko > wrote: >> Hello, >> >> the program below triggers a NULL deref in DRM code when ran on QEMU: >> >> === >> BUG: unable to handle

[PATCH v5 7/7] drm/simpledrm: add fbdev fallback support

2016-09-05 Thread David Herrmann
Hi On Sat, Sep 3, 2016 at 7:15 PM, Noralf Trønnes wrote: > > Den 03.09.2016 14:04, skrev Noralf Trønnes: >> >> >> Den 02.09.2016 10:22, skrev David Herrmann: >>> >>> Create a simple fbdev device during SimpleDRM setup so legacy user-space >>>

[PATCH v5 4/7] video: add generic framebuffer eviction

2016-09-05 Thread David Herrmann
Hi On Sat, Sep 3, 2016 at 2:06 PM, Noralf Trønnes wrote: > > Den 02.09.2016 10:22, skrev David Herrmann: >> >> There are several situations where we want hardware handover from an early >> boot GFX driver (e.g., vgacon, vesafb, efifb, simplefb) to a full fletched >&

[PATCH v5 6/7] drm: add SimpleDRM driver

2016-09-03 Thread David Herrmann
Hey On Sat, Sep 3, 2016 at 2:01 PM, Noralf Trønnes wrote: > > Den 02.09.2016 10:22, skrev David Herrmann: >> >> The SimpleDRM driver binds to simple-framebuffer devices and provides a >> DRM/KMS API. It provides only a single CRTC+encoder+connector combination

drm: WARNING in ioremap_wc

2016-09-02 Thread David Herrmann
Hey On Fri, Sep 2, 2016 at 2:23 PM, Dmitry Vyukov wrote: > On Mon, Aug 29, 2016 at 8:05 AM, Daniel Vetter wrote: >> On Sun, Aug 28, 2016 at 07:36:59PM +0200, Dmitry Vyukov wrote: >>> Hello, >>> >>> The following program triggers WARNING in ioremap_wc: >> >> Yup, that should also be fixed in

[PATCH v5 7/7] drm/simpledrm: add fbdev fallback support

2016-09-02 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 --- drivers/gpu/drm/simpledrm/Makefile | 1 + drivers/gpu/drm/simpledrm/simpledrm.h | 8 ++ drivers/gpu/drm/simpledrm/simpledrm_drv.c | 13

[PATCH v5 6/7] drm: add SimpleDRM driver

2016-09-02 Thread David Herrmann
is allowed (compared to earlier version of this driver) to avoid security issues. Furthermore, this way we can support arbitrary modes as long as we have a conversion-helper. Signed-off-by: David Herrmann --- MAINTAINERS | 6 + drivers/gpu/drm/Kconfig

[PATCH v5 5/7] drm: switch to sysfb_evict_conflicts()

2016-09-02 Thread David Herrmann
Switch over all DRM drivers to use the new sysfb_evict_conflicts() infrastructure. The only non-trivial conversion is i915, since it does not make use of the generic PCI resources, but assembles the apertures via intel ggtt queries. Signed-off-by: David Herrmann --- drivers/gpu/drm/Kconfig

[PATCH v5 4/7] video: add generic framebuffer eviction

2016-09-02 Thread David Herrmann
, basically removing *all* firmware framebuffers in effect. This only adds the generic sysfb helpers. No users are converted, yet. Signed-off-by: David Herrmann --- drivers/video/Kconfig | 4 + drivers/video/Makefile | 1 + drivers/video/sysfb.c | 327 ++

[PATCH v5 3/7] of/platform: expose of_platform_device_destroy()

2016-09-02 Thread David Herrmann
Signed-off-by: David Herrmann --- drivers/of/platform.c | 35 ++- include/linux/of_platform.h | 1 + 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f39ccd5..f9bb563 100644 --- a/drivers/of/

[PATCH v5 2/7] x86/sysfb: fix lfb_size calculation

2016-09-02 Thread David Herrmann
. While at it, avoid variable abbreviations and rename 'len' to 'length', and use the correct types matching the screen_info definition. Signed-off-by: David Herrmann --- arch/x86/kernel/sysfb_simplefb.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git

[PATCH v5 1/7] x86/sysfb: add support for 64bit EFI lfb_base

2016-09-02 Thread David Herrmann
ure the address is not 0 (i.e., unset), as well as does not overflow the physical address type. Signed-off-by: David Herrmann --- arch/x86/kernel/sysfb_simplefb.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/sysfb_simplefb.c b/arch/x86/ker

[PATCH v5 0/7] drm: add simpledrm driver

2016-09-02 Thread David Herrmann
let me know. Thanks David David Herrmann (7): x86/sysfb: add support for 64bit EFI lfb_base x86/sysfb: fix lfb_size calculation of/platform: expose of_platform_device_destroy() video: add generic framebuffer eviction drm: switch to sysfb_evict_conflicts() drm: add SimpleDRM driver drm

[PATCH v4 3/5] drm: add SimpleDRM driver

2016-09-02 Thread David Herrmann
The driver was originally written by David Herrmann in 2014. > My main contribution is to make use of drm_simple_kms_helper and > rework the probe path to avoid use of the deprecated drm_platform_init() > and drm_driver.{load,unload}(). > Additions have also been made for later changes to the

[PATCH 6/6] drm: cleanup drm_core_{init,exit}()

2016-09-01 Thread David Herrmann
reverse order of initialization (except if the order actually matters for syncing-reasons, which is not the case here, though). v2: - Call drm_core_exit() directly from the init-error-handler. Requires to drop __exit annotation, though. Signed-off-by: David Herrmann --- drivers/gpu/drm

[PATCH 5/6] drm: drop obsolete drm_core.h

2016-09-01 Thread David Herrmann
breaks backports and as such is deprecated, anyway. We just keep them for historic reasons. I doubt anyone will ever modify them again. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 8 +++- drivers/gpu/drm/drm_internal.h | 3 +++ drivers/gpu/drm/drm_ioc32.c

[PATCH 4/6] drm: provide management functions for drm_file

2016-09-01 Thread David Herrmann
of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 135 + drivers/gpu/drm/drm_fops.c | 132 +++- drivers/gpu

[PATCH 3/6] drm: rename drm_file.filp to drm_file.legacy_filp

2016-09-01 Thread David Herrmann
We don't want anyone but legacy DRM1 code to use drm_file.filp. Especially for in-kernel contexts, this might be set to NULL, so lets make sure no-one accesses it, ever. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_bufs.c | 7 --- drivers/gpu/drm/drm_fops.c | 2 +- include/drm

[PATCH 2/6] drm: use drm_file to tag vm-bos

2016-09-01 Thread David Herrmann
Rather than using "struct file*", use "struct drm_file*" as tag VM tag for BOs. This will pave the way for "struct drm_file*" without any "struct file*" back-pointer. Signed-off-by: David Herrmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- driv

[PATCH 1/6] drm: remove redundant drm_file->uid

2016-09-01 Thread David Herrmann
debugging, anyway. Since we already are in an rcu-read-side, we can use __task_cred() rather than task_cred_xxx(). Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c | 1 - drivers/gpu/drm/drm_info.c | 4 +++- include/drm/drmP.h | 1 - 3 files changed, 3 insertions(+), 3

[PATCH 0/6] DRM Core Cleanups

2016-09-01 Thread David Herrmann
Hey The remaining cleanup patches pending on dri-devel in one batch. Random cleanups all over the place. Should all be straightforward. Thanks David David Herrmann (6): drm: remove redundant drm_file->uid drm: use drm_file to tag vm-bos drm: rename drm_file.filp to drm_file.legacy_f

[RFC] drm: implement generic firmware eviction

2016-08-31 Thread David Herrmann
Hey Rob! On Wed, Aug 31, 2016 at 1:01 AM, Rob Herring <robh+dt at kernel.org> wrote: > On Tue, Aug 30, 2016 at 4:12 PM, David Herrmann > wrote: >> Currently I see at least 3 paths that might add such nodes: >> >> - of_platform_populate() > > If we

[RFC] drm: implement generic firmware eviction

2016-08-31 Thread David Herrmann
Hi On Tue, Aug 30, 2016 at 10:58 PM, Rob Herring <robh+dt at kernel.org> wrote: > On Tue, Aug 30, 2016 at 2:30 PM, David Herrmann > wrote: >> Sure, all those functions are not meant to be called in parallel by >> multiple tasks. They are rather meant to have a single ho

[RFC] drm: implement generic firmware eviction

2016-08-30 Thread David Herrmann
Hi Rob On Fri, Aug 26, 2016 at 2:36 PM, Rob Herring <robh+dt at kernel.org> wrote: > On Thu, Aug 25, 2016 at 7:00 PM, David Herrmann > wrote: >> Provide a generic DRM helper that evicts all conflicting firmware >> framebuffers, devices, and drivers.

[RFC] drm: implement generic firmware eviction

2016-08-26 Thread David Herrmann
Hi On Fri, Aug 26, 2016 at 9:57 AM, Hans de Goede wrote: > Hi, > > On 26-08-16 02:00, David Herrmann wrote: >> >> Provide a generic DRM helper that evicts all conflicting firmware >> framebuffers, devices, and drivers. The new helper is called >> drm_evic

[RFC] drm: implement generic firmware eviction

2016-08-26 Thread David Herrmann
bus, before calling into drm_dev_register(). Signed-off-by: David Herrmann --- Hey This is just compile-tested for now. I just want to get some comments on the design. I decided to drop the sysfb infrastructure and rather just use this generic helper. It keeps things simple and should work just f

[PATCH v2] drm: cleanup drm_core_{init,exit}()

2016-08-25 Thread David Herrmann
reverse order of initialization (except if the order actually matters for syncing-reasons, which is not the case here, though). v2: - Call drm_core_exit() directly from the init-error-handler. Requires to drop __exit annotation, though. Signed-off-by: David Herrmann --- Hey This is based

[PATCH] drm: drop obsolete drm_core.h

2016-08-25 Thread David Herrmann
breaks backports and as such is deprecated, anyway. We just keep them for historic reasons. I doubt anyone will ever modify them again. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 8 +++- drivers/gpu/drm/drm_internal.h | 3 +++ drivers/gpu/drm/drm_ioc32.c

[PATCH v2] drm: reduce GETCLIENT to a minimum

2016-08-25 Thread David Herrmann
avoids any dependency on priv->uid or priv->pid (allows us to get rid of them), and makes libva happy by always *exactly* returning the information it wants. Signed-off-by: David Herrmann --- v2: Just re-order the series and send individual patches, since they do not depend on each other.

[RFC 1/3] drm: Add a way to iterate over minors

2016-08-24 Thread David Herrmann
Hey On Wed, Aug 10, 2016 at 4:34 PM, Daniel Vetter wrote: > On Wed, Aug 10, 2016 at 4:27 PM, Noralf Trønnes > wrote: >> Den 10.08.2016 10:43, skrev Daniel Vetter: >>> >>> On Tue, Aug 09, 2016 at 07:45:40PM +0200, Noralf Trønnes wrote: This adds a way for in-kernel users to iterate

[PATCH 0/2] drm: add SimpleDRM driver

2016-08-04 Thread David Herrmann
Hi On Thu, Aug 4, 2016 at 10:01 PM, Daniel Vetter wrote: > On Thu, Aug 04, 2016 at 02:50:37PM -0500, Ken Phillis Jr wrote: >> I believe this driver is extremely useful, and I see possible issues with >> the fact that the driver is GPL Only. This driver is critical for devices >> that lack a

[PATCH 0/2] drm: add SimpleDRM driver

2016-08-04 Thread David Herrmann
Hi On Thu, Aug 4, 2016 at 5:34 PM, Luc Verhaegen wrote: > Do we really want to recreate a 400+ email thread again, or are we > capable of learning from the past? No we don't. And no-one intends to. I am fully aware of the discussion that introduced the clock-dependencies to simplefb, and I

[PATCH 5/8] drm: use drm_file to tag vm-bos

2016-08-04 Thread David Herrmann
Hey On Thu, Aug 4, 2016 at 10:16 AM, Daniel Vetter wrote: > On Wed, Aug 03, 2016 at 08:08:19PM +0100, Chris Wilson wrote: >> On Wed, Aug 03, 2016 at 08:04:29PM +0200, David Herrmann wrote: >> > Rather than using "struct file*", use "struct drm_file*" as t

[PATCH 2/8] drm: remove redundant drm_file->uid

2016-08-04 Thread David Herrmann
Hey On Wed, Aug 3, 2016 at 9:01 PM, Chris Wilson wrote: > On Wed, Aug 03, 2016 at 08:04:26PM +0200, David Herrmann wrote: >> @@ -98,13 +99,14 @@ int drm_clients_info(struct seq_file *m, void *data) >> >> rcu_read_lock(); /* locks pid_task()->comm

[PATCH] drm: Declare that create drm_mm nodes with size 0 is illegal

2016-08-04 Thread David Herrmann
ve undefined behaviour. Add a couple of WARNs upon creating the > drm_mm node to prevent later bugs. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/drm_mm.c | 9 + > 1 file changed, 9 insertions(+) Reviewed-by: David Herrmann Thanks David > diff --git a/d

[PATCH 2/2] drm: make DRI1 drivers depend on BROKEN

2016-08-04 Thread David Herrmann
and friends to get working graphics. Lets hide the old drivers behind CONFIG_BROKEN. In case they turn out to be still used (really?), we can easily revert this and figure out a way to move them out of sight (e.g., moving all DRI1 drivers to drivers/gpu/dri1/). Signed-off-by: David Herrmann --- drivers

[PATCH 1/2] drm: hide legacy drivers with CONFIG_DRM_LEGACY

2016-08-04 Thread David Herrmann
Lets move forward and hide the remaining DRI1 drivers behind a config option, so we have a central place to disable them all. Furthermore, we can provide a clear warning to anyone enabling them. Signed-off-by: David Herrmann --- drivers/gpu/drm/Kconfig | 135

[PATCH 2/2] drm: Used DRM_LEGACY for all legacy functions

2016-08-04 Thread David Herrmann
amp;& > - drm_core_check_feature(dev, DRIVER_MODESET)) > + !drm_core_check_feature(dev, DRIVER_LEGACY)) > return -EINVAL; > > DRM_DEBUG("%d\n", ctx->handle); > diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c > index

[PATCH 1/2] drm: Mark up legacy/dri1 drivers with DRM_LEGACY

2016-08-04 Thread David Herrmann
drmP.h | 1 + > 9 files changed, 14 insertions(+), 11 deletions(-) Reviewed-by: David Herrmann Also, how about this: diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index fc35731..e609cfc 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -111

simpledrm problem: Kconfig:error: recursive dependency detected!

2016-08-04 Thread David Herrmann
Hey On Thu, Aug 4, 2016 at 9:04 AM, Jani Nikula wrote: > On Wed, 03 Aug 2016, Noralf Trønnes wrote: >> Hi, >> >> I have changed simpledrm to use drm_simple_kms_helper and now I'm >> facing this: >> >> drivers/video/fbdev/Kconfig:5:error: recursive dependency detected! >> For a resolution

[PATCH 8/8] drm: provide management functions for drm_file

2016-08-03 Thread David Herrmann
of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 135 + drivers/gpu/drm/drm_fops.c | 132 +++- drivers/gpu

[PATCH 7/8] drm: rename drm_file.filp to drm_file.legacy_filp

2016-08-03 Thread David Herrmann
We don't want anyone but legacy DRM1 code to use drm_file.filp. Especially for in-kernel contexts, this might be set to NULL, so lets make sure no-one accesses it, ever. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_bufs.c | 7 --- drivers/gpu/drm/drm_fops.c | 2 +- include/drm

[PATCH 6/8] drm: use priv->pid to deduce task EUID

2016-08-03 Thread David Herrmann
Rather than accessing priv->filp->f_cred, use priv->pid->task->creds. We want to get rid of "priv->filp", so lets avoid it if possible. Since we already are in an rcu-read-side, we can use __task_cred() rather than task_cred_xxx(). Signed-off-by: David Herrmann ---

[PATCH 5/8] drm: use drm_file to tag vm-bos

2016-08-03 Thread David Herrmann
Rather than using "struct file*", use "struct drm_file*" as tag VM tag for BOs. This will pave the way for "struct drm_file*" without any "struct file*" back-pointer. Signed-off-by: David Herrmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- dri

[PATCH 4/8] drm: make vma-manager entries untyped

2016-08-03 Thread David Herrmann
uot; and make sure callers can use arbitrary tags. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_vma_manager.c | 40 +++ include/drm/drm_vma_manager.h | 18 -- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/driver

[PATCH 3/8] drm: reduce GETCLIENT to a minimum

2016-08-03 Thread David Herrmann
avoids any dependency on priv->uid or priv->pid (allows us to get rid of them), and makes libva happy by always *exactly* returning the information it wants. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_ioctl.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a

[PATCH 2/8] drm: remove redundant drm_file->uid

2016-08-03 Thread David Herrmann
>f_cred->euid if available. The pointer-chasing will not hurt us, since it is only about debugging, anyway. Check priv->filp for NULL before deref, to prepare for in-kernel contexts (if they ever appear). We should not rely on "struct file" contexts to be around at all times, anyway

[PATCH 1/8] drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY

2016-08-03 Thread David Herrmann
Furthermore, this is in no way a legacy node, so lets not call it that. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 14 +++--- include/drm/drmP.h| 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c

[PATCH 0/8] DRM File Context Cleanups

2016-08-03 Thread David Herrmann
t rid of all non-legacy users of it. The only real place left is vm_mmap() in drm_bufs.c. Tested on i915 only. Thanks David David Herrmann (8): drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY drm: remove redundant drm_file->uid drm: reduce GETCLIENT to a minimum drm: make vma-manager

[PATCH 1/3] drm: Track drm_mm nodes with an interval tree

2016-08-03 Thread David Herrmann
minating the linear walk is a significant improvement. > > v2: Use generic interval-tree template for u64 and faster insertion. > > Signed-off-by: Chris Wilson > Cc: David Herrmann > Cc: dri-devel at lists.freedesktop.org > --- > drivers/gpu/drm/drm_mm.c | 133 > +++

[PATCH 3/3] drm: Skip initialising the drm_mm_node->hole_stack

2016-08-03 Thread David Herrmann
Hi Chris On Wed, Aug 3, 2016 at 5:04 PM, Chris Wilson wrote: > As we always add this to the drm_mm->hole_stack as our first operation, > we do not need to initialise the list node. > > Signed-off-by: Chris Wilson > Cc: David Herrmann > Cc: dri-devel at lists.freedesktop

[PATCH 2/3] drm: Convert drm_vma_manager to embedded interval-tree in drm_mm

2016-08-03 Thread David Herrmann
Hi Chris On Wed, Aug 3, 2016 at 5:04 PM, Chris Wilson wrote: > Having added an interval-tree to struct drm_mm, we can replace the > auxiliary rb-tree inside the drm_vma_manager with it. > > Signed-off-by: Chris Wilson > Cc: David Herrmann > Cc: dri-devel at lists.freedesktop

[RFC 0/3] drm: Add DRM text mode

2016-08-02 Thread David Herrmann
Hey On Thu, Jul 28, 2016 at 4:15 PM, Noralf Trønnes wrote: > This patchset explores the idea of adding a DRM text mode > (like VGA text mode) to get an alternative to fbcon/fbdev. > > David Hermann has done alot of work on a fbcon replacement: > - drm: add kernel-log renderer (Mar 2014)[1] > -

[PATCH 1/3 v4] drm: Introduce drm_connector_register_all() helper

2016-03-29 Thread David Herrmann
driver-specific implementations with the generic one. > > Signed-off-by: Alexey Brodkin > Cc: Daniel Vetter > Cc: David Airlie > Cc: David Herrmann > --- > > Changes v3 -> v4: > * In drm_connector_register_all() fail path which calls unregister_all() >is moved

[PATCH] dma-buf: Update docs for SYNC ioctl

2016-03-29 Thread David Herrmann
Hi On Mon, Mar 28, 2016 at 9:42 PM, Tiago Vignatti wrote: > Do we have an agreement here after all? David? I need to know whether this > fixup is okay to go cause I'll need to submit to Chrome OS then. Sure it is fine. The code is already there, we cannot change it. Thanks David

[RFC 1/5] drm: Add DRM support for tiny LCD displays

2016-03-23 Thread David Herrmann
Hey On Wed, Mar 16, 2016 at 2:34 PM, Noralf Trønnes wrote: > tinydrm provides a very simplified view of DRM for displays that has > onboard video memory and is connected through a slow bus like SPI/I2C. > > Signed-off-by: Noralf Trønnes > --- > drivers/gpu/drm/Kconfig

[PATCH] dma-buf: Update docs for SYNC ioctl

2016-03-23 Thread David Herrmann
Hi On Wed, Mar 23, 2016 at 12:56 PM, Chris Wilson wrote: > On Wed, Mar 23, 2016 at 12:30:42PM +0100, David Herrmann wrote: >> My question was rather about why we do this? Semantics for EINTR are >> well defined, and with SA_RESTART (default on linux) user-space can >&g

[PATCH] dma-buf: Update docs for SYNC ioctl

2016-03-23 Thread David Herrmann
Hey On Mon, Mar 21, 2016 at 6:14 PM, Daniel Vetter wrote: > On Mon, Mar 21, 2016 at 01:26:58PM +0100, David Herrmann wrote: >> Hi >> >> On Mon, Mar 21, 2016 at 8:51 AM, Daniel Vetter >> wrote: >> > Just a bit of wording polish plus mentioning that it

[PATCH 2/4 v3] drm: Introduce drm_connector_register_all() helper

2016-03-23 Thread David Herrmann
Hi On Wed, Mar 23, 2016 at 9:42 AM, Alexey Brodkin wrote: > As a pair to already existing drm_connector_unregister_all() we're adding > generic implementation of what is already done in some drivers. > > Once this helper is implemented we'll be ready to switch existing > driver-specific

[PATCH] dma-buf: Update docs for SYNC ioctl

2016-03-21 Thread David Herrmann
Hi On Mon, Mar 21, 2016 at 8:51 AM, Daniel Vetter wrote: > Just a bit of wording polish plus mentioning that it can fail and must > be restarted. > > Requested by Sumit. > > v2: Fix them typos (Hans). > > Cc: Chris Wilson > Cc: Tiago Vignatti > Cc: Stéphane M

drm: fix blob pointer check

2016-03-11 Thread David Herrmann
Hey On Fri, Mar 11, 2016 at 12:52 PM, Lionel Landwerlin wrote: > Thanks a lot for pointing this out. I saw you previous comment but didn't > realize the issue. > I'll set the pointer to NULL. > > I don't if there is an agreement on this, but do you think the unref/free > functions should check

[PATCH v3 2/2] drm: remove drm_device_is_unplugged and related code

2016-02-26 Thread David Herrmann
quot; flag hack, which puts the device in a > non-functional state after USB unplug and rejects most operations on > the device such as ioctls with error -ENODEV. > > Signed-off-by: Haixia Shi > Reviewed-by: Stéphane Marchesin > Cc: David Herrmann > Cc: Daniel Vetter > --- >

[PATCH, RESEND] drm: avoid uninitialized timestamp use in wait_vblank

2016-02-26 Thread David Herrmann
997,8 +997,10 @@ u32 drm_vblank_count_and_time(struct drm_device *dev, > unsigned int pipe, > int count = DRM_TIMESTAMP_MAXRETRIES; > u32 cur_vblank; > > - if (WARN_ON(pipe >= dev->num_crtcs)) > + if (WARN_ON(pipe >= dev->num_crtcs)) { > +

[PATCH v9] dma-buf: Add ioctls to allow userspace to flush

2016-02-12 Thread David Herrmann
ut sync usage. > v9 (Tiago): remove useless is_dma_buf_file check. Fix sync.flags conditionals > and its mask order check. Add include in dma-buf.h. > > Cc: Ville Syrjälä > Cc: David Herrmann > Cc: Sumit Semwal > Reviewed-by: Stéphane Marchesin > Signed-off-by: Dan

[PATCH v7 3/5] dma-buf: Add ioctls to allow userspace to flush

2016-02-11 Thread David Herrmann
Hi On Thu, Feb 11, 2016 at 7:08 PM, Ville Syrjälä wrote: > On Thu, Feb 11, 2016 at 03:54:38PM -0200, Tiago Vignatti wrote: >> >> Thanks for reviewing, David. Please take a look in my comments in-line. >> >> >> On 02/09/2016 07:26 AM, David Herrmann wrote: >

[PATCH v7 3/5] dma-buf: Add ioctls to allow userspace to flush

2016-02-11 Thread David Herrmann
Hi On Thu, Feb 11, 2016 at 6:54 PM, Tiago Vignatti wrote: > On 02/09/2016 07:26 AM, David Herrmann wrote: >>> + >>> + switch (cmd) { >>> + case DMA_BUF_IOCTL_SYNC: >>> + if (copy_from_user(, (void __user *) arg, >>> s

[PATCH v2 2/2] drm: remove drm_device_is_unplugged checks in common drm code.

2016-02-11 Thread David Herrmann
Hi On Thu, Feb 11, 2016 at 12:18 AM, Haixia Shi wrote: > When USB cable is disconnected, we mark udl device as unplugged so that > udl_detect reports connector status as disconnected, but still keep > the drm device alive until user-space closes it. > > Signed-off-by: Haixia Shi > Reviewed-by:

  1   2   3   4   5   6   7   8   9   10   >