<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_fops.c, branch v4.4.171</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-06-13T14:15:27+00:00</updated>
<entry>
<title>drm: set FMODE_UNSIGNED_OFFSET for drm files</title>
<updated>2018-06-13T14:15:27+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2018-05-15T03:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12958d0ffa66d84ae899156383b01ba9dfcff595'/>
<id>urn:sha1:12958d0ffa66d84ae899156383b01ba9dfcff595</id>
<content type='text'>
commit 76ef6b28ea4f81c3d511866a9b31392caa833126 upstream.

Since we have the ttm and gem vma managers using a subset
of the file address space for objects, and these start at
0x100000000 they will overflow the new mmap checks.

I've checked all the mmap routines I could see for any
bad behaviour but overall most people use GEM/TTM VMA
managers even the legacy drivers have a hashtable.

Reported-and-Tested-by: Arthur Marsh (amarsh04 on #radeon)
Fixes: be83bbf8068 (mmap: introduce sane default mmap limits)
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: Fix an unwanted master inheritance v2</title>
<updated>2015-12-04T02:28:14+00:00</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2015-12-02T17:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0af2e538c80f3e47f1d6ddf120a153ad909e8ad'/>
<id>urn:sha1:a0af2e538c80f3e47f1d6ddf120a153ad909e8ad</id>
<content type='text'>
A client calling drmSetMaster() using a file descriptor that was opened
when another client was master would inherit the latter client's master
object and all its authenticated clients.

This is unwanted behaviour, and when this happens, instead allocate a
brand new master object for the client calling drmSetMaster().

Fixes a BUG() throw in vmw_master_set().

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/mode: Add user blob-creation ioctl</title>
<updated>2015-05-22T14:18:28+00:00</updated>
<author>
<name>Daniel Stone</name>
<email>daniels@collabora.com</email>
</author>
<published>2015-05-22T12:34:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2f5d2ea479b9b2619965d43db70939589afe43a'/>
<id>urn:sha1:e2f5d2ea479b9b2619965d43db70939589afe43a</id>
<content type='text'>
Add an ioctl which allows users to create blob properties from supplied
data. Currently this only supports modes, creating a drm_display_mode from
the userspace drm_mode_modeinfo.

v2: Removed size/type checks.
    Rebased on new patches to allow error propagation from create_blob,
    as well as avoiding double-allocation.

Signed-off-by: Daniel Stone &lt;daniels@collabora.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@intel.com&gt;
Tested-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: simplify authentication management</title>
<updated>2015-05-05T07:45:57+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2015-05-04T19:01:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32e7b94a3fa8e137aab9f2c65dff86be73245fc8'/>
<id>urn:sha1:32e7b94a3fa8e137aab9f2c65dff86be73245fc8</id>
<content type='text'>
The magic auth tokens we have are a simple map from cyclic IDs to drm_file
objects. Remove all the old bulk of code and replace it with a simple,
direct IDR.

The previous behavior is kept. Especially calling authmagic multiple times
on the same magic results in EINVAL except on the first call. The only
difference in behavior is that we never allocate IDs multiple times as
long as a client has its FD open.

v2:
 - Fix return code of GetMagic()
 - Use non-cyclic IDR allocator
 - fix off-by-one in "magic &gt; INT_MAX" sanity check

v3:
 - drop redundant "magic &gt; INT_MAX" check

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Make drm_read() more robust against multithreaded races</title>
<updated>2015-01-21T13:57:03+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-12-04T21:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdd1cf799bd24ac0a4184549601ae302267301c5'/>
<id>urn:sha1:cdd1cf799bd24ac0a4184549601ae302267301c5</id>
<content type='text'>
The current implementation of drm_read() faces a number of issues:

1. Upon an error, it consumes the event which may lead to the client
blocking.
2. Upon an error, it forgets about events already copied
3. If it fails to copy a single event with O_NONBLOCK it falls into a
infinite loop of reporting EAGAIN.
3. There is a race between multiple waiters and blocking reads of the
events list.

Here, we inline drm_dequeue_event() into drm_read() so that we can take
the spinlock around the list walking and event copying, and importantly
reorder the error handling to avoid the issues above.

Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Testcase: igt/drm_read
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Fix memory leak at error path of drm_read()</title>
<updated>2014-12-04T12:28:42+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-12-04T10:56:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0a0bde32a4668656cdffac677032a101c170c6b'/>
<id>urn:sha1:a0a0bde32a4668656cdffac677032a101c170c6b</id>
<content type='text'>
Note that the read manpages explicitly states that the read position
is undefined on error. Since EFAULT is just a userspace bug we are
therefore fine with just dropping the event on the floor.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
[danvet: Add note that just dropping the event is ok.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Implement O_NONBLOCK support on /dev/dri/cardN</title>
<updated>2014-10-08T13:07:07+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-10-07T13:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd008e5b2953186fc0c6633a885ade95e7043800'/>
<id>urn:sha1:bd008e5b2953186fc0c6633a885ade95e7043800</id>
<content type='text'>
The implmentation is simple in the extreme: we only want to wait for
events if the device was opened in blocking mode, otherwise we grab what
is available and report an error if there was none.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Testcase: igt/kms_flip/nonblocing_read
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/core: use helper to check driver features</title>
<updated>2014-10-03T08:38:56+00:00</updated>
<author>
<name>Andrzej Hajda</name>
<email>a.hajda@samsung.com</email>
</author>
<published>2014-09-30T14:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bcecfacde6269dc6cee9a098bc454222d441ff9'/>
<id>urn:sha1:1bcecfacde6269dc6cee9a098bc454222d441ff9</id>
<content type='text'>
The patch replaces direct access to driver_features field
by calls to helper function.

Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: unexport drm_global_mutex</title>
<updated>2014-09-12T09:19:47+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-10T10:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=44af3f5c6a2dc0358121b5ecf272361b3290649e'/>
<id>urn:sha1:44af3f5c6a2dc0358121b5ecf272361b3290649e</id>
<content type='text'>
Drivers really, really have no business even looking at this lock. And
thankfully they don't.

So unexport it and move the declaration to drm_internal.h.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Move piles of functions from drmP.h to drm_internal.h</title>
<updated>2014-09-12T09:16:29+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2014-09-10T10:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67d0ec4e885cd2af861a14bb9bd59fd23e9644ae'/>
<id>urn:sha1:67d0ec4e885cd2af861a14bb9bd59fd23e9644ae</id>
<content type='text'>
This way drivers can't grow crazy ideas any more, and it also
helps a bit in reviewing EXPORT_SYMBOLS.

v2: Even more stuff. Unfortunately we can't move drm_vm_open_locked
because exynos does some horrible stuff with it.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
