Re: [RFC PATCH v3 11/11] drm, cgroup: Allow more aggressive memory reclaim

2019-06-27 Thread Daniel Vetter
y > > On Wed, Jun 26, 2019 at 12:44 PM Daniel Vetter wrote: > > > > On Wed, Jun 26, 2019 at 11:05:22AM -0400, Kenny Ho wrote: > > > Allow DRM TTM memory manager to register a work_struct, such that, when > > > a drmcgrp is under memory pressure, memory reclaiming

Re: [RFC PATCH v3 09/11] drm, cgroup: Add per cgroup bw measure and control

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 12:34:05AM -0400, Kenny Ho wrote: > On Wed, Jun 26, 2019 at 12:25 PM Daniel Vetter wrote: > > > > On Wed, Jun 26, 2019 at 11:05:20AM -0400, Kenny Ho wrote: > > > The bandwidth is measured by keeping track of the amount of bytes moved > > >

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 12:06:13AM -0400, Kenny Ho wrote: > On Wed, Jun 26, 2019 at 12:12 PM Daniel Vetter wrote: > > > > On Wed, Jun 26, 2019 at 11:05:18AM -0400, Kenny Ho wrote: > > > drm.memory.stats > > > A read-only nested-keyed file which exists o

Re: [RFC PATCH v3 04/11] drm, cgroup: Add total GEM buffer allocation limit

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 06:41:32PM -0400, Kenny Ho wrote: > On Wed, Jun 26, 2019 at 5:41 PM Daniel Vetter wrote: > > On Wed, Jun 26, 2019 at 05:27:48PM -0400, Kenny Ho wrote: > > > On Wed, Jun 26, 2019 at 12:05 PM Daniel Vetter wrote: > > > > So what happens when

Re: [RFC PATCH v3 04/11] drm, cgroup: Add total GEM buffer allocation limit

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 05:27:48PM -0400, Kenny Ho wrote: > On Wed, Jun 26, 2019 at 12:05 PM Daniel Vetter wrote: > > > > > drm.buffer.default > > > A read-only flat-keyed file which exists on the root cgroup. > > > Each entry is k

Re: [PATCH] drm: Allow range of 0 for drm_mm_insert_node_in_range()

2019-06-26 Thread Daniel Vetter
an > assert for an illegal call. Maybe spend a few words on why a drm_mm user might want to do that. Sounds very funky ... -Daniel > > Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen > Cc: Daniele Ceraolo Spurio > Cc: Daniel Vetter > --- > drivers/gpu/drm/drm_mm.c | 2 +-

Re: [PATCH] drm: fix a reference for a renamed file: fb/modedb.rst

2019-06-26 Thread Daniel Vetter
("drm/modes: Allow to specify rotation and reflection on > the commandline") > Fixes: ab42b818954c ("docs: fb: convert docs to ReST and rename to *.rst") > Signed-off-by: Mauro Carvalho Chehab What's the merge plan here? doc-next? If so: Acked-by: Daniel Vetter > -

Re: [RFC PATCH v3 02/11] cgroup: Add mechanism to register DRM devices

2019-06-26 Thread Daniel Vetter
d, Jun 26, 2019 at 11:56 AM Daniel Vetter wrote: > > > > Why the separate, explicit registration step? I think a simpler design for > > drivers would be that we set up cgroups if there's anything to be > > controlled, and then for GEM drivers the basic GEM stuff would b

Re: [RFC PATCH v3 01/11] cgroup: Introduce cgroup for drm subsystem

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 9:35 PM Kenny Ho wrote: > > On Wed, Jun 26, 2019 at 11:49 AM Daniel Vetter wrote: > > > > Bunch of naming bikesheds > > I appreciate the suggestions, naming is hard :). > > > > +#include > > > + > > > +struct dr

Re: [PATCH] drm/fourcc: Add Arm 16x16 block modifier

2019-06-26 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 1:23 PM Brian Starkey wrote: > > On Mon, Jun 24, 2019 at 11:58:59AM +0200, Daniel Vetter wrote: > > On Mon, Jun 24, 2019 at 11:32 AM Brian Starkey > > wrote: > > > > > > Hi Daniel, > > > > > > On Fri, Jun 21, 2019 at

Re: [RFC PATCH v3 11/11] drm, cgroup: Allow more aggressive memory reclaim

2019-06-26 Thread Daniel Vetter
struct drmcgrp > *relative) > { > for (; self != NULL; self = parent_drmcgrp(self)) > @@ -1004,6 +1031,12 @@ void drmcgrp_mem_track_move(struct ttm_buffer_object > *old_bo, bool evict, > > ddr->mem_bw_stats[DRMCGRP_MEM_BW_ATTR_BYTE_CREDIT] > -= move

Re: [PATCH 2/2] drm/bochs: fix framebuffer setup.

2019-06-26 Thread Daniel Vetter
> + gbo->width, You want the dimensions of the drm_framebuffer here, not something from the underlying gem bo. > gbo->bo.offset); I think same here, or at least additionally take into account both drm_framebuffer offset _and_ vram offset. -Daniel > bochs_hw_setformat(bochs, state->fb->format); > } > -- > 2.18.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH 1/2] drm/vram: store dumb bo dimensions.

2019-06-26 Thread Daniel Vetter
in some cases can we rely on them being set. > Should this be refactored so we always set width, height. > Or maybe say in a small comment that width,height are only > set for dumb bo's? Also for dumb bo allocated buffers if userspace gets the dimensions wrong between dumb_create and the addfb, something is wrong. Papering over that by remembering the right dimensions doesn't look like a good solution. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [RFC PATCH v3 09/11] drm, cgroup: Add per cgroup bw measure and control

2019-06-26 Thread Daniel Vetter
vict++; > + > + drmcgrp_mem_bw_accum(time_us, ddr); > + > + ddr->mem_bw_stats[DRMCGRP_MEM_BW_ATTR_BYTE_MOVED] > + += move_in_bytes; > + ddr->mem_bw_stats[DRMCGRP_MEM_BW_ATTR_TOTAL_BYTE_MOVED] > + += m

Re: [RFC PATCH v3 08/11] drm, cgroup: Add TTM buffer peak usage stats

2019-06-26 Thread Daniel Vetter
> ddr->mem_stats[new_mem_type] += move_in_bytes; > > + ddr->mem_peaks[new_mem_type] = max( > + ddr->mem_peaks[new_mem_type], > + ddr->mem_stats[new_mem_type]); > + > if (evict) >

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-26 Thread Daniel Vetter
evIdx] == NULL) > + return; > + > + mem_type = mem_type > TTM_PL_PRIV ? TTM_PL_PRIV : mem_type; > + > + mutex_lock(_drmcgrp_devs[devIdx]->mutex); > + for ( ; drmcgrp != NULL; drmcgrp = parent_drmcgrp(drmcgrp)) { > + ddr = drmcgrp->

Re: [RFC PATCH v3 04/11] drm, cgroup: Add total GEM buffer allocation limit

2019-06-26 Thread Daniel Vetter
e_t size) > +{ > + struct drmcgrp *drmcgrp = drmcgrp_from(task); > + struct drmcgrp_device_resource *ddr; > + struct drmcgrp_device_resource *d; > + int devIdx = dev->primary->index; > + bool result = true; > + s64 delta = 0; > + > +

Re: [RFC PATCH v3 02/11] cgroup: Add mechanism to register DRM devices

2019-06-26 Thread Daniel Vetter
rp->css) { > + child = css_drmcgrp(pos); > + init_drmcgrp(child, dev); > + } > + rcu_read_unlock(); I have no idea, but is this guaranteed to get them all? -Daniel > + } > + > + return 0; > +} > +EXPORT_SYMBOL(drmcgrp_register_device); > + >

Re: [RFC PATCH v3 01/11] cgroup: Introduce cgroup for drm subsystem

2019-06-26 Thread Daniel Vetter
; + if (!parent) > + root_drmcgrp = drmcgrp; > + > + return >css; > +} > + > +struct cftype files[] = { > + { } /* terminate */ > +}; > + > +struct cgroup_subsys drm_cgrp_subsys = { > + .css_alloc = drmcgrp_css_alloc, > + .css_free = drmcgrp_css_free, > + .early_init = false, > + .legacy_cftypes = files, > + .dfl_cftypes= files, > +}; > -- > 2.21.0 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [Intel-gfx] [PATCH] drm/connector: Allow max possible encoders to attach to a connector

2019-06-26 Thread Daniel Vetter
) to enumerate these. > > I wonder if we couldn't just replace this array with a bitmask? > I think the for_each_possible_encoder() thing I did a while back > should make this easier potentially because most driver code just > uses that. +1 on possible encoders bitmask. More

Re: [PATCH v3 3/4] drm/vblank: estimate vblank while disabling vblank if interrupt disabled

2019-06-26 Thread Daniel Vetter
); > > + > > goto out; > > + } > > > > /* > > * Update the count and timestamp to maintain the > > -- > > 2.18.0 > > > > _______ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Ville Syrjälä > Intel > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH] docs: gpu: add msm-crash-dump.rst to the index.rst file

2019-06-26 Thread Daniel Vetter
added to drivers.rst I think, since it's driver-specific documentation. -Daniel > vga-switcheroo > vgaarbiter > todo > -- > 2.21.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch __

Re: [Intel-gfx] [PATCH V4] drm/drm_vblank: Change EINVAL by the correct errno

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 10:37:11AM -0300, Rodrigo Siqueira wrote: > On Wed, Jun 26, 2019 at 4:53 AM Daniel Vetter wrote: > > > > On Wed, Jun 26, 2019 at 4:00 AM Rodrigo Siqueira > > wrote: > > > > > > On 06/19, Daniel Vetter wrote: > > > > On W

Re: [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v13

2019-06-26 Thread Daniel Vetter
t;ops->pin; > +} > + > +/** > + * dma_buf_attachment_is_dynamic - check if a DMA-buf attachment uses dynamic > + * mappinsg > + * @attach: the DMA-buf attachment to check > + * > + * Returns true if a DMA-buf importer wants to use dynami

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-26 Thread Daniel Vetter
gt;> solved that all up for me first. > > Ah is this about amdgpu doing something else for implicit sync than > > what's supposed to be done, and a bit a mismatch when you deal with > > shared buffers? > > Yes, exactly. > > >>>> And cleaning up

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 11:28 AM Koenig, Christian wrote: > > Am 26.06.19 um 10:17 schrieb Daniel Vetter: > > On Wed, Jun 26, 2019 at 09:49:03AM +0200, Christian König wrote: > >> Am 25.06.19 um 18:05 schrieb Daniel Vetter: > >>> On Tue, Jun 25, 2019 at 02:46:

Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled

2019-06-26 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 11:21:53AM +0200, Daniel Vetter wrote: > Fixes linking fail when fbcon/fbdev is modular and vgaswitcheroo is > enabled: > > x86_64-linux-gnu-ld: drivers/gpu/vga/vga_switcheroo.o: in function > `vga_switchto_stage2': > vga_switcheroo.c:(.text+0x997): u

Re: [PATCH 4/7] drm/radeon: Fill out gem_object->resv

2019-06-26 Thread Daniel Vetter
in and course-correct if necessary". -Daniel > > Christian. > > Am 25.06.19 um 22:42 schrieb Daniel Vetter: > > That way we can ditch our gem_prime_res_obj implementation. Since ttm > > absolutely needs the right reservation object all the boilerplate is > >

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 09:49:03AM +0200, Christian König wrote: > Am 25.06.19 um 18:05 schrieb Daniel Vetter: > > On Tue, Jun 25, 2019 at 02:46:49PM +0200, Christian König wrote: > > > On the exporter side we add optional explicit pinning callbacks. If those > > >

Re: [PATCH 00/10] drm/vkms: rework crc worker

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 3:44 AM Rodrigo Siqueira wrote: > > On 06/19, Daniel Vetter wrote: > > On Tue, Jun 18, 2019 at 11:54 PM Rodrigo Siqueira > > wrote: > > > > > > On Tue, Jun 18, 2019 at 5:56 AM Daniel Vetter wrote: > > > > > > > >

Re: [Intel-gfx] [PATCH V4] drm/drm_vblank: Change EINVAL by the correct errno

2019-06-26 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 4:00 AM Rodrigo Siqueira wrote: > > On 06/19, Daniel Vetter wrote: > > On Wed, Jun 19, 2019 at 09:48:56AM +0200, Daniel Vetter wrote: > > > On Tue, Jun 18, 2019 at 11:07:50PM -0300, Rodrigo Siqueira wrote: > > > > For historical reason, t

[PATCH 7/7] drm/prime: Ditch gem_prime_res_obj hook

2019-06-25 Thread Daniel Vetter
Everyone is just using gem_object->resv now. Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul --- Documentation/gpu/todo.rst | 9 - drivers/gpu/drm/drm_prime.c | 3 --- include/

[PATCH 5/7] drm/nouveau: Fill out gem_object->resv

2019-06-25 Thread Daniel Vetter
there for confusion. Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/nouveau/nouveau_bo.c| 2 ++ drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/nouveau/nouveau_gem.h | 1 - drivers/gpu/drm/nouveau

[PATCH 1/7] drm/fb-helper: use gem_bo.resv, not dma_buf.resv in prepare_fb

2019-06-25 Thread Daniel Vetter
With commit 5f6ed9879a414636405a2bd77f122881695959e4 Author: Daniel Vetter Date: Fri Jun 14 22:35:57 2019 +0200 drm/prime: automatically set gem_obj->resv on import we consistently set drm_gem_bo.resv for imported buffers. Which means we don't need to check to check the dma-

[PATCH 4/7] drm/radeon: Fill out gem_object->resv

2019-06-25 Thread Daniel Vetter
there for confusion. Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-...@lists.freedesktop.org --- drivers/gpu/drm/radeon/radeon_drv.c| 2 -- drivers/gpu/drm/radeon/radeon_object.c | 1 + dr

[PATCH 6/7] drm/amdgpu: Fill out gem_object->resv

2019-06-25 Thread Daniel Vetter
there for confusion. Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: "Michel Dänzer" Cc: Chris Wilson Cc: Huang Rui Cc: Felix Kuehling Cc: Andrey Grodzovsky Cc: Evan Quan Cc: Sonny Jiang Cc: Amber Lin

[PATCH 0/7] gem_bo.resv prime unification, leftovers

2019-06-25 Thread Daniel Vetter
d's patch series to embed drm_gem_object in ttm_bo, or at least needs to be re-reviewed before we merge the 2nd series. Comments, testing, feedback as usual very much welcome. Thanks, Daniel Daniel Vetter (7): drm/fb-helper: use gem_bo.resv, not dma_buf.resv in prepare_fb drm/msm:

[PATCH 3/7] drm/vc4: Use drm_gem_fb_prepare_fb

2019-06-25 Thread Daniel Vetter
vc4 has switched to using drm_fb->obj[], so we can just use the helper unchanged. v2: Make it compile ... oops. Cc: Eric Anholt Cc: Emil Velikov Signed-off-by: Daniel Vetter Cc: Eric Anholt --- drivers/gpu/drm/vc4/vc4_plane.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) d

[PATCH 2/7] drm/msm: Use drm_gem_fb_prepare_fb

2019-06-25 Thread Daniel Vetter
msm has switched over to drm_fb->obj[] a while ago already, so we can just use the helper. v2: Make it compile ... oops. Cc: Eric Anholt Cc: Emil Velikov Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Cc: Jeykumar Sankaran Cc: Jordan Crouse Cc: Bruce Wang Cc: Fritz Koenig

[PATCH] drm/doc: Document kapi doc expectations

2019-06-25 Thread Daniel Vetter
We've had this already for anything new. With my drm_prime.c cleanup I also think documentations for everything already existing is complete, and we can bake this in as a requirements subsystem wide. Acked-by: Jani Nikula Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Jani Nikula Cc

Re: [PATCH v3 4/4] drm/imx: only send event on crtc disable if kept disabled

2019-06-25 Thread Daniel Vetter
gt; > Signed-off-by: Robert Beckett Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c > b/drivers/gpu/drm/imx/ipuv3-crtc.c > index e04d6efff1b5..c

Re: [PATCH v3 3/4] drm/vblank: estimate vblank while disabling vblank if interrupt disabled

2019-06-25 Thread Daniel Vetter
o for doing 64bit multiplies left to you :-) > + > + store_vblank(dev, pipe, diff, now, vblank->count); > + > goto out; > + } > > /* >* Update the count and timestamp to maintain the Somewhat unhappy that we're duplicating thi

Re: [PATCH v3 2/4] drm/imx: notify drm core before sending event during crtc disable

2019-06-25 Thread Daniel Vetter
blank state regression") > > Signed-off-by: Robert Beckett Now that I understand what's going on here: Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/imx/ipuv3-crtc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/imx/

Re: [PATCH v3 1/4] drm/vblank: warn on sending stale event

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 10:00:42PM +0200, Daniel Vetter wrote: > On Tue, Jun 25, 2019 at 06:59:12PM +0100, Robert Beckett wrote: > > Warn when about to send stale vblank info and add advice to > > documentation on how to avoid. > > > > Signed-off-by: Robert Beckett &

Re: [PATCH v3 1/4] drm/vblank: warn on sending stale event

2019-06-25 Thread Daniel Vetter
driver might want to call this and how they could get it wrong, which imo doesn't make sense. With the nits addressed: Reviewed-by: Daniel Vetter > */ > void drm_crtc_send_vblank_event(struct drm_crtc *crtc, > struct drm_pending_vblank_event *e) &g

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-25 Thread Daniel Vetter
; + * dma_buf_attachment_is_dynamic - check if a DMA-buf attachment uses dynamic > + * mappinsg > + * @attach: the DMA-buf attachment to check > + * > + * Returns true if a DMA-buf importer wants to use dynamic sg table mappings > and > + * calls the map/unmap functions with the reservation object locked. >

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 05:13:42PM +0200, Christian König wrote: > Am 25.06.19 um 17:07 schrieb Daniel Vetter: > > On Tue, Jun 25, 2019 at 4:45 PM Christian König > > wrote: > > > > > -if (attach->sgt) > > > > > +if (attach->sgt) { &

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 4:45 PM Christian König wrote: > > Am 25.06.19 um 16:35 schrieb Daniel Vetter: > > Hi Christian, > > > > On Tue, Jun 25, 2019 at 02:46:49PM +0200, Christian König wrote: > >> On the exporter side we add optional explicit pinning c

Re: [PATCH 1/2] dma-buf: add reservation_context for deadlock handling

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 04:36:28PM +0200, Christian König wrote: > Am 25.06.19 um 16:16 schrieb Daniel Vetter: > > On Tue, Jun 25, 2019 at 03:55:06PM +0200, Christian König wrote: > > > The ww_mutex framework allows for detecting deadlocks when multiple > > > threads

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v12

2019-06-25 Thread Daniel Vetter
return !!dmabuf->ops->pin; > +} > + > +/** > + * dma_buf_attachment_is_dynamic - check if a DMA-buf attachment uses dynamic > + * mappinsg > + * @attach: the DMA-buf attachment to check > + * > + * Returns true if a DMA-buf importer wants to use dynamic sg tab

Re: [PATCH v2 1/2] drm: Include ddc adapter pointer in struct drm_connector

2019-06-25 Thread Daniel Vetter
_connector. Particular > drivers can then use it instead of using their own private instance. If a > connector contains a ddc, then create a symbolic link in sysfs. > > Signed-off-by: Andrzej Pietrasiewicz Acked-by: Daniel Vetter As mentioned in the other subthread, I think

Re: [PATCH 0/2] Associate ddc adapters with connectors

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 03:10:32PM +0100, Russell King - ARM Linux admin wrote: > On Tue, Jun 25, 2019 at 04:07:55PM +0200, Daniel Vetter wrote: > > Otherwise I like this. Biggest problem I'm seeing here is rolling this out > > everywhere, this is a lot of work. And without wides

Re: [PATCH 1/2] dma-buf: add reservation_context for deadlock handling

2019-06-25 Thread Daniel Vetter
text_unlock_all(struct reservation_context *ctx); > +int reservation_context_lock(struct reservation_context *ctx, > + struct reservation_object *obj, > + bool interruptible); Needs a __must_check. > + > /** > * struct reservation_object_list - a list of shared fences > * @rcu: for internal use > @@ -71,6 +108,7 @@ struct reservation_object_list { > */ > struct reservation_object { > struct ww_mutex lock; > + struct llist_node locked; > seqcount_t seq; > > struct dma_fence __rcu *fence_excl; Aside from the nits, I like. -Daniel > -- > 2.17.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 0/2] Associate ddc adapters with connectors

2019-06-25 Thread Daniel Vetter
s to > another sysfs entries. And there aren't any i2c nodes in /dev ... > > Just a random food for thought :-) Those are the i2c-over-dp-aux controllers. I think we want to list these too. Btw to make this more useful maybe some default implementations for get_modes which automatic

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-25 Thread Daniel Vetter
On Tue, Jun 25, 2019 at 07:20:12AM +, Koenig, Christian wrote: > Am 24.06.19 um 16:41 schrieb Daniel Vetter: > > On Mon, Jun 24, 2019 at 03:58:00PM +0200, Christian König wrote: > >> Am 24.06.19 um 13:23 schrieb Koenig, Christian: > >>> Am 21.06.19

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-24 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 03:58:00PM +0200, Christian König wrote: > Am 24.06.19 um 13:23 schrieb Koenig, Christian: > > Am 21.06.19 um 18:27 schrieb Daniel Vetter: > > > > > So I pondered a few ideas while working out: > > > > > > 1) We drop this filterin

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-24 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 11:23:34AM +, Koenig, Christian wrote: > Am 21.06.19 um 18:27 schrieb Daniel Vetter: > >>> Your scenario here is new, and iirc my suggestion back then was to > >>> count the number of pending mappings so you don't go around calling >

Re: [PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled

2019-06-24 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 03:07:26PM +0200, Maarten Lankhorst wrote: > Op 24-06-2019 om 11:21 schreef Daniel Vetter: > > Fixes linking fail when fbcon/fbdev is modular and vgaswitcheroo is > > enabled: > > > > x86_64-linux-gnu-ld: drivers/gpu/vga/vg

Re: [PATCH] drm/fourcc: Add Arm 16x16 block modifier

2019-06-24 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 11:32 AM Brian Starkey wrote: > > Hi Daniel, > > On Fri, Jun 21, 2019 at 05:27:00PM +0200, Daniel Vetter wrote: > > On Fri, Jun 21, 2019 at 12:21 PM Raymond Smith > > wrote: > > > > > > Add the DRM_FORMAT_MOD_ARM_16X16_BL

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-24 Thread Daniel Vetter
andbox gpu clients real hard and really want to know what access rights they need to give out. But then we have much, much bigger fish to fry from a cross-driver consistency pov, so *shrug*. Just feels somewhat silly we can't even get agreement or some kind of consistent plan on something fairly simp

[PATCH] vga_switcheroo: Depend upon fbcon being built-in, if enabled

2019-06-24 Thread Daniel Vetter
, but vga_switcheroo is never a module, so this doesn't work. Reported-by: Stephen Rothwell Reported-by: kbuild test robot Fixes: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly") Cc: Stephen Rothwell Cc: Lukas Wunner Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst

Re: [PATCH] drm/connector: Fix warning in debug message

2019-06-24 Thread Daniel Vetter
eported-by: kbuild test robot > Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line") > Signed-off-by: Maxime Ripard Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_connector.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) &g

Re: [PATCH 0/4] drm/bridge: dw-hdmi: Add support for HDR metadata

2019-06-24 Thread Daniel Vetter
On Mon, Jun 24, 2019 at 10:19:34AM +0200, Neil Armstrong wrote: > Hi Daniel, Laurent, Andrzej, > > On 24/06/2019 01:30, Laurent Pinchart wrote: > > On Fri, Jun 21, 2019 at 11:01:25AM +0200, Daniel Vetter wrote: > >> On Thu, Jun 20, 2019 at 04:40:12PM +0200, Neil Armstrong

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-24 Thread Daniel Vetter
Hi Thomas, On Sat, Jun 22, 2019 at 09:14:24PM +0200, Thomas Hellstrom wrote: > On 6/22/19 11:18 AM, Daniel Vetter wrote: > > Hi Thomas, > > > > On Sat, Jun 22, 2019 at 12:52 AM Thomas Hellstrom > > wrote: > > > On 6/21/19 5:57 PM, Daniel Vetter wrote: > &

[PATCH] fbcon: Export fbcon_remap_all

2019-06-24 Thread Daniel Vetter
robot Fixes: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly") Cc: Stephen Rothwell Cc: Lukas Wunner Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter Cc: Maxime Ripard Cc: Sean Paul Cc: Bartlomiej Zolnierkiewicz Cc: Hans de

Re: [PATCH v1 0/2] drm: drop uapi dependencies from include/drm

2019-06-24 Thread Daniel Vetter
t; drm: drop uapi dependency from drm_print.h > drm: drop uapi dependency from drm_vblank.h On both Reviewed-by: Daniel Vetter > > include/drm/drm_print.h | 4 +--- > include/drm/drm_vblank.h | 1 - > 2 files changed, 1 insertion(+), 4 deletions(-) >

Re: KMS documentation for userspace

2019-06-22 Thread Daniel Vetter
On Sat, Jun 22, 2019 at 11:42 AM Simon Ser wrote: > On Wednesday, June 19, 2019 10:53 PM, Daniel Vetter wrote: > > tldr; Yes, I just didn't get around to it yet. > > > > The rough plan is to actually document ioctls and properties and all > > that stuff in drm-ua

Re: KMS documentation for userspace

2019-06-22 Thread Daniel Vetter
On Wed, Jun 19, 2019 at 10:16 PM Jani Nikula wrote: > > On Wed, 19 Jun 2019, Daniel Vetter wrote: > > - figure out what to do with the libdrm manpages. Some stuff we really > > want to also document there. But geez nroff. Maybe we need to stuff > > libdrm into the kern

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-22 Thread Daniel Vetter
Hi Thomas, On Sat, Jun 22, 2019 at 12:52 AM Thomas Hellstrom wrote: > On 6/21/19 5:57 PM, Daniel Vetter wrote: > > On Fri, Jun 21, 2019 at 05:12:19PM +0200, Thomas Hellström (VMware) wrote: > >> > >> On 6/21/19 1:57 PM, Gerd Hoffmann wrote: > >> > >>

Re: [PATCH] drm/ioctl: Ditch DRM_UNLOCKED except for the legacy vblank ioctl

2019-06-21 Thread Daniel Vetter
On Fri, Jun 07, 2019 at 11:24:01AM +0100, Emil Velikov wrote: > On Wed, 5 Jun 2019 at 13:08, Daniel Vetter wrote: > > > > This completes Emil's series of removing DRM_UNLOCKED from modern > > drivers. It's entirely cargo-culted since we ignore it on > > non-

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-21 Thread Daniel Vetter
rivers/gpu/drm/virtio/virtgpu_plane.c | 2 +- > > drivers/gpu/drm/virtio/virtgpu_prime.c| 3 - > > drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 +- > > drivers/gpu/drm/vmwgfx/vmwgfx_bo.c| 12 +- > > drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 4 +- > > drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 +- > > drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 4 +- > > 68 files changed, 311 insertions(+), 321 deletions(-) > > > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 02:06:54PM +0200, Christian König wrote: > Am 21.06.19 um 12:32 schrieb Daniel Vetter: > > On Fri, Jun 21, 2019 at 11:55 AM Christian König > > wrote: > > > Am 21.06.19 um 11:20 schrieb Daniel Vetter: > > > > On Tue, Jun 18, 2019 at 01:

Re: [PATCH v2 00/18] drm/ttm: make ttm bo a gem bo subclass

2019-06-21 Thread Daniel Vetter
at the reasonable thing to do is here, and this will allow us to substantially improve code and concept sharing across drm drivers. 10 years ago it was indeed not clear whether everyone doing the same is a bright idea, but that's no more. If you want I guess you can keep a private copy of ttm in vm

Re: linux-next: Fixes tags need some work in the drm-fixes tree

2019-06-21 Thread Daniel Vetter
drm/maintainer-tools/merge_requests/5 Officially we don't yet take pull requests (could try to change that, but last time around it got nacked by Jani). Can you pls submit to dim-tools@ as patch? Also, would be nice to run all the same checks we run at dim push time, not just checking for Fixes tags. -Daniel > > regards > Philipp > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH 2/2] drm: Set crc->opened = false before setting crc source to NULL.

2019-06-21 Thread Daniel Vetter
k to look at ->opened, or you need it. Not both. Too lazy check which way this is, it's practically w/e here :-) -Daniel > > + > > crtc->funcs->set_crc_source(crtc, NULL); > > > > spin_lock_irq(>lock); > > > ___ > dri-devel maili

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 05:15:22PM +0200, Michel Dänzer wrote: > On 2019-06-21 1:50 p.m., Daniel Vetter wrote: > > On Fri, Jun 21, 2019 at 1:37 PM Christian König > > wrote: > >> Am 21.06.19 um 13:03 schrieb Daniel Vetter: > >>> So if you want to depracate r

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
at the open stack does, their problem. Speaking as someone who's pissed off closed source driver teams to no end. I'm happy to be of service here too :-) > I mean it's really a bunch of more code to maintain, and getting rid of > code is always less work in the long term then keeping it. >

Re: [PATCH] drm/fourcc: Add Arm 16x16 block modifier

2019-06-21 Thread Daniel Vetter
ma/panfrost people since I assume they'll be using this, too. Thanks, Daniel > + > +/* > * Allwinner tiled modifier > * > * This tiling mode is implemented by the VPU found on all Allwinner > platforms, > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 1:50 PM Daniel Vetter wrote: > > On Fri, Jun 21, 2019 at 1:37 PM Christian König > wrote: > > > > Am 21.06.19 um 13:03 schrieb Daniel Vetter: > > > On Fri, Jun 21, 2019 at 12:31 PM Koenig, Christian > > > wrote: > >

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 1:37 PM Christian König wrote: > > Am 21.06.19 um 13:03 schrieb Daniel Vetter: > > On Fri, Jun 21, 2019 at 12:31 PM Koenig, Christian > > wrote: > >> Am 21.06.19 um 12:20 schrieb Emil Velikov: > >>> In particular, that user-spa

Re: [GIT PULL] mali-dp and komeda patches for drm-next

2019-06-21 Thread Daniel Vetter
ne_state.c | 679 > - > drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 191 +- > .../drm/arm/display/komeda/komeda_private_obj.c| 154 + > .../drm/arm/display/komeda/komeda_wb_connector.c | 199 ++ > drivers/gpu/drm/arm/malidp_drv.c

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
ary node rendering to render nodes. The code is there already for socs, just needs to be rolled out more. Or we go with the DRM_AUTH horrors. Or a 3rd option, I really don't care which it is, as long as its consistent. tldr; consistent color choice on this bikeshed please. Thanks, Daniel -- Daniel Vetter

Re: [PATCH 09/59] drm/prime: Align gem_prime_export with obj_funcs.export

2019-06-21 Thread Daniel Vetter
On Fri, Jun 14, 2019 at 10:35:25PM +0200, Daniel Vetter wrote: > The idea is that gem_prime_export is deprecated in favor of > obj_funcs.export. That's much easier to do if both have matching > function signatures. > > Signed-off-by: Daniel Vetter > Cc: Russell King >

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 11:55 AM Christian König wrote: > > Am 21.06.19 um 11:20 schrieb Daniel Vetter: > > On Tue, Jun 18, 2019 at 01:54:50PM +0200, Christian König wrote: > >> On the exporter side we add optional explicit pinning callbacks. If those > >> callbacks

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 11:25 AM Koenig, Christian wrote: > > Am 21.06.19 um 11:09 schrieb Daniel Vetter: > > On Fri, Jun 21, 2019 at 07:12:14AM +, Koenig, Christian wrote: > >> Am 20.06.19 um 18:30 schrieb Emil Velikov: > >>> On 2019/06/14, Koenig, Christia

Re: [Intel-gfx] [PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-21 Thread Daniel Vetter
nt uses dynamic > + * mappinsg > + * @attach: the DMA-buf attachment to check > + * > + * Returns true if a DMA-buf importer wants to use dynamic sg table mappings > and > + * calls the map/unmap functions with the reservation object locked. > + */ > +static inline bool > +d

Re: [PATCH v5 2/2] DRM: Add KMS driver for the Ingenic JZ47xx SoCs

2019-06-21 Thread Daniel Vetter
On Fri, Jun 21, 2019 at 11:07:30AM +0200, Paul Cercueil wrote: > > > Le ven. 21 juin 2019 à 11:04, Daniel Vetter a écrit : > > On Thu, Jun 20, 2019 at 04:15:59PM +0200, Paul Cercueil wrote: > > > > > > > > > Le mer. 19 juin 2019 à 14:26, Sam

Re: [PATCH 01/13] drm/amdgpu: introduce and honour DRM_FORCE_AUTH workaround

2019-06-21 Thread Daniel Vetter
for DRM master. Turned out that this is relatively easy as well. > > All we have to do is to fix the bug Michel pointed out about KMS handles > for display and let the DDX use a render node instead of the DRM master > for Glamor. Still need to sync up with Michel and/or Marek whats

Re: [PATCH v5 2/2] DRM: Add KMS driver for the Ingenic JZ47xx SoCs

2019-06-21 Thread Daniel Vetter
s/) > > You will need a legacy SSH account. > > I requested an account here: > https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/162 This 404s for me. Did you set the issue to private by any chance? Or deleted already again? -Daniel > > > And you should familia

Re: [PATCH 0/4] drm/bridge: dw-hdmi: Add support for HDR metadata

2019-06-21 Thread Daniel Vetter
| 2 + > > drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 + > > include/drm/bridge/dw_hdmi.h | 1 + > > 7 files changed, 157 insertions(+) > > > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH 1/7] video: add HDMI state notifier support

2019-06-20 Thread Daniel Vetter
Massively cutting this thread, since halfway through in my previous reply I realized that maybe hdmi_codec is a much better starting point. On Thu, Jun 20, 2019 at 09:23:23PM +0800, Cheng-yi Chiang wrote: > On Thu, Jun 20, 2019 at 5:25 PM Daniel Vetter wrote: > > Yeah fully

Re: [PATCH] drm/imx: correct order of crtc disable

2019-06-20 Thread Daniel Vetter
On Thu, Jun 20, 2019 at 3:30 PM Robert Beckett wrote: > On Thu, 2019-06-20 at 14:32 +0200, Daniel Vetter wrote: > > On Thu, Jun 20, 2019 at 12:12:13PM +0100, Robert Beckett wrote: > > > On Thu, 2019-06-20 at 10:50 +0200, Daniel Vetter wrote: > > > > On Wed, Jun 19,

Re: [PATCH] drm/todo: Update drm_gem_object_funcs todo even more

2019-06-20 Thread Daniel Vetter
On Tue, Jun 18, 2019 at 07:25:08PM +0100, Eric Engestrom wrote: > On Tuesday, 2019-06-18 16:02:41 +0200, Daniel Vetter wrote: > > I rushed merging this a bit too much, and Noralf pointed out that > > we're a lot better already and have made great progress. > > > > Let'

[PATCH] drm/prime: Update docs

2019-06-20 Thread Daniel Vetter
: Gerd Hoffmann Cc: Noralf Trønnes Cc: Sam Ravnborg Cc: Eric Anholt Cc: Emil Velikov Signed-off-by: Daniel Vetter --- Documentation/gpu/drm-mm.rst | 40 +-- drivers/gpu/drm/drm_prime.c | 201 +-- include/drm/drm_drv.h| 104 +++--- include

Re: [PATCH 2/2] drm/prime: Update docs

2019-06-20 Thread Daniel Vetter
On Wed, Jun 19, 2019 at 02:43:20PM +0200, Noralf Trønnes wrote: > > > Den 18.06.2019 11.20, skrev Daniel Vetter: > > Yes this is a bit a big patch, but since it's essentially a complete > > rewrite of all the prime docs I didn't see how to better split it up. > > >

Re: [PATCH] drm/imx: correct order of crtc disable

2019-06-20 Thread Daniel Vetter
On Thu, Jun 20, 2019 at 12:12:13PM +0100, Robert Beckett wrote: > On Thu, 2019-06-20 at 10:50 +0200, Daniel Vetter wrote: > > On Wed, Jun 19, 2019 at 11:40 AM Philipp Zabel < > > p.za...@pengutronix.de> wrote: > > > > > > Hi Robert, > > > > >

Re: [PATCH] drm/self_refresh: Fix possible NULL deref in failure path

2019-06-20 Thread Daniel Vetter
m: Add helpers to kick off self refresh mode in > drivers") > Cc: Daniel Vetter > Cc: Jose Souza > Cc: Zain Wang > Cc: Tomasz Figa > Cc: Ville Syrjälä > Cc: Sam Ravnborg > Cc: Sean Paul > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Sean Paul >

Re: [PATCH 1/7] video: add HDMI state notifier support

2019-06-20 Thread Daniel Vetter
On Wed, Jun 19, 2019 at 07:48:11PM +0800, Cheng-yi Chiang wrote: > On Tue, Jun 18, 2019 at 8:12 PM Daniel Vetter wrote: > > > > On Tue, Jun 18, 2019 at 07:48:06PM +0800, Cheng-yi Chiang wrote: > > > On Tue, Jun 11, 2019 at 8:35 PM Daniel Vetter wrote: > > > >

Re: [PATCH] drm/imx: correct order of crtc disable

2019-06-20 Thread Daniel Vetter
drm_crtc_send_vblank_event(crtc, crtc->state->event); > > crtc->state->event = NULL; > > } > > spin_unlock_irq(>dev->event_lock); > > - > > - drm_crtc_vblank_off(crtc); > > } > > > >

Re: [PATCH 1/4] mm: Check if mmu notifier callbacks are allowed to fail

2019-06-19 Thread Daniel Vetter
On Wed, Jun 19, 2019 at 10:42 PM Jason Gunthorpe wrote: > > On Wed, Jun 19, 2019 at 10:18:43PM +0200, Daniel Vetter wrote: > > On Wed, Jun 19, 2019 at 10:13 PM Jason Gunthorpe wrote: > > > On Wed, Jun 19, 2019 at 09:57:15PM +0200, Daniel Vetter wrote: > > > >

  1   2   3   4   5   6   7   8   9   10   >