<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/drm/drm_gem.h, branch v5.8</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm: call drm_gem_object_funcs.mmap with fake offset</title>
<updated>2019-12-06T10:18:11+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-11-27T09:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e5516553999f7352bce3d921441b1288eb0a1bb7'/>
<id>e5516553999f7352bce3d921441b1288eb0a1bb7</id>
<content type='text'>
The fake offset is going to stay, so change the calling convention for
drm_gem_object_funcs.mmap to include the fake offset.  Update all users
accordingly.

Note that this reverts 83b8a6f242ea ("drm/gem: Fix mmap fake offset
handling for drm_gem_object_funcs.mmap") and on top then adds the fake
offset to  drm_gem_prime_mmap to make sure all paths leading to
obj-&gt;funcs-&gt;mmap are consistent.

v3: move fake-offset tweak in drm_gem_prime_mmap() so we have this code
    only once in the function (Rob Herring).

Fixes: 83b8a6f242ea ("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap")
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
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/20191127092523.5620-2-kraxel@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fake offset is going to stay, so change the calling convention for
drm_gem_object_funcs.mmap to include the fake offset.  Update all users
accordingly.

Note that this reverts 83b8a6f242ea ("drm/gem: Fix mmap fake offset
handling for drm_gem_object_funcs.mmap") and on top then adds the fake
offset to  drm_gem_prime_mmap to make sure all paths leading to
obj-&gt;funcs-&gt;mmap are consistent.

v3: move fake-offset tweak in drm_gem_prime_mmap() so we have this code
    only once in the function (Rob Herring).

Fixes: 83b8a6f242ea ("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap")
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
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/20191127092523.5620-2-kraxel@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap</title>
<updated>2019-10-29T18:29:21+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-10-24T19:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=83b8a6f242ea6b4eafe69afcd0bfa428235f2ee4'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: add mmap() to drm_gem_object_funcs</title>
<updated>2019-10-17T11:59:16+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-10-16T11:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c40069cb7bd64903e0c0a3845ea8d3298ca57ea3'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf: rename reservation_object to dma_resv</title>
<updated>2019-08-13T07:09:30+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2019-08-11T08:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=52791eeec1d9f4a7e7fe08aaba0b1553149d93bc'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()"</title>
<updated>2019-08-07T15:56:48+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-08-07T14:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=abd4e745ffc4d762b0ed4eada9ff732d8861174d'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</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:13+00:00</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2019-08-07T14:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=87160d2bfc5ed2eeb61d0d8921a38377a6ea3a36'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()"</title>
<updated>2019-07-03T22:38:50+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-07-03T22:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=415d2e9e07574d3de63b8df77dc686e0ebf64865'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()</title>
<updated>2019-06-28T21:01:21+00:00</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2019-06-27T15:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=220df83a5394fbf7c1486ba7848794b7b351d598'/>
<id>220df83a5394fbf7c1486ba7848794b7b351d598</id>
<content type='text'>
drm_gem_dumb_map_offset() is a useful helper for non-dumb clients, so
rename it to remove the _dumb and add a comment that it can be used by
shmem clients.

Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190627155318.38053-2-steven.price@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drm_gem_dumb_map_offset() is a useful helper for non-dumb clients, so
rename it to remove the _dumb and add a comment that it can be used by
shmem clients.

Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190627155318.38053-2-steven.price@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/prime: Update docs</title>
<updated>2019-06-21T09:48:09+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-20T12:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=805dc614d58a8fb069ed079005e591247df85246'/>
<id>805dc614d58a8fb069ed079005e591247df85246</id>
<content type='text'>
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.

Changes:
- Consistently point to drm_gem_object_funcs as the preferred hooks,
  where applicable.

- Document all the hooks in &amp;drm_driver that lacked kerneldoc.

- Completely new overview section, which now also includes the cleaned
  up lifetime/reference counting subchapter. I also mentioned the weak
  references in there due to the lookup caches.

- Completely rewritten helper intro section, highlight the
  import/export related functionality.

- Polish for all the functions and more cross references.

I also sprinkled a bunch of todos all over.

Most important: 0 code changes in here. The cleanup motivated by
reading and improving all this will follow later on.

v2: Actually update the prime helper docs. Plus add a few FIXMEs that
I won't address right away in subsequent cleanup patches.

v3:
- Split out the function moving. This patch is now exclusively
  documentation changes.
- Typos and nits (Sam).

v4: Polish suggestions from Noralf.

Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190620124615.24434-1-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Changes:
- Consistently point to drm_gem_object_funcs as the preferred hooks,
  where applicable.

- Document all the hooks in &amp;drm_driver that lacked kerneldoc.

- Completely new overview section, which now also includes the cleaned
  up lifetime/reference counting subchapter. I also mentioned the weak
  references in there due to the lookup caches.

- Completely rewritten helper intro section, highlight the
  import/export related functionality.

- Polish for all the functions and more cross references.

I also sprinkled a bunch of todos all over.

Most important: 0 code changes in here. The cleanup motivated by
reading and improving all this will follow later on.

v2: Actually update the prime helper docs. Plus add a few FIXMEs that
I won't address right away in subsequent cleanup patches.

v3:
- Split out the function moving. This patch is now exclusively
  documentation changes.
- Typos and nits (Sam).

v4: Polish suggestions from Noralf.

Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190620124615.24434-1-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/gem: Unexport drm_gem_(un)pin/v(un)map</title>
<updated>2019-06-17T15:37:01+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-14T20:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eb69c8a4bf5e26ae112793bb04a6cd6c27114900'/>
<id>eb69c8a4bf5e26ae112793bb04a6cd6c27114900</id>
<content type='text'>
They're purely for internal use, not for drivers.

Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-3-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They're purely for internal use, not for drivers.

Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-3-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
</feed>
