[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] > - k

[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

[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 1/3] drm: Track drm_mm nodes with an interval tree

2016-08-03 Thread David Herrmann
ing 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 0/8] DRM File Context Cleanups

2016-08-03 Thread David Herrmann
to get 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-man

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

2016-08-03 Thread David Herrmann
ame). 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/driver

[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 3/8] drm: reduce GETCLIENT to a minimum

2016-08-03 Thread David Herrmann
minimum, 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(-) di

[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 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 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 +- includ

[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 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

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 refer

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

2016-08-04 Thread David Herrmann
; include/drm/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/

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

2016-08-04 Thread David Herrmann
ctx *ctx = data; > > if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) && > - drm_core_check_feature(dev, DRIVER_MODESET)) > + !drm_core_check_feature(dev, DRIVER_LEGACY)) > return -EINVAL; > > DRM_DEBUG("%d\n&q

[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: make DRI1 drivers depend on BROKEN

2016-08-04 Thread David Herrmann
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] 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/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 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 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 gladl

[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 prope

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: [PATCHv3 06/30] drm/omap: Add support for render nodes

2017-03-29 Thread David Herrmann
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). > > commit 1793126fcebd7c18834f95d43b55e387a8803aa

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

2017-03-29 Thread David Herrmann
Hey On Wed, Mar 29, 2017 at 11:42 PM, Laurent Pinchart 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 11:58:23 Tomi Valkeinen wrote: >> >>

Re: [PATCH] drm: Document code of conduct

2017-04-11 Thread David Herrmann
://cgit.freedesktop.org/wayland/wayland/commit/?id=0eefe99fe0683ae409b665a8b18cc7eb648c6c0c > > Cc: Daniel Stone > Cc: Keith Packard > Cc: tfh...@err.no > Signed-off-by: Daniel Vetter Reviewed-by: David Herrmann Thanks David > --- > Documentation/gpu/introduction.rst | 11

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 >> #in

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 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 /dev/dri/card0

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 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 > Signed-off-by: Daniel Vetter > --- > include/drm/drmP.h

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 common > path (that of crea

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 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 >> wrote: >> > Constructing the name takes the majority of the time for a

[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

[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 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 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 +- includ

[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 5/6] drm: drop obsolete drm_core.h

2016-09-01 Thread David Herrmann
the global ioctl handlers. Furthermore, versioning interfaces 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 +++- dri

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

2016-09-01 Thread David Herrmann
andlers in the exact 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

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

2016-09-02 Thread David Herrmann
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 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 v5 1/7] x86/sysfb: add support for 64bit EFI lfb_base

2016-09-02 Thread David Herrmann
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 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 deleti

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

2016-09-02 Thread David Herrmann
ever removed. 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 --

[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 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 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 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

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 linu

[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

[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 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 >>>

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 kerne

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 Potapenko >

[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

[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

[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 line iterator in damage handling

2016-09-23 Thread David Herrmann
4755ed4ae0 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 deletio

[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: 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, RESEND] drm: avoid uninitialized timestamp use in wait_vblank

2016-02-26 Thread David Herrmann
++ b/drivers/gpu/drm/drm_irq.c > @@ -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(pip

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

2016-02-26 Thread David Herrmann
; 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] configure.ac: disable annoying warning -Wmissing-field-initializers

2016-01-16 Thread David Herrmann
using memset and getting a warning "memset initializes the > memory to zero". How useful is that? The only use of this warning is to prevent people from learning that {} initializes any non-specified field to 0. Reviewed-by: David Herrmann Thanks David

[PATCH] drm: Add missing __user annotation

2014-07-21 Thread David Herrmann
Hi On Mon, Jul 21, 2014 at 1:24 PM, Thierry Reding wrote: > From: Thierry Reding > > The drm_copy_field() function copies strings into userspace buffers, so > the first parameter needs to have a __user annotation to avoid warnings > from the sparse checker. Reviewed-by: David He

[PATCH 00/12] DRM: Random Cleanups

2014-07-23 Thread David Herrmann
Hi A bunch of random cleanups I stumbled on when reworking the init-logic. Most of them should be fairly trivial. Also available in my fdo-repository: http://cgit.freedesktop.org/~dvdhrm/linux/log/?h=drm-next Comments welcome! David David Herrmann (12): drm: remove unused "s

[PATCH 02/12] drm: drop unused "struct drm_queue"

2014-07-23 Thread David Herrmann
This object is unused, drop it. Signed-off-by: David Herrmann --- include/drm/drmP.h | 17 - 1 file changed, 17 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 335b7b8..d3d9be6 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -430,23 +430,6

[PATCH 01/12] drm: remove unused "struct drm_freelist"

2014-07-23 Thread David Herrmann
This object is not used except for static fields in drm_bufs *cough*. Inline the watermark fields and drop the unused structure definition. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_bufs.c | 17 - drivers/gpu/drm/drm_info.c | 2 +- include/drm/drmP.h | 15

[PATCH 03/12] drm: call ->firstopen() before ->open()

2014-07-23 Thread David Herrmann
ject if ->firstopen() fails. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c | 139 + include/drm/drmP.h | 2 +- 2 files changed, 66 insertions(+), 75 deletions(-) diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops

[PATCH 04/12] drm: extract legacy ctxbitmap flushing

2014-07-23 Thread David Herrmann
. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_context.c | 30 ++ drivers/gpu/drm/drm_fops.c| 20 +--- include/drm/drmP.h| 1 + 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/drm_context.c b

[PATCH 05/12] drm: drop i386 verification

2014-07-23 Thread David Herrmann
pport code. Furthermore, as the commit-message states, all 486+ CPUs support the CMPXCHG instruction and thus even legacy DRM can run fine. Drop the now superfluous "x86 == 3" check. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c | 4 1 file changed, 4 deletions(-

[PATCH 07/12] drm: drop redundant drm_file->is_master

2014-07-23 Thread David Herrmann
r->master is NULL, it is only set by places that also adjust drm_file->is_master. Therefore, we can safely drop is_master and replace it by an inline helper that matches: drm_file->master && drm_file->master == drm_file->minor->master Signed-off-by: David Herrmann --- dri

[PATCH 06/12] drm: fix __alpha__ PCI lookup

2014-07-23 Thread David Herrmann
Testing the return value of list_entry() for NULL is a no-op (as it is just a fancy container_of() / offsetof()). Drop the superfluous if-clause and instead verify the actual root-node is available. This is probably what it was meant to test for from the beginning, anyway. Signed-off-by: David

[PATCH 08/12] drm: don't de-authenticate clients on master-close

2014-07-23 Thread David Herrmann
hing VTs) so don't do it on active-close either! Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c | 13 ++--- include/drm/drmP.h | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index

[PATCH 09/12] drm: move module initialization to drm_stub.c

2014-07-23 Thread David Herrmann
dispatcher drm_ioctl.c: Actual ioctl backends drm_fops.c: Char-dev file-operations A follow-up patch will move what is left from drm_drv.c into drm_ioctl.c. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 59 --- drivers/gpu/drm/drm_fops.c | 39

[PATCH 10/12] drm: merge drm_drv.c into drm_ioctl.c

2014-07-23 Thread David Herrmann
All that is left in drm_drv.c is ioctl management. Merge it into drm_ioctl.c so we have all ioctl management in one file (and the name is much more fitting). Maybe we should now rename drm_stub.c to drm_drv.c again? Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 412

[PATCH 11/12] drm: make minor->index available early

2014-07-23 Thread David Herrmann
d-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 84 +- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index b249f14..8b24db5 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/dr

[PATCH 12/12] drm: make sysfs device always available for minors

2014-07-23 Thread David Herrmann
ter* ->load() is called. This patch makes minor->kdev available early, but only adds the device during minor-registration. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 22 --- drivers/gpu/drm/drm_sysfs.c | 90 +++-- include/d

[PATCH 10/12] drm: merge drm_drv.c into drm_ioctl.c

2014-07-23 Thread David Herrmann
Hi On Wed, Jul 23, 2014 at 5:26 PM, David Herrmann wrote: > All that is left in drm_drv.c is ioctl management. Merge it into > drm_ioctl.c so we have all ioctl management in one file (and the name is > much more fitting). > > Maybe we should now rename drm_stub.c to drm_drv.c ag

[PATCH] [rfc] drm: close race in connector registration

2014-07-24 Thread David Herrmann
t drm_connector_register(struct drm_connector > *connector) > { > int ret; > > + drm_mode_object_register(connector->dev, &connector->base); > + This is the same we do for minor-objects, so fine with me. I'd prefer if the registration is done la

[PATCH] [rfc] drm: close race in connector registration

2014-07-24 Thread David Herrmann
Hi On Thu, Jul 24, 2014 at 10:49 AM, Dave Airlie wrote: >> >> This is the same we do for minor-objects, so fine with me. I'd prefer >> if the registration is done last in drm_connector_register(), not >> first, but I'm not sure the debugfs hooks work without the connector >> available in the look

[PATCH 03/12] drm: call ->firstopen() before ->open()

2014-07-24 Thread David Herrmann
Hi On Wed, Jul 23, 2014 at 9:25 PM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:38PM +0200, David Herrmann wrote: >> Lets order things correctly: >> ->load() >>->fistopen() >> ->open() >> ->close() >>->lastclose()

[PATCH 04/12] drm: extract legacy ctxbitmap flushing

2014-07-24 Thread David Herrmann
Hi On Wed, Jul 23, 2014 at 9:26 PM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:39PM +0200, David Herrmann wrote: >> The ctxbitmap code is only used by legacy drivers so lets try to keep it >> as separated as possible. Furthermore, the locking is non-obvious and >

[PATCH 11/12] drm: make minor->index available early

2014-07-24 Thread David Herrmann
Hi On Thu, Jul 24, 2014 at 12:03 PM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:46PM +0200, David Herrmann wrote: >> Instead of allocating the minor-index during registration, we now do this >> during allocation. This way, debug-messages between minor-allocati

[PATCH 12/12] drm: make sysfs device always available for minors

2014-07-24 Thread David Herrmann
Hi On Thu, Jul 24, 2014 at 12:36 PM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:47PM +0200, David Herrmann wrote: >> For each minor we allocate a sysfs device as minor->kdev. Currently, this >> is allocated and registered in drm_minor_register(). This makes it &g

[PATCH 02/12] drm: drop unused "struct drm_queue"

2014-07-24 Thread David Herrmann
Hi On Wed, Jul 23, 2014 at 9:35 PM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:37PM +0200, David Herrmann wrote: >> This object is unused, drop it. >> >> Signed-off-by: David Herrmann > > Funny how after even all my "kill stuff with fire" series t

[PATCH] drm: Unlink dead file_priv from list of active files first

2014-07-24 Thread David Herrmann
> 28 48 81 c6 48 80 00 00 e8 80 14 01 00 84 c0 74 bc 49 > RIP [] per_file_stats+0x110/0x160 [i915] > RSP > > Reported-by: "Ursulin, Tvrtko" > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81712 > Signed-off-by: Chris Wilson > Cc: "Urs

[PATCH 07/12] drm: drop redundant drm_file->is_master

2014-07-24 Thread David Herrmann
Hi On Thu, Jul 24, 2014 at 11:52 AM, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 05:26:42PM +0200, David Herrmann wrote: >> The drm_file->is_master field is redundant as it's equivalent to: >> drm_file->master && drm_file->master == drm_file->mino

[PATCH] imx-drm: imx-drm-core: Convert to drm_is_master()

2014-07-25 Thread David Herrmann
Hi On Fri, Jul 25, 2014 at 5:08 AM, Fabio Estevam wrote: > From: Fabio Estevam > > Since commit fe32c9f34b9e ("drm: drop redundant drm_file->is_master") > we should use drm_is_master, otherwise the following build error is seen: > > drivers/staging/imx-drm/imx-drm-core.c: In function 'imx_drm_dr

[PATCH 07/12] drm: drop redundant drm_file->is_master

2014-07-28 Thread David Herrmann
Hi On Fri, Jul 25, 2014 at 9:56 AM, Daniel Vetter wrote: > On Thu, Jul 24, 2014 at 11:38:28PM +0200, David Herrmann wrote: >> On Thu, Jul 24, 2014 at 11:52 AM, Daniel Vetter wrote: >> > On Wed, Jul 23, 2014 at 05:26:42PM +0200, David Herrmann wrote: >> >> +static i

[PATCH] drm: Don't export internal module variables

2014-06-01 Thread David Herrmann
LANK_OFF_DELAY; You know that this is 5,000 by default and VBLANK_OFF_DELAY is 50,000? Not sure whether that was a typo or was explicitly set this way. If that change is intentional: Reviewed-by: David Herrmann Thanks David > - > platform_set_drvdata(dev->platformdev, dev); >

[PATCH] drm: Don't export internal module variables

2014-06-02 Thread David Herrmann
Hi On Mon, Jun 2, 2014 at 10:01 AM, Daniel Vetter wrote: > On Sun, Jun 01, 2014 at 02:04:45PM +0200, David Herrmann wrote: >> Hi >> >> On Thu, May 29, 2014 at 7:25 PM, Daniel Vetter >> wrote: >> > Drivers really have no business touching these. Noticed

[PATCH 4/5] drm/omap: use __GFP_DMA32 for shmem-backed gem

2014-06-02 Thread David Herrmann
constant for now. > > Remove the now superfluous TODO in omap_gem.c. > > Cc: Tomi Valkeinen > Cc: Rob Clark > Signed-off-by: David Herrmann > --- > drivers/gpu/drm/omapdrm/omap_gem.c | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > > diff

[PATCH] drm/i915: Kick out vga console

2014-06-04 Thread David Herrmann
ht resurrect it again. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813 > Cc: David Herrmann > Cc: Jean-Christophe Plagniol-Villard > Cc: Tomi Valkeinen > Cc: linux-fbdev at vger.kernel.org > Signed-off-by: Chris Wilson (v1) > Signed-off

[PATCH] drm/i915: Kick out vga console

2014-06-04 Thread David Herrmann
Hi On Wed, Jun 4, 2014 at 2:20 PM, Jani Nikula wrote: > On Wed, 04 Jun 2014, David Herrmann wrote: >> You rely on compiler-optimizations here. "dummy_con" is not available >> if !CONFIG_DUMMY_CONSOLE, but you use it. This causes linker-failure >> if dead-co

[PATCH 4/5] drm/omap: use __GFP_DMA32 for shmem-backed gem

2014-06-05 Thread David Herrmann
Hi On Thu, Jun 5, 2014 at 4:04 PM, Rob Clark wrote: > On Thu, Jun 5, 2014 at 9:52 AM, Tomi Valkeinen > wrote: >> Hi, >> >> On 02/06/14 16:03, David Herrmann wrote: >>> Hi Tomi >>> >>> Any chance you could give this a spin on an omap device? It

[PATCH 3/5] vt: Don't ignore unbind errors in vt_unbind

2014-06-06 Thread David Herrmann
o me.. so your change to use "retval" looks fine to me. This is: Reviewed-by: David Herrmann Thanks David > --- > drivers/tty/vt/vt.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c > index 5077f

[PATCH 1/5] vt: Fix replacement console check when unbinding

2014-06-06 Thread David Herrmann
)) { > + if (con_back->con && con_back->con != csw) { Funny thing is, if you run do_bind_con_driver() on the range first, you kick out the existing driver and can then unload it regardless whether the fallback was FLAG_MODULE or not. Therefore, I think that change is sa

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

2014-06-06 Thread David Herrmann
Hi On Thu, Jun 5, 2014 at 4:58 PM, Daniel Vetter wrote: > A bunch of issues: > - We should not kick out the default console (which is tracked in > conswitchp), so check for that. > - Add better error codes so callers can differentiate between "something > went wrong" and "your driver isn't re

[PATCH 5/5] drm/i915: Kick out vga console

2014-06-06 Thread David Herrmann
en the vga console is already unregistered - this > can happen when e.g. reloading i915.ko. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813 > Cc: David Herrmann > Cc: Jean-Christophe Plagniol-Villard > Cc: Tomi Valkeinen > Cc: linux-fbdev at vger.kernel.org

  1   2   3   4   5   6   7   8   9   10   >