<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/drm/drmP.h, branch v2.6.29</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>drm/i915: Keep refs on the object over the lifetime of vmas for GTT mmap.</title>
<updated>2009-02-20T02:21:13+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2009-02-11T22:01:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab00b3e5210954cbaff9207db874a9f03197e3ba'/>
<id>ab00b3e5210954cbaff9207db874a9f03197e3ba</id>
<content type='text'>
This fixes potential fault at fault time if the object was unreferenced
while the mapping still existed.  Now, while the mmap_offset only lives
for the lifetime of the object, the object also stays alive while a vma
exists that needs it.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes potential fault at fault time if the object was unreferenced
while the mapping still existed.  Now, while the mmap_offset only lives
for the lifetime of the object, the object also stays alive while a vma
exists that needs it.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Rip out the racy, unused vblank signal code.</title>
<updated>2009-01-28T15:50:14+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2009-01-28T05:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30b23634084d95781f7611c0713cb551a0c0a152'/>
<id>30b23634084d95781f7611c0713cb551a0c0a152</id>
<content type='text'>
Schedule a vblank signal, kill the process, and we'll go walking over freed
memory.  Given that no open-source userland exists using this, nor have I
ever heard of a consumer, just let this code die.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Requested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Dave Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Schedule a vblank signal, kill the process, and we'll go walking over freed
memory.  Given that no open-source userland exists using this, nor have I
ever heard of a consumer, just let this code die.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Requested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Dave Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Add a debug node for vblank state.</title>
<updated>2008-12-29T07:47:27+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2008-12-20T01:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fede5c91c4a8a7701d205b2b84b9835ddc7d6f02'/>
<id>fede5c91c4a8a7701d205b2b84b9835ddc7d6f02</id>
<content type='text'>
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>DRM: add mode setting support</title>
<updated>2008-12-29T07:47:23+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2008-11-07T22:05:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f453ba0460742ad027ae0c4c7d61e62817b3e7ef'/>
<id>f453ba0460742ad027ae0c4c7d61e62817b3e7ef</id>
<content type='text'>
Add mode setting support to the DRM layer.

This is a fairly big chunk of work that allows DRM drivers to provide
full output control and configuration capabilities to userspace.  It was
motivated by several factors:
  - the fb layer's APIs aren't suited for anything but simple
    configurations
  - coordination between the fb layer, DRM layer, and various userspace
    drivers is poor to non-existent (radeonfb excepted)
  - user level mode setting drivers makes displaying panic &amp; oops
    messages more difficult
  - suspend/resume of graphics state is possible in many more
    configurations with kernel level support

This commit just adds the core DRM part of the mode setting APIs.
Driver specific commits using these new structure and APIs will follow.

Co-authors: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;, Jakob Bornecrantz &lt;jakob@tungstengraphics.com&gt;
Contributors: Alan Hourihane &lt;alanh@tungstengraphics.com&gt;, Maarten Maathuis &lt;madman2003@gmail.com&gt;

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add mode setting support to the DRM layer.

This is a fairly big chunk of work that allows DRM drivers to provide
full output control and configuration capabilities to userspace.  It was
motivated by several factors:
  - the fb layer's APIs aren't suited for anything but simple
    configurations
  - coordination between the fb layer, DRM layer, and various userspace
    drivers is poor to non-existent (radeonfb excepted)
  - user level mode setting drivers makes displaying panic &amp; oops
    messages more difficult
  - suspend/resume of graphics state is possible in many more
    configurations with kernel level support

This commit just adds the core DRM part of the mode setting APIs.
Driver specific commits using these new structure and APIs will follow.

Co-authors: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;, Jakob Bornecrantz &lt;jakob@tungstengraphics.com&gt;
Contributors: Alan Hourihane &lt;alanh@tungstengraphics.com&gt;, Maarten Maathuis &lt;madman2003@gmail.com&gt;

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: GEM mmap support</title>
<updated>2008-12-29T07:47:22+00:00</updated>
<author>
<name>Jesse Barnes</name>
<email>jbarnes@virtuousgeek.org</email>
</author>
<published>2008-11-05T18:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a2c0a97b784f837300f7b0869c82ab712c600952'/>
<id>a2c0a97b784f837300f7b0869c82ab712c600952</id>
<content type='text'>
Add core support for mapping of GEM objects.  Drivers should provide a
vm_operations_struct if they want to support page faulting of objects.
The code for handling GEM object offsets was taken from TTM, which was
written by Thomas Hellström.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add core support for mapping of GEM objects.  Drivers should provide a
vm_operations_struct if they want to support page faulting of objects.
The code for handling GEM object offsets was taken from TTM, which was
written by Thomas Hellström.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: fix leak of uninitialized data to userspace</title>
<updated>2008-12-29T07:47:22+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2008-12-02T03:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1147c9cdd0f60f09a98702a9f865176af18a989f'/>
<id>1147c9cdd0f60f09a98702a9f865176af18a989f</id>
<content type='text'>
...so drm_getunique() is trying to copy some uninitialized data to
userspace. The ECX register contains the number of words that are
left to copy -- so there are 5 * 4 = 20 bytes left. The offset of the
first uninitialized byte (counting from the start of the string) is
also 20 (i.e. 0xf65d2294&amp;((1 &lt;&lt; 5)-1) == 20). So somebody tried to
copy 40 bytes when the string was only 19 long.

In drm_set_busid() we have this code:

        dev-&gt;unique_len = 40;
        dev-&gt;unique = drm_alloc(dev-&gt;unique_len + 1, DRM_MEM_DRIVER);
      ...
        len = snprintf(dev-&gt;unique, dev-&gt;unique_len, pci:%04x:%02x:%02x.%d",

...so it seems that dev-&gt;unique is never updated to reflect the
actual length of the string. The remaining bytes (20 in this case)
are random uninitialized bytes that are copied into userspace.

This patch fixes the problem by setting dev-&gt;unique_len after the
snprintf().

airlied- I've had to fix this up to store the alloced size so
we have it for drm_free later.

Reported-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: Vegard Nossum &lt;vegardno@thuin.ifi.uio.no&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...so drm_getunique() is trying to copy some uninitialized data to
userspace. The ECX register contains the number of words that are
left to copy -- so there are 5 * 4 = 20 bytes left. The offset of the
first uninitialized byte (counting from the start of the string) is
also 20 (i.e. 0xf65d2294&amp;((1 &lt;&lt; 5)-1) == 20). So somebody tried to
copy 40 bytes when the string was only 19 long.

In drm_set_busid() we have this code:

        dev-&gt;unique_len = 40;
        dev-&gt;unique = drm_alloc(dev-&gt;unique_len + 1, DRM_MEM_DRIVER);
      ...
        len = snprintf(dev-&gt;unique, dev-&gt;unique_len, pci:%04x:%02x:%02x.%d",

...so it seems that dev-&gt;unique is never updated to reflect the
actual length of the string. The remaining bytes (20 in this case)
are random uninitialized bytes that are copied into userspace.

This patch fixes the problem by setting dev-&gt;unique_len after the
snprintf().

airlied- I've had to fix this up to store the alloced size so
we have it for drm_free later.

Reported-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: Vegard Nossum &lt;vegardno@thuin.ifi.uio.no&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: move to kref per-master structures.</title>
<updated>2008-12-29T07:47:22+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2008-11-28T04:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a'/>
<id>7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a</id>
<content type='text'>
This is step one towards having multiple masters sharing a drm
device in order to get fast-user-switching to work.

It splits out the information associated with the drm master
into a separate kref counted structure, and allocates this when
a master opens the device node. It also allows the current master
to abdicate (say while VT switched), and a new master to take over
the hardware.

It moves the Intel and radeon drivers to using the sarea from
within the new master structures.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is step one towards having multiple masters sharing a drm
device in order to get fast-user-switching to work.

It splits out the information associated with the drm master
into a separate kref counted structure, and allocates this when
a master opens the device node. It also allows the current master
to abdicate (say while VT switched), and a new master to take over
the hardware.

It moves the Intel and radeon drivers to using the sarea from
within the new master structures.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: cleanup exit path for module unload</title>
<updated>2008-12-29T07:47:21+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2008-11-28T03:43:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e7f7ab45ebcb54fd5f814ea15ea079e079662f67'/>
<id>e7f7ab45ebcb54fd5f814ea15ea079e079662f67</id>
<content type='text'>
The current sub-module unload exit path is a mess, it tries
to abuse the idr. Just keep a list of devices per driver struct
and free them in-order on rmmod.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current sub-module unload exit path is a mess, it tries
to abuse the idr. Just keep a list of devices per driver struct
and free them in-order on rmmod.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: move drm vblank initialization/cleanup to driver load/unload</title>
<updated>2008-11-24T23:49:03+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2008-11-18T17:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52440211dcdc52c0b757f8b34d122e11b12cdd50'/>
<id>52440211dcdc52c0b757f8b34d122e11b12cdd50</id>
<content type='text'>
drm vblank initialization keeps track of the changes in driver-supplied
frame counts across vt switch and mode setting, but only if you let it by
not tearing down the drm vblank structure.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drm vblank initialization keeps track of the changes in driver-supplied
frame counts across vt switch and mode setting, but only if you let it by
not tearing down the drm vblank structure.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Remove infrastructure for supporting i915's vblank swapping.</title>
<updated>2008-11-11T07:44:26+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2008-11-05T02:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d8e6bb7a20b6206e1fe44565efc383a941b81fa'/>
<id>5d8e6bb7a20b6206e1fe44565efc383a941b81fa</id>
<content type='text'>
It's not used in any other drivers, and doesn't look like it will be from
drm.git master.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not used in any other drivers, and doesn't look like it will be from
drm.git master.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@linux.ie&gt;
</pre>
</div>
</content>
</entry>
</feed>
