<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/drm_gem.c, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-11-15T07:00:08Z</updated>
<entry>
<title>drm/ttm: fix mmap refcounting</title>
<updated>2019-11-15T07:00:08Z</updated>
<author>
<name>Gerd Hoffmann</name>
</author>
<published>2019-11-13T13:56:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9786b65bc61acec63f923978c75e707afbb74bc7'/>
<id>urn:sha1:9786b65bc61acec63f923978c75e707afbb74bc7</id>
<content type='text'>
When mapping ttm objects via drm_gem_ttm_mmap() helper
drm_gem_mmap_obj() will take an object reference.  That gets
never released due to ttm having its own reference counting.

Fix that by dropping the gem object reference once the ttm mmap
completed (and ttm refcount got bumped).

For that to work properly the drm_gem_object_get() call in
drm_gem_ttm_mmap() must be moved so it happens before calling
obj-&gt;funcs-&gt;mmap(), otherwise the gem refcount would go down
to zero.

Fixes: 231927d939f0 ("drm/ttm: add drm_gem_ttm_mmap()")
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Tested-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20191113135612.19679-1-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap</title>
<updated>2019-10-29T18:29:21Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2019-10-24T19:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83b8a6f242ea6b4eafe69afcd0bfa428235f2ee4'/>
<id>urn:sha1:83b8a6f242ea6b4eafe69afcd0bfa428235f2ee4</id>
<content type='text'>
Commit c40069cb7bd6 ("drm: add mmap() to drm_gem_object_funcs")
introduced a GEM object mmap() hook which is expected to subtract the
fake offset from vm_pgoff. However, for mmap() on dmabufs, there is not
a fake offset.

To fix this, let's always call mmap() object callback with an offset of 0,
and leave it up to drm_gem_mmap_obj() to remove the fake offset.

TTM still needs the fake offset, so we have to add it back until that's
fixed.

Fixes: c40069cb7bd6 ("drm: add mmap() to drm_gem_object_funcs")
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191024191859.31700-1-robh@kernel.org
</content>
</entry>
<entry>
<title>drm: add mmap() to drm_gem_object_funcs</title>
<updated>2019-10-17T11:59:16Z</updated>
<author>
<name>Gerd Hoffmann</name>
</author>
<published>2019-10-16T11:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c40069cb7bd64903e0c0a3845ea8d3298ca57ea3'/>
<id>urn:sha1:c40069cb7bd64903e0c0a3845ea8d3298ca57ea3</id>
<content type='text'>
drm_gem_object_funcs-&gt;vm_ops alone can't handle everything which needs
to be done for mmap(), tweaking vm_flags for example.  So add a new
mmap() callback to drm_gem_object_funcs where this code can go to.

Note that the vm_ops field is not used in case the mmap callback is
present, it is expected that the callback sets vma-&gt;vm_ops instead.

Also setting vm_flags and vm_page_prot is the job of the new callback.
so drivers have more control over these flags.

drm_gem_mmap_obj() will use the new callback for object specific mmap
setup.  With this in place the need for driver-speific fops-&gt;mmap
callbacks goes away, drm_gem_mmap can be hooked instead.

drm_gem_prime_mmap() will use the new callback too to just mmap gem
objects directly instead of jumping though loops to make
drm_gem_object_lookup() and fops-&gt;mmap work.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-2-kraxel@redhat.com
</content>
</entry>
<entry>
<title>dma-buf: rename reservation_object to dma_resv</title>
<updated>2019-08-13T07:09:30Z</updated>
<author>
<name>Christian König</name>
</author>
<published>2019-08-11T08:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52791eeec1d9f4a7e7fe08aaba0b1553149d93bc'/>
<id>urn:sha1:52791eeec1d9f4a7e7fe08aaba0b1553149d93bc</id>
<content type='text'>
Be more consistent with the naming of the other DMA-buf objects.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/323401/
</content>
</entry>
<entry>
<title>drm/gem: Allow sparsely populated page arrays in drm_gem_put_pages</title>
<updated>2019-08-12T20:17:09Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2019-07-19T14:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=930a402485b205214231f1141632afdca8ff89cb'/>
<id>urn:sha1:930a402485b205214231f1141632afdca8ff89cb</id>
<content type='text'>
Panfrost has a need for pages allocated on demand via GPU page faults.
When releasing the pages, the only thing preventing using
drm_gem_put_pages() is needing to skip over unpopulated pages, so allow
for skipping over NULL struct page pointers.

Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-2-robh@kernel.org
</content>
</entry>
<entry>
<title>Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()"</title>
<updated>2019-08-07T15:56:48Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2019-08-07T14:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=abd4e745ffc4d762b0ed4eada9ff732d8861174d'/>
<id>urn:sha1:abd4e745ffc4d762b0ed4eada9ff732d8861174d</id>
<content type='text'>
This reverts commit 220df83a5394fbf7c1486ba7848794b7b351d598.

Turns out drm_gem_dumb_map_offset really only worked for the dumb buffer
case, so revert the name change.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sean Paul &lt;sean@poorly.run&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190807145253.2037-2-sean@poorly.run
</content>
</entry>
<entry>
<title>Revert "Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()""</title>
<updated>2019-08-07T14:44:13Z</updated>
<author>
<name>Sean Paul</name>
</author>
<published>2019-08-07T14:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87160d2bfc5ed2eeb61d0d8921a38377a6ea3a36'/>
<id>urn:sha1:87160d2bfc5ed2eeb61d0d8921a38377a6ea3a36</id>
<content type='text'>
This reverts commit 415d2e9e07574d3de63b8df77dc686e0ebf64865.

Mandatory review was missing from this patch.

Acked-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190807142101.251400-2-sean@poorly.run
</content>
</entry>
<entry>
<title>dma-buf: add more reservation object locking wrappers</title>
<updated>2019-08-05T07:28:43Z</updated>
<author>
<name>Christian König</name>
</author>
<published>2019-07-31T07:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dbd555a011c2d096a7b7e40c83c5776a7df367c'/>
<id>urn:sha1:0dbd555a011c2d096a7b7e40c83c5776a7df367c</id>
<content type='text'>
Complete the abstraction of the ww_mutex inside the reservation object.

This allows us to add more handling and debugging to the reservation
object in the future.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/320761/
</content>
</entry>
<entry>
<title>drm: direct include of drm.h in drm_gem.c</title>
<updated>2019-07-19T21:24:17Z</updated>
<author>
<name>Sam Ravnborg</name>
</author>
<published>2019-07-18T16:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c53587629f62d71f2ef22fb64c045ecd57a0e2e'/>
<id>urn:sha1:1c53587629f62d71f2ef22fb64c045ecd57a0e2e</id>
<content type='text'>
Do not rely on including drm.h from drm_file.h,
as the include in drm_file.h will be dropped.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Sean Paul &lt;sean@poorly.run&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190718161507.2047-7-sam@ravnborg.org
</content>
</entry>
<entry>
<title>Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()"</title>
<updated>2019-07-03T22:38:50Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2019-07-03T22:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=415d2e9e07574d3de63b8df77dc686e0ebf64865'/>
<id>urn:sha1:415d2e9e07574d3de63b8df77dc686e0ebf64865</id>
<content type='text'>
This reverts commit 220df83a5394fbf7c1486ba7848794b7b351d598.

Turns out drm_gem_dumb_map_offset really only worked for the dumb buffer
case, so revert the name change.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
</feed>
