<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/drm_gem.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-05-17T06:47:30Z</updated>
<entry>
<title>drm: Remove unused drm_device from drm_gem_object_lookup()</title>
<updated>2016-05-17T06:47:30Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2016-05-09T10:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8ad0bd84f986072314595d05444719fdf29e412'/>
<id>urn:sha1:a8ad0bd84f986072314595d05444719fdf29e412</id>
<content type='text'>
drm_gem_object_lookup() has never required the drm_device for its file
local translation of the user handle to the GEM object. Let's remove the
unused parameter and save some space.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
[danvet: Fixup kerneldoc too.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Fixup locking WARN_ON mistake around gem_object_free_unlocked</title>
<updated>2016-05-04T13:24:32Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2016-05-04T12:10:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d3e7fddb39a4f0a47c8042df11554bb61d7a4aa'/>
<id>urn:sha1:6d3e7fddb39a4f0a47c8042df11554bb61d7a4aa</id>
<content type='text'>
Embarrassingly while fixing up the old paths for i915 I managed to
misplace a locking check for the new _unlocked paths. That's what I
get for not retesting on radeon.

Fixes: 9f0ba539d13a ("drm/gem: support BO freeing without dev-&gt;struct_mutex")
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Tested-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/gem: support BO freeing without dev-&gt;struct_mutex</title>
<updated>2016-05-04T10:25:47Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2016-05-02T08:40:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f0ba539d13aebacb05dda542df7ef80684b2c70'/>
<id>urn:sha1:9f0ba539d13aebacb05dda542df7ef80684b2c70</id>
<content type='text'>
Finally all the core gem and a lot of drivers are entirely free of
dev-&gt;struct_mutex depencies, and we can start to have an entirely
lockless unref path.

To make sure that no one who touches the core code accidentally breaks
existing drivers which still require dev-&gt;struct_mutex I've made the
might_lock check unconditional.

While at it de-inline the ref/unref functions, they've become a bit
too big.

v2: Make it not leak like a sieve.

v3: Review from Lucas:
- drop != NULL in pointer checks.
- fixup copypasted kerneldoc to actually match the functions.

v4:
Add __drm_gem_object_unreference as a fastpath helper for drivers who
abolished dev-&gt;struct_mutex, requested by Chris.

v5: Fix silly mistake in drm_gem_object_unreference_unlocked caught by
intel-gfx CI - I checked for gem_free_object instead of
gem_free_object_unlocked ...

Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt; (v3)
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt; (v4)
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1462178451-1765-1-git-send-email-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>Merge tag 'v4.6-rc3' into drm-next</title>
<updated>2016-04-21T22:32:51Z</updated>
<author>
<name>Dave Airlie</name>
</author>
<published>2016-04-21T22:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49047962ecf02d76bdaa378c00a51c9b829ac195'/>
<id>urn:sha1:49047962ecf02d76bdaa378c00a51c9b829ac195</id>
<content type='text'>
Backmerge 4.6-rc3 for i915.

Linux 4.6-rc3
</content>
</entry>
<entry>
<title>Merge tag 'topic/drm-misc-2016-04-21' of git://anongit.freedesktop.org/drm-intel into drm-next</title>
<updated>2016-04-21T20:06:02Z</updated>
<author>
<name>Dave Airlie</name>
</author>
<published>2016-04-21T20:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d57d47735ef5461952ef1dbdd515ebc0ffc5d2cc'/>
<id>urn:sha1:d57d47735ef5461952ef1dbdd515ebc0ffc5d2cc</id>
<content type='text'>
misc pull req all over. Biggest thing is the
drm_connector_(un)register_all cleanup from Alexey for drivers without the
load/unload midlayer hooks. I.e. all the new ones, and a bunch of the
pending new atomic drivers depend upon this. Or at least I asked them to
rebase ;-)

* tag 'topic/drm-misc-2016-04-21' of git://anongit.freedesktop.org/drm-intel:
  drm: Make drm.debug parameter description more helpful
  drm: Remove warning from drm_connector_unregister_all()
  drm: probe_helper: Hide ugly ifdef
  drm: rcar-du: Use generic drm_connector_register_all() helper
  drm: atmel_hldc: Use generic drm_connector_register_all() helper
  drm: Introduce drm_connector_register_all() helper
  drm: fix lut value extraction function
  drm/atomic-helper: Print an error if vblank wait times out
  drm/dp/mst: Restore primary hub guid on resume
  drm: Release driver references to handle before making it available again
  drm/i915/dp/mst: Add source port info to debugfs output
  drm/dp/mst: Enhance DP MST debugfs output
  drm/edid: Add drm_edid_get_monitor_name()
  include/drm: Reword debug categories comment.
  drm/crtc_helper: Reset empty plane state in drm_helper_crtc_mode_set_base()
  drm/virtio: Drop dummy gamma table support
  drm/bochs: Drop fake gamma support
  drm/core: Fix ordering in drm_mode_config_cleanup.
</content>
</entry>
<entry>
<title>drm/vma_manage: Drop has_offset</title>
<updated>2016-04-20T10:58:53Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2016-03-30T09:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f74418a400c62f382228842fd0ce8a05f9069d8c'/>
<id>urn:sha1:f74418a400c62f382228842fd0ce8a05f9069d8c</id>
<content type='text'>
It's racy, creating mmap offsets is a slowpath, so better to remove it
to avoid drivers doing broken things.

The only user is i915, and it's ok there because everything (well
almost) is protected by dev-&gt;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 &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-14-git-send-email-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Release driver references to handle before making it available again</title>
<updated>2016-04-15T12:39:18Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2016-04-15T11:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6cd7daecff558fab2c45d15283d3e52f688342d'/>
<id>urn:sha1:f6cd7daecff558fab2c45d15283d3e52f688342d</id>
<content type='text'>
When userspace closes a handle, we remove it from the file-&gt;object_idr
and then tell the driver to drop its references to that file/handle.
However, as the file/handle is already available again for reuse, it may
be reallocated back to userspace and active on a new object before the
driver has had a chance to drop the old file/handle references.

Whilst calling back into the driver, we have to drop the
file-&gt;table_lock spinlock and so to prevent reusing the closed handle we
mark that handle as stale in the idr, perform the callback and then
remove the handle. We set the stale handle to point to the NULL object,
then any idr_find() whilst the driver is removing the handle will return
NULL, just as if the handle is already removed from idr.

Note: This will be used to have a direct handle -&gt; vma lookup table,
instead of first a handle -&gt; obj lookup, and then an (obj, vm) -&gt; vma
lookup.

v2: Use NULL rather than an ERR_PTR to avoid having to adjust callers.
idr_alloc() tracks existing handles using an internal bitmap, so we are
free to use the NULL object as our stale identifier.
v3: Needed to update the return value check after changing from using
the stale error pointer to NULL.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: Thierry Reding &lt;treding@nvidia.com&gt;
[danvet: Add note about the use-case.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1460721308-32405-1-git-send-email-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros</title>
<updated>2016-04-04T17:41:08Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2016-04-01T12:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a'/>
<id>urn:sha1:09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a</id>
<content type='text'>
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm: Remove opencoded drm_gem_object_release_handle()</title>
<updated>2016-01-05T15:23:09Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2016-01-05T09:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8815b23aa0933653812e9c13c506f6f60fac474e'/>
<id>urn:sha1:8815b23aa0933653812e9c13c506f6f60fac474e</id>
<content type='text'>
drm_gem_handle_delete() contains its own version of
drm_gem_object_release_handle(), so lets just call the release method
instead.

Reported-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-2-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Do not set outparam on error during GEM handle allocation</title>
<updated>2016-01-05T15:22:58Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2016-01-05T09:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9649399e918f61788a6302a0f7d3c5ed34c2930c'/>
<id>urn:sha1:9649399e918f61788a6302a0f7d3c5ed34c2930c</id>
<content type='text'>
Good practice dictates that we do not leak stale information to our
callers, and should avoid overwriting an outparam on an error path.

Reported-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
