[PATCH 08/13] drm: move drm_put_minor() to drm_minor_free()

2014-01-29 Thread David Herrmann
ndant call to drm_unplug_minor() as drm_minor_free() is only used from paths were that has already be called. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 45 ++--- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/drivers/gp

[PATCH 09/13] drm: rename drm_unplug/get_minor() to drm_minor_register/unregister()

2014-01-29 Thread David Herrmann
minor and can reset it if required. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 54 +++--- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 1634a09..853026a 100644

[PATCH 10/13] drm: remove unneeded #ifdef CONFIG_DEBUGFS

2014-01-29 Thread David Herrmann
No need to check for DEBUGFS, we already have dummy-fallbacks in our headers. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 853026a..d564a5d 100644 --- a

[PATCH 11/13] drm: remove redundant minor->device field

2014-01-29 Thread David Herrmann
Whenever we access minor->device, we are in a minor->kdev->...->fops callback so the minor->kdev pointer *must* be valid. Thus, simply use minor->kdev->devt instead of minor->device and remove the redundant field. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_

[PATCH 12/13] drm: make minor-IDs reliable

2014-01-29 Thread David Herrmann
pointer until the device is registered. Device unregistration is still the same. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c | 2 +- drivers/gpu/drm/drm_stub.c | 150 - include/drm/drmP.h | 1 + 3 files changed, 111

[PATCH 13/13] drm: remove redundant minor->index

2014-01-29 Thread David Herrmann
->minor_base now. Replace all occurrences and drop minor->index. A small helper drm_minor_get_id() is added, so drm_sysfs.c does not have to hard-code the +64 offset, which is an implementation detail of drm_stub.c. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_fops.c

[PATCH] drm: Fix use-after-free in the shadow-attache exit code

2014-01-30 Thread David Herrmann
drivers > > Reported-by: Dave Jones > Cc: Dave Jones > Cc: Dave Airlie > Cc: David Herrmann > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_

[PATCH 1/1] drm/bochs: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

2014-07-01 Thread David Herrmann
Hi On Tue, Jul 1, 2014 at 9:02 PM, Fabian Frederick wrote: > use mm.h definition > > Cc: David Airlie > Cc: David Herrmann > Cc: dri-devel at lists.freedesktop.org > Signed-off-by: Fabian Frederick Hm, this is defined in mm.h and we include it via drmP.h, which is weird, bu

[PATCH 1/1] drm/omap: remove null test before kfree

2014-07-06 Thread David Herrmann
Hi On Fri, Jul 4, 2014 at 9:17 PM, Fabian Frederick wrote: > Fix checkpatch warning: > WARNING: kfree(NULL) is safe this check is probably not required > > Cc: David Airlie > Cc: David Herrmann > Cc: Tomi Valkeinen > Cc: dri-devel at lists.freedesktop.org > Signed-

[PATCH] drm: Remove command line guard for render nodes

2014-07-08 Thread David Herrmann
Hi On Mon, Jul 7, 2014 at 11:25 PM, Alex Deucher wrote: > Render nodes are ready to leave the experimental state so > drop the kernel command line parameter which was hiding them > by default. I swore we had already enabled these by default, > that appears to not be the case. > > Signed-off-by:

[PATCH] drm: Remove command line guard for render nodes (v2)

2014-07-08 Thread David Herrmann
Hi On Tue, Jul 8, 2014 at 12:10 AM, Alex Deucher wrote: > Render nodes are ready to leave the experimental state so > drop the kernel command line parameter which was hiding them > by default. I swore we had already enabled these by default, > that appears to not be the case. > > v2: remove rnod

[PATCH] drm: Remove command line guard for render nodes (v2)

2014-07-08 Thread David Herrmann
Hi On Tue, Jul 8, 2014 at 12:28 AM, Alex Deucher wrote: > On Mon, Jul 7, 2014 at 6:20 PM, David Herrmann > wrote: >> Hi >> >> On Tue, Jul 8, 2014 at 12:10 AM, Alex Deucher >> wrote: >>> Render nodes are ready to leave the experimental state so >>&

[PATCH 2/2] drm/udl: Implement page_flip ioctl

2014-07-08 Thread David Herrmann
Hi On Thu, Jul 3, 2014 at 12:13 AM, St?phane Marchesin wrote: > This is a very crude page_flip implementation for UDL. There are ways > to make it better (make it asynchronous, make it do actual vsynced > flips...) but that's for another patch. > > Signed-off-by: St?phane Marchesin > --- > driv

[PATCH 2/2] drm/udl: Implement page_flip ioctl

2014-07-08 Thread David Herrmann
Hi On Tue, Jul 8, 2014 at 9:17 AM, Dave Airlie wrote: > On 8 July 2014 17:15, David Herrmann wrote: >> Hi >> >> On Thu, Jul 3, 2014 at 12:13 AM, St?phane Marchesin >> wrote: >>> This is a very crude page_flip implementation for UDL. There are ways >>

[ANNOUNCE] kmscon: Lazy-web's DRM based terminal emulator

2012-03-28 Thread David Herrmann
Hi On Tue, Mar 27, 2012 at 5:59 PM, Ville Syrj?l? wrote: > On Tue, Mar 27, 2012 at 04:57:29PM +0200, David Herrmann wrote: >> It needs some more work in the VTE layer and on the UI but it's >> I had several issues while writing it but most of them are fixed. One >

[PATCH RESEND] drm: fix returning -EINVAL on setmaster if another master is active

2012-11-15 Thread David Herrmann
gic fails if no DRM-Master is currently active at all. Because then the client itself would become DRM-Master (if it is root) and this makes this whole thing useles. Also note that the second "if-condition": file_priv->minor->master != file_priv->master is always true and ca

picking efifb driver over dri driver

2013-05-27 Thread David Herrmann
Hi On Mon, May 27, 2013 at 5:42 PM, Christopher Harvey wrote: > I'm looking for the mechanism in the kernel that makes the decision to > load the efifb driver over a dri one. Any tips? I've got a machine here > that loads efifb and prevents dri drivers from loading. If you want to use efifb ove

[PATCH] drm: allow DRM_IOCTL_VERSION on render-nodes

2013-11-03 Thread David Herrmann
on, Oct 28, 2013 at 11:22 AM, Daniel Vetter wrote: > On Mon, Oct 28, 2013 at 10:55:49AM +0100, David Herrmann wrote: >> DRM_IOCTL_VERSION is a reliable way to get the driver-name and version >> information. It's not related to the interface-version (SET_VERSION ioctl) >>

[PATCH 1/2] drm: remove agp_init() bus callback

2013-11-03 Thread David Herrmann
Hi Dave This one can also go into 3.13. This and 2/2 provide the agp_init() cleanup that Daniel suggested for the drm_dev_*() patches. 2/2 is not required, but I thought it was a nice addition. Thanks David On Sat, Oct 19, 2013 at 1:58 PM, David Herrmann wrote: > The PCI bus helper is

[PATCH 1/2] drm: remove agp_init() bus callback

2013-11-03 Thread David Herrmann
Hi Daniel On Sun, Nov 3, 2013 at 12:36 PM, Daniel Vetter wrote: > On Sun, Nov 03, 2013 at 12:06:05PM +0100, David Herrmann wrote: >> Hi Dave >> >> This one can also go into 3.13. This and 2/2 provide the agp_init() >> cleanup that Daniel suggested for the drm_

[PATCH 17/19] drm: inline drm_agp_destroy

2013-11-03 Thread David Herrmann
Hi On Sun, Nov 3, 2013 at 2:31 PM, Daniel Vetter wrote: > Wrapping a kfree is pointless. > > Signed-off-by: Daniel Vetter > --- I added that one dutifully to document the API in: commit 28ec711cd427f8b61f73712a43b8100ba8ca933b Author: David Herrmann Date: Sat Jul 27 16:37:0

[PATCH 18/19] drm: kill the ->agp_destroy callback

2013-11-03 Thread David Herrmann
_destroy(struct drm_device *dev) That one is #ifdef CONFIG_PCI So please provide a dummy below, same as for drm_pci_init(). If that's fixed: Reviewed-by: David Herrmann Thanks David > { > if (dev->agp) { > arch_phys_wc_del(dev->agp->agp_mtrr); &g

[PATCH 11/19] drm: restrict the device list for shadow attached drivers

2013-11-03 Thread David Herrmann
Hi Daniel On Sun, Nov 3, 2013 at 2:31 PM, Daniel Vetter wrote: > There's really no need for the drm core to keep a list of all > devices of a given driver - the linux device model keeps perfect > track of this already for us. > > The exception is old legacy ums drivers using pci shadow attaching.

[PATCH 12/19] drm/bufs: remove handling of _DRM_GEM mappings

2013-11-03 Thread David Herrmann
ing the old drm mmap code essentially), not because > userspace ever needed it. > > Cc: David Herrmann > Signed-off-by: Daniel Vetter Thanks for removing it. I haven't found any code using _DRM_GEM when changing the vma-manager either, so: Reviewed-by: David Herrmann Thanks

[PATCH 14/19] drm: ->agp_init can't fail

2013-11-03 Thread David Herrmann
} > + if (dev->driver->bus->agp_init) > + dev->driver->bus->agp_init(dev); Ok, technically, you need to remove "out_unlock" here. But patch #16 removes err_agp and reused out_unlock, so I think this is fine. Reviewed-by: David Herrmann Thanks D

[PATCH 16/19] drm: remove agp_init() bus callback

2013-11-03 Thread David Herrmann
Hi Daniel On Sun, Nov 3, 2013 at 2:31 PM, Daniel Vetter wrote: > From: David Herrmann > > The PCI bus helper is the only user of it. Call it directly before > device-registration to get rid of the callback. > > Note that all drm_agp_*() calls are locked with the drm-global-mut

[PATCH] drm: kill the ->agp_destroy callback

2013-11-03 Thread David Herrmann
Add a dummy function for !CONFIG_PCI, spotted my David Herrmann. > > Reviewed-by: David Herrmann > Cc: David Herrmann > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_pci.c | 4 ++-- > drivers/gpu/drm/drm_stub.c | 4 ++-- > include/drm/drmP.h | 4 +---

[PATCH] drm: check for !kdev in drm_unplug_minor()

2013-11-13 Thread David Herrmann
We moved minor deallocation to drm_dev_free() in: commit 8f6599da8e772fa8de54cdf98e9e03cbaf3946da Author: David Herrmann Date: Sun Oct 20 18:55:45 2013 +0200 drm: delay minor destruction to drm_dev_free() However, this causes a call to drm_unplug_minor(), which should just do

[PATCH] drm/vma-manager: Don't unmap COW'd pages when zapping bo ptes

2013-11-20 Thread David Herrmann
Hi On Wed, Nov 20, 2013 at 10:55 AM, Thomas Hellstrom wrote: > Not sure if there are any user-space users of private bo mappings, but > if there are, or will be, zapping the COW'd pages when, for example, > moving a bo would confuse the user immensely since the net effect for the > user would be

[PATCH] drm/sysfs: fix hotplug regression since lifetime changes

2013-11-21 Thread David Herrmann
Hi On Thu, Nov 21, 2013 at 10:25 AM, Dave Airlie wrote: > On Thu, Nov 21, 2013 at 7:22 PM, Daniel Vetter wrote: >> On Thu, Nov 21, 2013 at 11:51:04AM +1000, Dave Airlie wrote: >>> 5bdebb183c9702a8c57a01dff09337be3de337a6 changed the lifetimes, but it >>> also meant we no longer set the device_ty

[PATCH] drm/sysfs: fix hotplug regression since lifetime changes

2013-11-21 Thread David Herrmann
Hi On Thu, Nov 21, 2013 at 10:58 AM, Dave Airlie wrote: > On Thu, Nov 21, 2013 at 7:49 PM, David Herrmann > wrote: >> Hi >> >> On Thu, Nov 21, 2013 at 10:25 AM, Dave Airlie wrote: >>> On Thu, Nov 21, 2013 at 7:22 PM, Daniel Vetter wrote: >>>> O

[PATCH] drm/sysfs: fix hotplug regression since lifetime changes

2013-11-21 Thread David Herrmann
Hi On Thu, Nov 21, 2013 at 4:24 PM, Greg KH wrote: > On Thu, Nov 21, 2013 at 10:22:55AM +0100, Daniel Vetter wrote: >> On Thu, Nov 21, 2013 at 11:51:04AM +1000, Dave Airlie wrote: >> > 5bdebb183c9702a8c57a01dff09337be3de337a6 changed the lifetimes, but it >> > also meant we no longer set the devi

[PATCH] drm/sysfs: fix OOM verification

2013-11-26 Thread David Herrmann
Copy/Paste typo.. we need to test for ->kdev instead of ->dev. Reported-by: Juha Lepp?nen Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index b

[RFC patch] PCI: Extend boot_vga sysfs attribute lookup to fix X on MBA+EFI

2013-11-27 Thread David Herrmann
Hi On Mon, Nov 25, 2013 at 8:54 PM, Bruno Pr?mont wrote: > On a MacBookAir2,1, booting to Linux with EFI though having > no efifb built-in Xorg refuses to start with "no devices detected" > because for the only VGA device available (NVidia Geforce 9400M) > the sysfs attribute boot_vga is zero (in

[PATCH 13/19] drm: do not steal the display if we have a master

2013-11-30 Thread David Herrmann
plementation of the hotplug alternative. > > v2: - Do the check first, irrespective of "bound". > - Cc dri-devel Thank god all that will get dropped with CONFIG_FB=n. Anyhow: Reviewed-by: David Herrmann Thanks David > Cc: dri-devel at lists.freedesktop.org > Credits-

[PATCH 2/2] drm/udl: implement cursor.

2015-03-05 Thread David Herrmann
Hi On Thu, Mar 5, 2015 at 3:26 AM, Haixia Shi wrote: > Signed-off-by: Haixia Shi > Reviewed-by: Stéphane Marchesin > Tested-by: Haixia Shi > --- > drivers/gpu/drm/udl/Makefile | 2 +- > drivers/gpu/drm/udl/udl_cursor.c | 156 > + > drivers/gpu/d

[PATCH] drm: Lighten sysfs connector 'status'

2015-03-06 Thread David Herrmann
attribute so that existing readers get the behaviour they desire. > > v2: David Herrmann suggested using "echo detect > /sys/.../status" to > trigger the probing, which is a fine idea. This extends that to also > allow the user to apply the force detection overrides at runt

[PATCH 1/3] drm: drop unused 'magicfree' list

2015-05-04 Thread David Herrmann
This list is write-only. It's never used for read-access, so no reason to keep it around. Drop it! Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_auth.c | 3 --- drivers/gpu/drm/drm_drv.c | 1 - include/drm/drmP.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/driver

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
. The only difference in behavior is that we never allocate IDs multiple times, even if they were already authenticated. To trigger that, you need 2^31 open DRM file descriptions at the same time, though. Diff-stat: 5 files changed, 45 insertions(+), 157 deletions(-) Signed-off-by: David Herrmann

[PATCH 3/3] drm: simplify master cleanup

2015-05-04 Thread David Herrmann
-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 88b594c..3b3c4f5 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -132,15 +132,10 @@ static v

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 4:46 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote: >> The magic auth tokens we have are a simple map from cyclic IDs to drm_file >> objects. Remove all the old bulk of code and replace it with a simple

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 5:11 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote: >> Hi >> >> On Mon, May 4, 2015 at 4:46 PM, Chris Wilson >> wrote: >> > On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote:

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 5:25 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 05:14:51PM +0200, David Herrmann wrote: >> Hi >> >> On Mon, May 4, 2015 at 5:11 PM, Chris Wilson >> wrote: >> > On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote

[PATCH v2 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
. The only difference in behavior is that we never allocate IDs multiple times as long as a client has its FD open. Diff-stat: 5 files changed, 45 insertions(+), 157 deletions(-) Signed-off-by: David Herrmann --- v2: - Fix return code of GetMagic() - Use non-cyclic IDR allocator - fix off-by

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 6:49 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 06:28:25PM +0200, David Herrmann wrote: >> I'm not sure how to write a benchmark for this. I mean, I can easily >> craft one that causes the IDR to degenerate, but it requires us to >>

[PATCH v2 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 8:33 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 08:19:33PM +0200, David Herrmann wrote: >> The magic auth tokens we have are a simple map from cyclic IDs to drm_file >> objects. Remove all the old bulk of code and replace it with a simple

[PATCH v3 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
. The only difference in behavior is that we never allocate IDs multiple times as long as a client has its FD open. Diff-stat: 5 files changed, 42 insertions(+), 157 deletions(-) Signed-off-by: David Herrmann Reviewed-by: Chris Wilson --- v3: - drop redundant "magic > INT_MAX" chec

[Intel-gfx] [PATCH 4/9] drm/core: Add drm_for_each_encoder_mask.

2015-11-24 Thread David Herrmann
Hi On Tue, Nov 24, 2015 at 7:00 PM, Jani Nikula wrote: > On Tue, 24 Nov 2015, Maarten Lankhorst > wrote: >> +#define drm_for_each_encoder_mask(encoder, dev, encoder_mask) \ >> + list_for_each_entry((encoder), &(dev)->mode_config.encoder_list, head) >> \ >> + if ((encoder_mask)

[PATCH 1/2] Revert "drm/core: Preserve the fb id on close."

2015-10-02 Thread David Herrmann
u think this is needed. Thanks David > > Cc: Maarten Lankhorst > Cc: David Herrmann > Cc: Daniel Vetter > Signed-off-by: Vincent Abriou > --- > drivers/gpu/drm/drm_crtc.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu

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

2015-10-07 Thread David Herrmann
Hi On Tue, Oct 6, 2015 at 1:19 PM, Chris Wilson wrote: > On Tue, Oct 06, 2015 at 01:11:56PM +0200, Daniel Vetter wrote: >> On Tue, Oct 06, 2015 at 11:53:09AM +0100, Chris Wilson wrote: >> > In addition to the last-in/first-out stack for accessing drm_mm nodes, >> > we occasionally and in the fut

[PATCH 08/25] drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj

2015-10-15 Thread David Herrmann
is any more. > > Signed-off-by: Daniel Vetter Looks good to me. Reviewed-by: David Herrmann Thanks David > --- > drivers/gpu/drm/drm_gem.c | 4 > drivers/gpu/drm/drm_gem_cma_helper.c| 2 -- > drivers/gpu/drm/msm/msm_fbdev.c | 5

[PATCH 09/25] drm/gem: Check locking in drm_gem_object_unreference

2015-10-15 Thread David Herrmann
Hi On Thu, Oct 15, 2015 at 9:36 AM, Daniel Vetter wrote: > Pretty soon only some drivers will need dev->struct_mutex in their > gem_free_object callbacks. Hence it's really important to make sure > everything still keeps getting this right. > > Signed-off-by: Daniel Vetter > --- > include/drm/

[PATCH 10/25] drm/gem: Use container_of in drm_gem_object_free

2015-10-15 Thread David Herrmann
Hi On Thu, Oct 15, 2015 at 9:36 AM, Daniel Vetter wrote: > Just a random thing I spotted while reading code - better safe than > sorry. > > Signed-off-by: Daniel Vetter Reviewed-by: David Herrmann Thanks David > --- > drivers/gpu/drm/drm_gem.c | 3 ++- > 1 file change

[PATCH 11/25] drm/gem: Use kref_get_unless_zero for the weak mmap references

2015-10-15 Thread David Herrmann
Hi On Thu, Oct 15, 2015 at 9:36 AM, Daniel Vetter wrote: > Compared to wrapping the final kref_put with dev->struct_mutex this > allows us to only acquire the offset manager look both in the final > cleanup and in the lookup. Which has the upside that no locks leak out > of the core abstractions

[PATCH 09/25] drm/gem: Check locking in drm_gem_object_unreference

2015-10-15 Thread David Herrmann
Hi On Thu, Oct 15, 2015 at 10:55 AM, Daniel Vetter wrote: > On Thu, Oct 15, 2015 at 10:36:08AM +0200, David Herrmann wrote: >> Hi >> >> On Thu, Oct 15, 2015 at 9:36 AM, Daniel Vetter >> wrote: >> > Pretty soon only some drivers will need dev->str

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

2015-10-21 Thread David Herrmann
or simpler merge ordering we can just pull this into drm-intel > and patch up the vma manager (just need to drop a lot of code and adjust > the search to use the drm_mm internal_tree nodes) later on. Agreed. Acked-by: David Herrmann Thanks David

[PATCH 2/3] drm/vma_manage: Drop has_offset

2015-10-23 Thread David Herrmann
>struct_mutex in i915-gem. > > While at it add a note in the create_mmap_offset kerneldoc that > drivers must release it again. And then I also noticed that > drm_gem_object_release entirely lacks kerneldoc. > > Cc: David Herrmann > Signed-off-by: Daniel Vetter I&

[PATCH 0/5] DRM Cleanups

2015-09-09 Thread David Herrmann
Hey Just a set of 5 random cleanup patches for DRM-core: Simplifying drm_core_init/exit(), dropping drm_core.h and fixing the mode-object ID allocations. Thanks David David Herrmann (5): drm: simplify drm_sysfs_destroy() via IS_ERR_OR_NULL() drm: move drm_class into drm_sysfs.c drm

[PATCH 1/5] drm: simplify drm_sysfs_destroy() via IS_ERR_OR_NULL()

2015-09-09 Thread David Herrmann
Simplify `foo == NULL || IS_ERR(foo)` via IS_ERR_OR_NULL(). This is pretty commonly used all over the kernel, especially for debugfs/sysfs cleanup paths. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 2/5] drm: move drm_class into drm_sysfs.c

2015-09-09 Thread David Herrmann
a similar fashion and manage the global drm class. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 6 ++ drivers/gpu/drm/drm_internal.h | 2 +- drivers/gpu/drm/drm_sysfs.c| 47 +++--- 3 files changed, 24 insertions(+), 31 dele

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

2015-09-09 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). Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_drv.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deleti

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

2015-09-09 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 5/5] drm: allocate kernel mode-object IDs in cyclic fashion

2015-09-09 Thread David Herrmann
ookup user-controlled objects with the same function as kernel-controlled objects, but not specifying the type. This sounds highly unlikely to happen ever, so we should be safe, anyway. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_crtc.c | 37 - 1 file c

[PATCH 06/11] drm: Define a drm_invalid_op ioctl implementation

2015-09-09 Thread David Herrmann
struct drm_file *file_priv) > +{ > + return -EINVAL; > +} > +EXPORT_SYMBOL(drm_invalid_op); > + We could just store ERR_PTR(-EINVAL) in the ioctl-table and make the ioctl-handler handle this. Anyway: Reviewed-by: David Herrmann Thanks David > /** > * Copy a

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

2015-09-09 Thread David Herrmann
Hi On Wed, Sep 9, 2015 at 3:11 PM, Daniel Vetter wrote: > On Wed, Sep 09, 2015 at 02:21:31PM +0200, David Herrmann wrote: >> Various cleanups to the DRM core initialization and exit handlers: >> >> - Register chrdev last: Once register_chrdev() returns, open() will >&

[PATCH] drm: Nuke drm_framebuffer->helper_private

2015-09-11 Thread David Herrmann
ff from the fourcc value. But that would require some drm-wide > cocci and real justification. > > Cc: gary.k.smith at intel.com > Signed-off-by: Daniel Vetter > --- > include/drm/drm_crtc.h | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: David Herrmann Thanks David &

[PATCH 5/5] drm: allocate kernel mode-object IDs in cyclic fashion

2015-09-11 Thread David Herrmann
Hi On Wed, Sep 9, 2015 at 3:03 PM, Daniel Vetter wrote: > On Wed, Sep 09, 2015 at 02:21:33PM +0200, David Herrmann wrote: >> Now that we support connector hotplugging, user-space might see >> mode-object IDs coming and going asynchronously. Therefore, we must make >> sure

[PATCH] fbdev: put module after running driver callback

2015-09-11 Thread David Herrmann
() and unregister_framebuffer() are special as we require the driver to unregister device before unloading. Hence, they don't need to pin the module. However, all open handlers *have to*. Signed-off-by: David Herrmann --- drivers/video/fbdev/core/fbmem.c | 5 - 1 file changed, 4 insertions(+), 1 deleti

[PATCH] drm: Allow also control clients to check the drm version

2015-09-16 Thread David Herrmann
the line-break? None of the other ioctl definitions cares for the 80ch limit. I'd prefer keeping this uniform. Acked-by: David Herrmann Thanks David > DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0), > DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmag

[PATCH] drm: Allow also control clients to check the drm version

2015-09-16 Thread David Herrmann
Hi On Wed, Sep 16, 2015 at 5:03 PM, Thomas Hellstrom wrote: > Hi, David, > > On 09/16/2015 04:35 PM, David Herrmann wrote: >> Hi >> >> On Tue, Sep 15, 2015 at 10:11 AM, Thomas Hellstrom >> wrote: >>> This should be harmless. >>> Vmware

[PATCH] vgaarb: fix signal handling in vga_get()

2015-12-14 Thread David Herrmann
Hi On Mon, Dec 14, 2015 at 9:19 AM, Kirill A. Shutemov wrote: > On Thu, Dec 10, 2015 at 11:28:58AM +0100, David Herrmann wrote: >> Hi >> >> On Mon, Nov 30, 2015 at 3:17 AM, Kirill A. Shutemov >> wrote: >> > There are few defects in vga_get() related to signal

Implementing Miracast?

2015-12-14 Thread David Herrmann
Hi On Thu, Dec 10, 2015 at 2:28 PM, Martin Peres wrote: > Yes, you are right, it will require changes for the non-X case. > > Since you spent a lot of time on it, could you share with us some of the > issues you found? We still think that using the DRM interface may be more > work, but at least i

[RFC PATCH 0/2] libdrm: Add master <> render node helpers

2015-02-12 Thread David Herrmann
Hi On Tue, Feb 10, 2015 at 11:37 PM, Emil Velikov wrote: > On 02/02/15 00:14, Emil Velikov wrote: >> Hi all, >> >> As mentioned a couple of days ago at #dri-devel some(most) users of >> render nodes tend to rely on strict mapping between the primary and >> render node. I.e. something along the l

[PATCH 0/6] DRM: Unified VMA Offset Manager

2013-07-01 Thread David Herrmann
ts see how that works out. Comments welcome! Cheers David [1]: http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-vma-manager David Herrmann (6): drm: make drm_mm_init() return void drm: mm: add drm_mm_node_linked() helper drm: add unified vma offset manager drm: gem: convert to new uni

[PATCH 1/6] drm: make drm_mm_init() return void

2013-07-01 Thread David Herrmann
There is no reason to return "int" as this function never fails. Furthermore, several drivers (ast, sis) already depend on this. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c| 8 ++-- drivers/gpu/drm/drm_mm.c | 4 +--- drivers/gpu/drm/tt

[PATCH 2/6] drm: mm: add drm_mm_node_linked() helper

2013-07-01 Thread David Herrmann
after removing it. Furthermore, no-one is supposed to access node->mm from outside drm_mm.c, anyway. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_mm.c | 1 + include/drm/drm_mm.h | 5 + 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm

[PATCH 3/6] drm: add unified vma offset manager

2013-07-01 Thread David Herrmann
2012-proposal by David Airlie Signed-off-by: David Herrmann --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_vma_manager.c | 224 ++ include/drm/drm_vma_manager.h | 107 ++ 3 files changed, 332 insertions(+), 1 del

[PATCH 5/6] drm: ttm: convert to unified vma offset manager

2013-07-01 Thread David Herrmann
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

[PATCH 4/6] drm: gem: convert to new unified vma manager

2013-07-01 Thread David Herrmann
which strictly wouldn't be needed for gem. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_gem.c | 89 +- drivers/gpu/drm/drm_gem_cma_helper.c | 9 +-- drivers/gpu/drm/exynos/exynos_drm_gem.c| 7 ++- drivers/gpu/drm/g

[PATCH 6/6] drm: provide generic drm_vma_node_unmap() helper

2013-07-01 Thread David Herrmann
Instead of unmapping the nodes in TTM and GEM users manually, we provide a generic wrapper which does the correct thing for all vma-nodes. Signed-off-by: David Herrmann --- drivers/gpu/drm/i915/i915_gem.c | 6 +- drivers/gpu/drm/ttm/ttm_bo.c| 8 +--- include/drm/drm_vma_manager.h

[PATCH 3/6] drm: add unified vma offset manager

2013-07-01 Thread David Herrmann
Hi On Mon, Jul 1, 2013 at 9:42 PM, Daniel Vetter wrote: > On Mon, Jul 01, 2013 at 08:33:00PM +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 >

[PATCH 2/2] drm/i915: use drm_mm_remove_node instead of put_block

2013-07-01 Thread David Herrmann
Hi On Mon, Jul 1, 2013 at 10:05 PM, Daniel Vetter wrote: > When converting to the preallocated drm_mm_node interfaces in > > commit dc9dd7a20fde95aa81a8307cde79c2dff9f83f3d > Author: Chris Wilson > Date: Fri Dec 7 20:37:07 2012 + > > drm/i915: Preallocate the drm_mm_node prior to mani

[PATCH 1/6] drm: pre allocate node for create_block

2013-07-04 Thread David Herrmann
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

[PATCH 1/6] drm: pre allocate node for create_block

2013-07-04 Thread David Herrmann
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

[PATCH v2 00/14] Platform Framebuffers and SimpleDRM

2013-07-04 Thread David Herrmann
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. #

[PATCH v2 01/14] fbdev: simplefb: add init through platform_data

2013-07-04 Thread David Herrmann
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 --

[PATCH v2 02/14] fbdev: simplefb: mark as fw and allocate apertures

2013-07-04 Thread 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

[PATCH v2 03/14] x86: provide platform-devices for boot-framebuffers

2013-07-04 Thread David Herrmann
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

[PATCH v2 04/14] x86: sysfb: move EFI quirks from efifb to sysfb

2013-07-04 Thread David Herrmann
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

[PATCH v2 05/14] fbdev: simplefb: add 32bit RGB formats

2013-07-04 Thread David Herrmann
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

[PATCH v2 06/14] fbdev: vesafb: bind to platform-framebuffer device

2013-07-04 Thread David Herrmann
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

[PATCH v2 07/14] fbdev: efifb: bind to efi-framebuffer

2013-07-04 Thread David Herrmann
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

[PATCH v2 08/14] fbdev: fbcon: select VT_HW_CONSOLE_BINDING

2013-07-04 Thread David Herrmann
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/

[PATCH v2 09/14] drm: add SimpleDRM driver

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

[PATCH v2 10/14] drm: simpledrm: add fbdev fallback support

2013-07-04 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/Kconfig | 11 ++ drivers/gpu/drm/simpledrm/Makefile | 1 + drivers/gpu/drm/simpledrm/simpledrm.h | 22

[PATCH v2 11/14] drm: add helpers to kick out firmware drivers

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

[PATCH v2 12/14] drm: nouveau: kick out firmware drivers during probe

2013-07-04 Thread David Herrmann
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

[PATCH v2 13/14] drm/i915: use new drm_kick_out_firmware()

2013-07-04 Thread David Herrmann
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

[PATCH v2 14/14] drm/radeon: use new drm_kick_out_firmware()

2013-07-04 Thread David Herrmann
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

[PATCH] [v3] drm: pre allocate node for create_block

2013-07-04 Thread David Herrmann
(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

<    5   6   7   8   9   10   11   12   >