<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_file.c, branch v4.14.233</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.233</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.233'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-05-31T13:47:35+00:00</updated>
<entry>
<title>drm: Wake up next in drm_read() chain if we are forced to putback the event</title>
<updated>2019-05-31T13:47:35+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-08-04T08:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce16889c87c2e9b5eb4d79a7072190e4ca7364d0'/>
<id>urn:sha1:ce16889c87c2e9b5eb4d79a7072190e4ca7364d0</id>
<content type='text'>
[ Upstream commit 60b801999c48b6c1dd04e653a38e2e613664264e ]

After an event is sent, we try to copy it into the user buffer of the
first waiter in drm_read() and if the user buffer doesn't have enough
room we put it back onto the list. However, we didn't wake up any
subsequent waiter, so that event may sit on the list until either a new
vblank event is sent or a new waiter appears. Rare, but in the worst
case may lead to a stuck process.

Testcase: igt/drm_read/short-buffer-wakeup
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170804082328.17173-1-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: set FMODE_UNSIGNED_OFFSET for drm files</title>
<updated>2018-06-11T20:49:22+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=2abd4c3ed20df4609c28cefa4df36b3dad9dfed7'/>
<id>urn:sha1:2abd4c3ed20df4609c28cefa4df36b3dad9dfed7</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: Document device unplug infrastructure</title>
<updated>2017-08-11T08:48:03+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-02T11:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c07dcd61a0e57c6840c23d90cb1beddad7d682a1'/>
<id>urn:sha1:c07dcd61a0e57c6840c23d90cb1beddad7d682a1</id>
<content type='text'>
While at it, also ocd and give them a consistent drm_dev_ prefix, like
the other device instance functionality. Plus move the functions into
the right places.

Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170802115604.12734-3-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next</title>
<updated>2017-06-27T13:18:17+00:00</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2017-06-27T13:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b740e76936c14354a9c5676a3eed839ea8472c41'/>
<id>urn:sha1:b740e76936c14354a9c5676a3eed839ea8472c41</id>
<content type='text'>
Required for Daniel's drm_vblank_cleanup cleanup
</content>
</entry>
<entry>
<title>drm/doc: Improve ioctl/fops docs a bit more</title>
<updated>2017-06-20T08:41:29+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-05-31T09:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb2eaba6458ace16f7e3504de8788374cb42b43d'/>
<id>urn:sha1:bb2eaba6458ace16f7e3504de8788374cb42b43d</id>
<content type='text'>
I spotted a markup issue, plus adding the descriptions in drm_driver.
Plus a few more links while at it.

I'm still mildly unhappy with the split between fops and ioctls, but I
still think having the ioctls in the uapi chapter makes more sense. Oh
well ...

v2: Rebase.

v3: Move misplace hunk to the right patch.

Cc: Stefan Agner &lt;stefan@agner.ch&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170531092045.3950-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: introduce sync objects (v4)</title>
<updated>2017-06-14T02:10:22+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2017-04-04T03:26:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9083420bbacce27e43d418064d0d2dfb4b37aaa'/>
<id>urn:sha1:e9083420bbacce27e43d418064d0d2dfb4b37aaa</id>
<content type='text'>
Sync objects are new toplevel drm object, that contain a
pointer to a fence. This fence can be updated via command
submission ioctls via drivers.

There is also a generic wait obj API modelled on the vulkan
wait API (with code modelled on some amdgpu code).

These objects can be converted to an opaque fd that can be
passes between processes.

v2: rename reference/unreference to put/get (Chris)
fix leaked reference (David Zhou)
drop mutex in favour of cmpxchg (Chris)
v3: cleanups from danvet, rebase on drm_fops rename
check fd_flags is 0 in ioctls.
v4: export find/free, change replace fence to take a
syncobj. In order to support lookup first, replace
later semantics which seem in the end to be cleaner.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-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: Nerf the preclose callback for modern drivers</title>
<updated>2017-05-09T11:22:11+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-05-08T08:26:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=45c3d213a400c952ab7119f394c5293bb6877e6b'/>
<id>urn:sha1:45c3d213a400c952ab7119f394c5293bb6877e6b</id>
<content type='text'>
With all drivers converted there's only legacy dri1 drivers using it.
Not going to touch those, instead just hide it like we've done with
other dri1 driver hooks like firstopen.

In all this I didn't find any real reason why we'd needed 2 hooks, and
having symmetry between open and close just appeases my OCD better.
Yeah, someone else could do an s/postclose/close/, but that's for
someone who understands cocci. And maybe after this series is reviewed
and landed, to avoid patch-regen churn.

v2: s/last/post/close in the kernel-doc (Sean).

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170508082633.4214-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/gem: Add DEFINE_DRM_GEM_FOPS</title>
<updated>2017-03-14T13:38:34+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-08T14:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f42e181935d5e5670c87d31ae48063a495bbacae'/>
<id>urn:sha1:f42e181935d5e5670c87d31ae48063a495bbacae</id>
<content type='text'>
Sadly there's only 1 driver which can use it, everyone else is special
for some reason:

- gma500 has a horrible runtime PM ioctl wrapper that probably doesn't
  really work but meh.
- i915 needs special compat_ioctl handler because regrets.
- arcgpu needs to fixup the pgprot because (no idea why it can't do
  that in the fault handler like everyone else).
- tegra does even worse stuff with pgprot
- udl does something with vm_flags too ...
- cma helpers, etnaviv, mtk, msm, rockchip, omap all implement some
  variation on prefaulting.
- exynos is exynos, I got lost in the midlayers.
- vc4 has to reinvent half of cma helpers because those are too much
  midlayer, plus vm_flags dances.
- vgem also seems unhappy with the default vm_flags.

So pretty sad divergence and I'm sure we could do better, but not
really an idea. Oh well, maybe this macro here helps to encourage more
consistency at least going forward.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-25-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers</title>
<updated>2017-03-14T13:38:34+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-08T14:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d55f7e5d54c31c8ed61fdbfc59835cd6804ba954'/>
<id>urn:sha1:d55f7e5d54c31c8ed61fdbfc59835cd6804ba954</id>
<content type='text'>
Less code ftw.

This converts all drivers except the tinydrm helper module. That one
needs more work, since it gets the THIS_MODULE reference from
tinydrm.ko instead of the actual driver module like it should.
Probably needs a similar trick like I used here with generating the
entire struct with a macro.

Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-24-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/doc: Document drm_file.[hc]</title>
<updated>2017-03-14T13:38:33+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-08T14:12:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b93658f83fa7f89cde5cfba7158da2be8cac42b2'/>
<id>urn:sha1:b93658f83fa7f89cde5cfba7158da2be8cac42b2</id>
<content type='text'>
Well, mostly drm_file.h, and clean up all related things:

- I didnt' figure out the difference between preclose and postclose.
  The existing explanation in drm-internals.rst didn't convince me,
  since it's also really outdated - we clean up pending DRM events in
  the core nowadays. I put a FIXME in for the future.

- Another FIXME is to have a macro for default fops.

- Lots of links all around, main areas are to tie the overview in
  drm_file.c more into the callbacks in struct drm_device, and the
  other is to link render/primary node code to the right sections in
  drm-uapi.rst.

- Also moved the open/close stuff to drm_drv.h from drm-internals.rst,
  seems like the better place for that information. Since that section
  was rather outdated this amounted to full-on rewrite.

A big missing piece here is some overview graph, but I think better to
wait with that one until drm_device and drm_driver are also fully
documented.

v2: Nits from Sean.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-12-daniel.vetter@ffwll.ch
</content>
</entry>
</feed>
