<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_context.c, branch v3.12.17</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/gpu/drm/drm_context.c?h=v3.12.17</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/gpu/drm/drm_context.c?h=v3.12.17'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-19T22:32:59Z</updated>
<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.amat.us/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.amat.us/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.amat.us/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.amat.us/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.amat.us/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.amat.us/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.amat.us/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>
<entry>
<title>UAPI: (Scripted) Convert #include "..." to #include &lt;path/...&gt; in drivers/gpu/</title>
<updated>2012-10-02T17:01:07Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-10-02T17:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=760285e7e7ab282c25b5e90816f7c47000557f4f'/>
<id>urn:sha1:760285e7e7ab282c25b5e90816f7c47000557f4f</id>
<content type='text'>
Convert #include "..." to #include &lt;path/...&gt; in drivers/gpu/.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Dave Airlie &lt;airlied@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Unify and fix idr error handling</title>
<updated>2012-04-24T08:50:20Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2012-03-15T17:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1ae126cdf1d1514da6e89a248232a7f7d315fe0'/>
<id>urn:sha1:f1ae126cdf1d1514da6e89a248232a7f7d315fe0</id>
<content type='text'>
The error handling code w.r.t. idr usage looks inconsistent.

In the case of drm_mode_object_get() and drm_ctxbitmap_next() the error
handling is also incomplete.

Unify the code to follow the same pattern always.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: make DRM_UNLOCKED ioctls with their own mutex</title>
<updated>2012-01-05T14:43:02Z</updated>
<author>
<name>Ilija Hadzic</name>
<email>ihadzic@research.bell-labs.com</email>
</author>
<published>2011-10-28T21:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09b4ea47d1041612b101c369969db123ac2c1511'/>
<id>urn:sha1:09b4ea47d1041612b101c369969db123ac2c1511</id>
<content type='text'>
drm_getclient, drm_getstats and drm_getmap (with a few minor
adjustments) do not need global mutex, so fix that and
make the said ioctls DRM_UNLOCKED. Details:

  drm_getclient: the only thing that should be protected here
  is dev-&gt;filelist and that is already protected everywhere with
  dev-&gt;struct_mutex.

  drm_getstats: there is no need for any mutex here because the
  loop runs through quasi-static (set at load time only)
  data, and the actual count access is done with atomic_read()

  drm_getmap already uses dev-&gt;struct_mutex to protect
  dev-&gt;maplist, which also used to protect the same structure
  everywhere else except at three places:
  * drm_getsarea, which doesn't grab *any* mutex before
    touching dev-&gt;maplist (so no drm_global_mutex doesn't help
    here either; different issue for a different patch).
    However, drivers seem to call it only at
    initialization time so it probably doesn't matter
  * drm_master_destroy, which is called from drm_master_put,
    which in turn is protected with dev-&gt;struct_mutex
    everywhere else in drm module, so we are good here too.
  * drm_getsareactx, which releases the dev-&gt;struct_mutex
    too early, but this patch includes the fix for that.

v2: * incorporate comments received from Daniel Vetter
    * include the (long) explanation above to make it clear what
      we are doing (and why), also at Daniel Vetter's request
    * tighten up mutex grab/release locations to only
      encompass real critical sections, rather than some
      random code around them

Signed-off-by: Ilija Hadzic &lt;ihadzic@research.bell-labs.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
</feed>
