<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/drm_debugfs_crc.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-02-05T12:22:44Z</updated>
<entry>
<title>drm/crc: Add support for polling on the data fd.</title>
<updated>2018-02-05T12:22:44Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2018-02-02T14:27:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4beb3b40ae7f994af01200323441df13f8f5b241'/>
<id>urn:sha1:4beb3b40ae7f994af01200323441df13f8f5b241</id>
<content type='text'>
This will make it possible for userspace to know whether reading
will block, without blocking on the fd. This makes it possible to
drain all queued CRC's in blocking mode, without having to reopen
the fd.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180202142743.68527-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
[mlankhorst: Use POLLIN|POLLRDNORM, based on Ville's suggestion]
</content>
</entry>
<entry>
<title>drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2.</title>
<updated>2017-09-13T07:50:52Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-09-12T13:37:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6f8bcc744aad50d719845e4ce06a7831e96e1109'/>
<id>urn:sha1:6f8bcc744aad50d719845e4ce06a7831e96e1109</id>
<content type='text'>
When we want to make drm_atomic_commit interruptible, there are a lot of
places that call the lock function, which we don't have control over.

Rather than trying to convert every single one, it's easier to toggle
interruptible waiting per acquire_ctx. If drm_modeset_acquire_init is
called with DRM_MODESET_ACQUIRE_INTERRUPTIBLE, then we will perform
interruptible waits in drm_modeset_lock and drm_modeset_backoff.

Changes since v1:
- Fix locking example in drm_modeset_lock.c to be compatible
  with interruptible waiting (xexaxo) and make it default.
  Uninterruptible waiting shouldn't happen except in corner cases,
  but the example will still apply if the flag is removed.
- Add drm_modeset_lock_single_interruptible() to documentation.
- Fix dead link to removed drm_modeset_lock_interruptible() in
  drm_modeset_lock().

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; #v1
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-2-maarten.lankhorst@linux.intel.com
Reviewed-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/crc: Only open CRC on atomic drivers when the CRTC is active.</title>
<updated>2017-07-17T14:34:51Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-07-06T13:03:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8038e09be5a3ac061118bd80c7a505829920b50f'/>
<id>urn:sha1:8038e09be5a3ac061118bd80c7a505829920b50f</id>
<content type='text'>
Commit e8fa5671183c ("drm: crc: Wait for a frame before returning
from open()") adds a wait for CRC frame, but with the CRTC off
this will never be generated. For atomic drivers we know if a CRTC
is active through crtc_state-&gt;active, so when inactive reject the
open with -EIO.

Just like with the previous patch changing debugfs opening semantics,
this patch has been tested against igt.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Fixes: e8fa5671183c ("drm: crc: Wait for a frame before returning from open()")
Testcase: debugfs_test.read_all_entries
Link: http://patchwork.freedesktop.org/patch/msgid/15f9d300-65d3-63aa-00e3-e83f5e4d5a7a@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/crc: Handle opening and closing crc better</title>
<updated>2017-07-17T14:32:43Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-06-21T11:00:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=eb42ea6d0b8ed9ca8e73cc24fa801f0d8ab28905'/>
<id>urn:sha1:eb42ea6d0b8ed9ca8e73cc24fa801f0d8ab28905</id>
<content type='text'>
When I was doing a grep . -r /sys/kernel/debug/dri/0 I noticed a WARN
appearing when I aborted the grep with ^C.

After investigating I've also noticed that the error handling was
lacking and there are race conditions involving multiple calls to
open/close simultaneously.

Fix this by setting the opened flag first and using crc-&gt;entries to
decide when crc can be collected.

Also call unset crc source before cleaning up, this way there is
no race with a future open().

This patch has been tested with all the tests in igt with CRC in their
name.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170621110007.11674-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
[mlankhorst: Add description that this patch has been tested with IGT,
based on tomeu's feedback]
</content>
</entry>
<entry>
<title>Revert "drm: Don't allow interruptions when opening debugfs/crc"</title>
<updated>2017-04-07T20:18:28Z</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2017-04-07T20:15:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c98cdff94a6a7877923dec1329c2b76d6247d076'/>
<id>urn:sha1:c98cdff94a6a7877923dec1329c2b76d6247d076</id>
<content type='text'>
This reverts

commit b8dfa821c27046ede9bf8eb14cc8109d379428e9
Author: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Date:   Fri Apr 7 12:17:12 2017 +0100
    drm: Don't allow interruptions when opening debugfs/crc

It reportedly breaks things, so let's revert now and try again later.

Fixes: b8dfa821c270 ("drm: Don't allow interruptions when opening debugfs/crc")
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Reported-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Acked-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm: Don't allow interruptions when opening debugfs/crc</title>
<updated>2017-04-07T16:42:23Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-04-07T11:17:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b8dfa821c27046ede9bf8eb14cc8109d379428e9'/>
<id>urn:sha1:b8dfa821c27046ede9bf8eb14cc8109d379428e9</id>
<content type='text'>
The code does not like to be interrupted when waiting for the first
vblank after opening a debugfs/crc channel, so don't.

[66285.716870] WARNING: CPU: 1 PID: 16615 at drivers/gpu/drm/drm_debugfs_crc.c:185 crtc_crc_open+0x1d0/0x1f0 [drm]
[66285.716877] Modules linked in: i915 intel_powerclamp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel cryptd intel_gtt i2c_algo_bit lpc_ich mfd_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers drm video button autofs4 sd_mod ahci libahci libata i2c_i801 scsi_mod i2c_designware_platform i2c_designware_core i2c_core
[66285.716929] CPU: 1 PID: 16615 Comm: kms_frontbuffer Not tainted 4.11.0-rc5+ #7
[66285.716935] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016
[66285.716941] Call Trace:
[66285.716955]  dump_stack+0x4d/0x6f
[66285.716966]  __warn+0xc1/0xe0
[66285.716975]  warn_slowpath_null+0x18/0x20
[66285.717004]  crtc_crc_open+0x1d0/0x1f0 [drm]
[66285.717014]  ? wake_atomic_t_function+0x50/0x50
[66285.717024]  full_proxy_open+0xf0/0x1b0
[66285.717032]  ? full_proxy_release+0x80/0x80
[66285.717042]  do_dentry_open.isra.17+0x14b/0x2d0
[66285.717051]  vfs_open+0x42/0x60
[66285.717064]  path_openat+0x5e7/0x13d0
[66285.717074]  ? refcount_dec_and_test+0x11/0x20
[66285.717081]  ? down_read+0xd/0x30
[66285.717087]  do_filp_open+0x85/0xf0
[66285.717093]  ? __vfs_write+0x23/0x120
[66285.717100]  ? __alloc_fd+0x3a/0x170
[66285.717107]  do_sys_open+0x11e/0x1f0
[66285.717113]  ? do_sys_open+0x11e/0x1f0
[66285.717119]  SyS_openat+0xf/0x20
[66285.717125]  entry_SYSCALL_64_fastpath+0x17/0x98
[66285.717131] RIP: 0033:0x7f5f2235146a
[66285.717135] RSP: 002b:00007ffd892e6bc0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[66285.717142] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5f2235146a
[66285.717147] RDX: 0000000000000000 RSI: 00007ffd892e6c40 RDI: 0000000000000006
[66285.717151] RBP: 00007ffd892e6b20 R08: 0000000000000000 R09: 000000000000000f
[66285.717156] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
[66285.717161] R13: 00007ffd892e6b10 R14: 0000000000000004 R15: 00000000007e61f4

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100610
Fixes: e8fa5671183c ("drm: crc: Wait for a frame before returning from open()")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170407111712.13962-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: document driver interface for CRC capturing</title>
<updated>2017-03-24T08:36:06Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T08:36:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=760f71e72eb5c64b12d85d4e6dc79d28a708e09e'/>
<id>urn:sha1:760f71e72eb5c64b12d85d4e6dc79d28a708e09e</id>
<content type='text'>
This was missed in Tomeu's patch. Also remove the kerneldoc for the
internal function, we don't document that in general.

While at it word-smith the docs slightly for more clarity.

Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: crc: Call wake_up_interruptible() each time there is a new CRC entry</title>
<updated>2017-01-06T14:23:19Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@linaro.org</email>
</author>
<published>2017-01-06T09:15:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9f547425fd9fbcb42b177ec7eec46bd4d7d4ae45'/>
<id>urn:sha1:9f547425fd9fbcb42b177ec7eec46bd4d7d4ae45</id>
<content type='text'>
Each time new data has being added in CRC list inform reader by calling
wake_up_interruptible().
This should avoid to do it in all drivers.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1483694104-25627-1-git-send-email-benjamin.gaignard@linaro.org
</content>
</entry>
<entry>
<title>drm: crc: Wait for a frame before returning from open()</title>
<updated>2017-01-05T08:53:12Z</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2017-01-02T12:59:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e8fa5671183c80342d520ad81d14fa79a9d4a680'/>
<id>urn:sha1:e8fa5671183c80342d520ad81d14fa79a9d4a680</id>
<content type='text'>
Don't return from the open() call on the crc/data file until the HW has
produced a first frame, as there's great variability in when the HW is
able to do that and userspace shouldn't have to guess when this specific
HW is ready to start giving frame CRCs.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170102125912.22305-3-tomeu.vizoso@collabora.com
</content>
</entry>
<entry>
<title>drm: Move locking into drm_debugfs_crtc_crc_add</title>
<updated>2017-01-05T08:53:06Z</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2017-01-02T12:59:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1aa81be3af121636824e40eec737706e62c9da0c'/>
<id>urn:sha1:1aa81be3af121636824e40eec737706e62c9da0c</id>
<content type='text'>
There's no reason any more for callers of this function to take the lock
themselves, so just move the lock to the function to avoid confusion and
bugs when more callers are contributed.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Robert Foss &lt;robert.foss@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170102125912.22305-2-tomeu.vizoso@collabora.com
</content>
</entry>
</feed>
