<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_ioctl.c, branch v3.0.92</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.92</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.0.92'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2011-03-24T11:28:46+00:00</updated>
<entry>
<title>drm/vblank: update recently added vbl interface to be more future proof.</title>
<updated>2011-03-24T11:28:46+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2011-03-24T10:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=51eab416c9b4b3ed16553d405ec4a5f67daa34cf'/>
<id>urn:sha1:51eab416c9b4b3ed16553d405ec4a5f67daa34cf</id>
<content type='text'>
This makes the interface a bit cleaner by leaving a single gap in the
vblank bit space instead of creating two gaps.

Suggestions from Michel on mailing list/irc.

Reviewed-by: Michel Dänzer &lt;michel@daenzer.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/kernel: vblank wait on crtc &gt; 1</title>
<updated>2011-03-20T23:25:54+00:00</updated>
<author>
<name>Ilija Hadzic</name>
<email>ihadzic@research.bell-labs.com</email>
</author>
<published>2011-03-18T21:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19b01b5fbf0b78930b3b06ee6080539c17b5d1fd'/>
<id>urn:sha1:19b01b5fbf0b78930b3b06ee6080539c17b5d1fd</id>
<content type='text'>
Below is a patch against drm-next branch of 2.6.38-rc8+ kernel that adds
the capability to wait on vblank events for CRTCs that are greater than 1
and thus cannot be represented with primary/secondary flags in the legacy
interface. It was discussed on the dri-devel list in these two threads:

http://lists.freedesktop.org/archives/dri-devel/2011-March/009009.html
http://lists.freedesktop.org/archives/dri-devel/2011-March/009025.html

This patch extends the interface to drm_wait_vblank ioctl so that crtc&gt;1
can be represented. It also adds a new capability to drm_getcap ioctl so
that the user space can check whether the new interface to drm_wait_vblank
is supported (and fall back to the legacy interface if not)

Signed-off-by: Ilija Hadzic &lt;ihadzic@research.bell-labs.com&gt;
Reviewed-by: Mario Kleiner &lt;mario.kleiner at tuebingen.mpg.de&gt;
Acked-by: Mario Kleiner &lt;mario.kleiner at tuebingen.mpg.de&gt;
Reviewed-by: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Tested-by: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: add cap bit to denote if dumb ioctl is available or not.</title>
<updated>2011-03-04T05:56:22+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2011-03-04T04:50:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e73f88af66fcc50083fae4b7e1c39b469179a97a'/>
<id>urn:sha1:e73f88af66fcc50083fae4b7e1c39b469179a97a</id>
<content type='text'>
This allows libkms to make an easier decision.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/core: add ioctl to query device/driver capabilities</title>
<updated>2011-03-04T04:47:30+00:00</updated>
<author>
<name>Ben Skeggs</name>
<email>bskeggs@redhat.com</email>
</author>
<published>2011-02-21T01:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f35421e09c494c36079d7cf5724ae9f832431d7'/>
<id>urn:sha1:9f35421e09c494c36079d7cf5724ae9f832431d7</id>
<content type='text'>
We're coming to see a need to have a set of generic capability checks in
the core DRM, in addition to the driver-specific ioctls that already
exist.

This patch defines an ioctl to do as such, but does not yet define any
capabilities.

[airlied: drop the driver callback for now.]

Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: rework PCI/platform driver interface.</title>
<updated>2011-02-07T03:09:36+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@gmail.com</email>
</author>
<published>2010-12-14T17:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8410ea3b95d105a5be5db501656f44bbb91197c1'/>
<id>urn:sha1:8410ea3b95d105a5be5db501656f44bbb91197c1</id>
<content type='text'>
This abstracts the pci/platform interface out a step further,
we can go further but this is far enough for now to allow USB
to be plugged in.

The drivers now just call the init code directly for their
device type.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Fix support for PCI domains</title>
<updated>2010-08-09T22:20:20+00:00</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2010-08-06T03:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c17c2f892e23a3c70281a4e79bd7c2c226b1a561'/>
<id>urn:sha1:c17c2f892e23a3c70281a4e79bd7c2c226b1a561</id>
<content type='text'>
(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward
compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands
domains and the world is at peace. We thus pass proper domain numbers
instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with
ignoring domains in the later case (well, except on alpha of course)

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Cleanup after failing to create master-&gt;unique and dev-&gt;name</title>
<updated>2010-08-04T22:42:19+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2010-08-04T10:09:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fb688fdc1890f9e8e97597f690c145ab888aec0'/>
<id>urn:sha1:3fb688fdc1890f9e8e97597f690c145ab888aec0</id>
<content type='text'>
v2: Userspace (notably xf86-video-{intel,ati}) became confused when
drmSetInterfaceVersion() started returning -EBUSY as they used a second
call (the first done in drmOpen()) to check their master credentials.
Since userspace wants to be able to repeatedly call
drmSetInterfaceVersion() allow them to do so.

v3: Rebase to drm-core-next.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Add support for platform devices to register as DRM devices</title>
<updated>2010-06-01T00:07:39+00:00</updated>
<author>
<name>Jordan Crouse</name>
<email>jcrouse@codeaurora.org</email>
</author>
<published>2010-05-27T19:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dcdb167402cbdca1d021bdfa5f63995ee0a79317'/>
<id>urn:sha1:dcdb167402cbdca1d021bdfa5f63995ee0a79317</id>
<content type='text'>
Allow platform devices without PCI resources to be DRM devices.

[airlied: fixup warnings with dev pointers]

Signed-off-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Remove memory debugging infrastructure.</title>
<updated>2009-06-18T20:00:33+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2009-03-24T19:23:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a298b2acd771d8a5c0004d8f8e4156c65b11f6b'/>
<id>urn:sha1:9a298b2acd771d8a5c0004d8f8e4156c65b11f6b</id>
<content type='text'>
It hasn't been used in ages, and having the user tell your how much
memory is being freed at free time is a recipe for disaster even if it
was ever used.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
</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.radix-linux.su/kernel/linux.git/commit/?id=1147c9cdd0f60f09a98702a9f865176af18a989f'/>
<id>urn:sha1: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>
</entry>
</feed>
