<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_context.c, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-08-05T17:38:12Z</updated>
<entry>
<title>drm: mark drm_context support as legacy</title>
<updated>2014-08-05T17:38:12Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-07-24T10:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7b96070dd9e51a8b16340411a8643d8c7d5a001'/>
<id>urn:sha1:e7b96070dd9e51a8b16340411a8643d8c7d5a001</id>
<content type='text'>
This renames all drm-context helpers to drm_legacy_*() and moves the
internal definitions into the new drm_legacy.h header. This header is
local to DRM-core and drivers shouldn't access it.

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: extract legacy ctxbitmap flushing</title>
<updated>2014-08-05T14:07:45Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-07-23T07:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f8d21ea276177547725a60cefc1b6da742f14d3'/>
<id>urn:sha1:9f8d21ea276177547725a60cefc1b6da742f14d3</id>
<content type='text'>
The ctxbitmap code is only used by legacy drivers so lets try to keep it
as separated as possible. Furthermore, the locking is non-obvious and
kinda weird with ctxlist_mutex *and* struct_mutex. Keeping all ctxbitmap
access in one file is much easier to review and makes drm_release() more
readable.

Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: Kill ctx_count from struct drm_device</title>
<updated>2013-10-09T05:55:32Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2013-10-04T11:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc6ff1935b550bdf525e0caa5ef0894010375414'/>
<id>urn:sha1:fc6ff1935b550bdf525e0caa5ef0894010375414</id>
<content type='text'>
The only user of ctx_count is the via driver, and we can replace that
use with list_is_singular().

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "drm: mark context support as a legacy subsystem"</title>
<updated>2013-09-19T22:32:59Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-09-19T22:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095'/>
<id>urn:sha1:c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095</id>
<content type='text'>
This reverts commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1.

Well looks like not enough digging was done, libdrm_nouveau before 2.4.33
used contexts,

292da616fe1f936ca78a3fa8e1b1b19883e343b6 nouveau: pull in major libdrm rewrite

got rid of them,

Reported-by: Paul Zimmerman &lt;Paul.Zimmerman@synopsys.com&gt;
Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: mark context support as a legacy subsystem</title>
<updated>2013-08-19T00:04:48Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-08-08T13:41:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c510133d93dd6f15ca040733ba7b2891ed61fd1'/>
<id>urn:sha1:7c510133d93dd6f15ca040733ba7b2891ed61fd1</id>
<content type='text'>
So after a lot of digging around in git histories it looks like this
has only ever be used by dri1 render clients. Hence we can fully
disable the entire thing for modesetting drivers and so greatly reduce
the attack surface for potential exploits (or at least tools like
trinity ...).

Also add the drm_legacy prefix for functions which are called from
common code. To further reduce the impact on common code also extract
all the ctx release handling into a function (instead of only
releasing individual handles) and make ctxbitmap_cleanup return void -
it can never fail.

Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: remove dev-&gt;last_switch</title>
<updated>2013-07-23T09:20:20Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a17800c70129d5976a52c42f04a16a0f1d9df4b2'/>
<id>urn:sha1:a17800c70129d5976a52c42f04a16a0f1d9df4b2</id>
<content type='text'>
Only ever assigned in the context code for real, with no readers
anywhere. Remove it.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: kill dev-&gt;context_wait</title>
<updated>2013-07-23T09:20:19Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3dadef6c96c8aa6e67f83b30504256a0605ee4d6'/>
<id>urn:sha1:3dadef6c96c8aa6e67f83b30504256a0605ee4d6</id>
<content type='text'>
No one ever waits on this waitqueue, so the wake_up call is wasted.
Remove it all.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: remove drm_modctx ioctl and use drm_noop instead</title>
<updated>2013-07-23T09:20:18Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-07-10T12:11:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=492d774db34fd601b3db17218cf0ae262b51b5cf'/>
<id>urn:sha1:492d774db34fd601b3db17218cf0ae262b51b5cf</id>
<content type='text'>
It doesn't do anything, so kill the code.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: convert to idr_alloc()</title>
<updated>2013-02-28T03:10:15Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e928815c1886fe628ed54623aa98d0889cf5509'/>
<id>urn:sha1:2e928815c1886fe628ed54623aa98d0889cf5509</id>
<content type='text'>
Convert to the much saner new idr interface.

* drm_ctxbitmap_next() error handling in drm_addctx() seems broken.
  drm_ctxbitmap_next() return -errno on failure not -1.

[artem.savkov@gmail.com: missing idr_preload_end in drm_gem_flink_ioctl]
[jslaby@suse.cz: fix drm_gem_flink_ioctl() return value]
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm: don't use idr_remove_all()</title>
<updated>2013-02-28T03:10:13Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d53233a36fdda567cd4d080e27e1ee4b669ddd1'/>
<id>urn:sha1:4d53233a36fdda567cd4d080e27e1ee4b669ddd1</id>
<content type='text'>
idr_destroy() can destroy idr by itself and idr_remove_all() is being
deprecated.  Drop its usage.

* drm_ctxbitmap_cleanup() was calling idr_remove_all() but forgetting
  idr_destroy() thus leaking all buffered free idr_layers.  Replace it
  with idr_destroy().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Airlie &lt;airlied@linux.ie&gt;
Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Joonyoung Shim &lt;jy0922.shim@samsung.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
