<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/vkms, branch v5.5.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.5.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.5.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-10-10T13:45:35+00:00</updated>
<entry>
<title>drm/vkms: Remove duplicated include from vkms_drv.c</title>
<updated>2019-10-10T13:45:35+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-10-10T11:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76d6d3df524150fb8d5b5c1a3b877c2af42f67e5'/>
<id>urn:sha1:76d6d3df524150fb8d5b5c1a3b877c2af42f67e5</id>
<content type='text'>
Remove duplicated include.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191010115213.115706-1-yuehaibing@huawei.com
</content>
</entry>
<entry>
<title>drm/vkms: prime import support</title>
<updated>2019-10-08T22:44:47+00:00</updated>
<author>
<name>Oleg Vasilev</name>
<email>omrigann@gmail.com</email>
</author>
<published>2019-09-30T15:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94e2ec3f7fef86506293a448273b2b4ee21e6195'/>
<id>urn:sha1:94e2ec3f7fef86506293a448273b2b4ee21e6195</id>
<content type='text'>
Bring dmabuf sharing through implementing prime_import_sg_table callback.
This will help to validate userspace conformance in prime configurations
without using any actual hardware (e.g. in the cloud).

This enables kms_prime IGT testcase on vkms.

V3:
 - Rodrigo: remove redundant vkms_gem_create_private
V2:
 - Rodrigo: styleguide + return code check

Cc: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Simon Ser &lt;simon.ser@intel.com&gt;
Tested-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Signed-off-by: Oleg Vasilev &lt;oleg.vasilev@intel.com&gt;
Signed-off-by: Oleg Vasilev &lt;omrigann@gmail.com&gt;
Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190930155924.21845-1-oleg.vasilev@intel.com
</content>
</entry>
<entry>
<title>drm/vkms: Reduce critical section in vblank_simulate</title>
<updated>2019-09-03T15:16:53+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-07-19T15:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88ad7f3a56603234eaa0297a722a3b8a338f2441'/>
<id>urn:sha1:88ad7f3a56603234eaa0297a722a3b8a338f2441</id>
<content type='text'>
We can reduce the critical section in vkms_vblank_simulate under
output-&gt;lock quite a lot:

- hrtimer_forward_now just needs to be ordered correctly wrt
  drm_crtc_handle_vblank. We already access the hrtimer timestamp
  without locks. While auditing that I noticed that we don't correctly
  annotate the read there, so sprinkle a READ_ONCE to make sure the
  compiler doesn't do anything foolish.

- drm_crtc_handle_vblank must stay under the lock to avoid races with
  drm_crtc_arm_vblank_event.

- The access to vkms_ouptut-&gt;crc_state also must stay under the lock.

- next problem is making sure the output-&gt;state structure doesn't get
  freed too early. First we rely on a given hrtimer being serialized:
  If we call drm_crtc_handle_vblank, then we are guaranteed that the
  previous call to vkms_vblank_simulate has completed. The other side
  of the coin is that the atomic updates waits for the vblank to
  happen before it releases the old state. Both taken together means
  that by the time the atomic update releases the old state, the
  hrtimer won't access it anymore (it might be accessing the new state
  at the same time, but that's ok).

- state is invariant, except the few fields separate protected by
  state-&gt;crc_lock. So no need to hold the lock for that.

- finally the queue_work. We need to make sure there's no races with
  the flush_work, i.e. when we call flush_work we need to guarantee
  that the hrtimer can't requeue the work again. This is guaranteed by
  the same vblank/hrtimer ordering guarantees like the reasoning above
  why state won't be freed too early: flush_work on the old state is
  called after wait_for_flip_done in the atomic commit code.

Therefore we can also move everything after the output-&gt;crc_state out
of the critical section.

Motivated by suggestions from Rodrigo.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190719152314.7706-3-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/vkms: Use wait_for_flip_done</title>
<updated>2019-09-03T15:16:53+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-07-19T15:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4922fd18cc1ac919759140f16542ca49b957cc37'/>
<id>urn:sha1:4922fd18cc1ac919759140f16542ca49b957cc37</id>
<content type='text'>
It's the recommended version, wait_for_vblanks is a bit a hacky
interim thing that predates all the flip_done tracking. It's
unfortunately still the default ...

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190719152314.7706-2-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/vkms: drop use of drmP.h</title>
<updated>2019-07-15T16:11:30+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-06-30T06:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce672a1b21a8015c5a8de3a656d4c2edc22663b0'/>
<id>urn:sha1:ce672a1b21a8015c5a8de3a656d4c2edc22663b0</id>
<content type='text'>
Drop use of the deprecated drmP.h header.
Replace it with the necessary includes in the individual .c files.
The header files was self-contained, and extra includes were not added
there.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Acked-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-13-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm/vkms: Rename vkms_crc.c into vkms_composer.c</title>
<updated>2019-07-12T03:46:02+00:00</updated>
<author>
<name>Rodrigo Siqueira</name>
<email>rodrigosiqueiramelo@gmail.com</email>
</author>
<published>2019-06-26T01:37:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4e7e98e90ebd9a801d6a383e1edd10b09d155ba'/>
<id>urn:sha1:a4e7e98e90ebd9a801d6a383e1edd10b09d155ba</id>
<content type='text'>
As a preparation work for introducing writeback to vkms, this patch
renames the file vkms_crc.c into vkms_composer.c. Accordingly, it also
adjusts the functions and data structures to match the changes.

No functional change.

Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/dea62063077ebf5cc1dfce8876e56788d15367e6.1561491964.git.rodrigosiqueiramelo@gmail.com
</content>
</entry>
<entry>
<title>drm/vkms: Avoid assigning 0 for possible_crtc</title>
<updated>2019-07-12T03:45:49+00:00</updated>
<author>
<name>Rodrigo Siqueira</name>
<email>rodrigosiqueiramelo@gmail.com</email>
</author>
<published>2019-06-26T01:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9d85f731de06a35d2ae6cdcf7d0e037c98ef41a'/>
<id>urn:sha1:e9d85f731de06a35d2ae6cdcf7d0e037c98ef41a</id>
<content type='text'>
When vkms invoke drm_universal_plane_init(), it sets 0 for
possible_crtcs parameter which means that planes can't be attached to
any CRTC. It currently works due to some safeguard in the drm_crtc file;
however, it is possible to identify the problem by trying to append a
second connector. This patch fixes this issue by modifying
vkms_plane_init() to accept an index parameter which makes the code a
little bit more flexible and avoid set zero to possible_crtcs.

Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/d67849c62a8d8ace1a0af455998b588798a4c45f.1561491964.git.rodrigosiqueiramelo@gmail.com
</content>
</entry>
<entry>
<title>drm/vkms: No need for -&gt;pages_lock in crc work anymore</title>
<updated>2019-06-27T02:19:22+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-06T22:27:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5ff5344f4a44cf9f4606c5c2754d913f06aaae1'/>
<id>urn:sha1:e5ff5344f4a44cf9f4606c5c2754d913f06aaae1</id>
<content type='text'>
We're now guaranteed to no longer race against prepare_fb/cleanup_fb,
which means we can access -&gt;vaddr without having to hold a lock.

Before the previous patches it was fairly easy to observe the cursor
-&gt;vaddr being invalid, but that's now gone, so we can upgrade to a
full WARN_ON.

Cc: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Tested-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-11-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/vkms: totally reworked crc data tracking</title>
<updated>2019-06-27T02:15:35+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-06T22:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b1865873651daeffe412059c2c3c37021b9d92f'/>
<id>urn:sha1:8b1865873651daeffe412059c2c3c37021b9d92f</id>
<content type='text'>
The crc computation worker needs to be able to get at some data
structures and framebuffer mappings, while potentially more atomic
updates are going on. The solution thus far is to copy relevant bits
around, but that's very tedious.

Here's a new approach, which tries to be more clever, but relies on a
few not-so-obvious things:
- crtc_state is always updated when a plane_state changes. Therefore
  we can just stuff plane_state pointers into a crtc_state. That
  solves the problem of easily getting at the needed plane_states.
- with the flushing changes from previous patches the above also holds
  without races due to the next atomic update being a bit eager with
  cleaning up pending work - we always wait for all crc work items to
  complete before unmapping framebuffers.
- we also need to make sure that the hrtimer fires off the right
  worker. Keep a new distinct crc_state pointer, under the
  vkms_output-&gt;lock protection for this. Note that crtc-&gt;state is
  updated very early in the atomic commit, way before we arm the
  vblank event - the vblank event should always match the buffers we
  use to compute the crc. This also solves an issue in the hrtimer,
  where we've accessed drm_crtc-&gt;state without holding the right locks
  (we held none - oops).
- in the worker itself we can then just access the plane states we
  need, again solving a bunch of ordering and locking issues.
  Accessing plane-&gt;state requires locks, accessing the private
  vkms_crtc_state-&gt;active_planes pointer only requires that the memory
  doesn't get freed too early.

The idea behind vkms_crtc_state-&gt;active_planes is that this would
contain all visible planes, in z-order, as a first step towards a more
generic blending implementation.

Note that this patch also fixes races between prepare_fb/cleanup_fb
and the crc worker accessing -&gt;vaddr.

Cc: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Tested-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-10-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/vkms: No _irqsave within spin_lock_irq needed</title>
<updated>2019-06-27T02:14:24+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-06T22:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c305e13ecc5579874464842e969f69ae032f4e4'/>
<id>urn:sha1:1c305e13ecc5579874464842e969f69ae032f4e4</id>
<content type='text'>
irqs are already off.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Tested-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Signed-off-by: Rodrigo Siqueira &lt;rodrigosiqueiramelo@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-9-daniel.vetter@ffwll.ch
</content>
</entry>
</feed>
