<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_debugfs_crc.c, branch v4.20.17</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.20.17</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.20.17'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-08-22T16:50:16+00:00</updated>
<entry>
<title>Revert "drm: crc: Wait for a frame before returning from open()"</title>
<updated>2018-08-22T16:50:16+00:00</updated>
<author>
<name>Mahesh Kumar</name>
<email>mahesh1.kumar@intel.com</email>
</author>
<published>2018-08-21T08:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad1a56f1bf2bd2394f98320baf9ad430f7b1534c'/>
<id>urn:sha1:ad1a56f1bf2bd2394f98320baf9ad430f7b1534c</id>
<content type='text'>
This reverts commit e8fa5671183c80342d520ad81d14fa79a9d4a680.

Don't wait for first CRC during crtc_crc_open. It avoids one frame wait
during open. If application want to wait after read call, it can use
poll/read blocking read() call.

Suggested-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Mahesh Kumar &lt;mahesh1.kumar@intel.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-4-mahesh1.kumar@intel.com
</content>
</entry>
<entry>
<title>drm/crc: Cleanup crtc_crc_open function</title>
<updated>2018-08-22T16:47:58+00:00</updated>
<author>
<name>Mahesh Kumar</name>
<email>mahesh1.kumar@intel.com</email>
</author>
<published>2018-08-21T08:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c0811a7d5befe34a17772760100e26b09a561c0e'/>
<id>urn:sha1:c0811a7d5befe34a17772760100e26b09a561c0e</id>
<content type='text'>
This patch make changes to allocate crc-entries buffer before
enabling CRC generation.
It moves all the failure check early in the function before setting
the source or memory allocation.
Now set_crc_source takes only two variable inputs, values_cnt we
already gets as part of verify_crc_source.

Changes since V1:
 - refactor code to use single spin lock
Changes since V2:
 - rebase
Changes since V3:
 - rebase on top of VKMS driver

Signed-off-by: Mahesh Kumar &lt;mahesh1.kumar@intel.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Acked-by: Leo Li &lt;sunpeng.li@amd.com&gt; (V2)
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt; (V3)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-3-mahesh1.kumar@intel.com
</content>
</entry>
<entry>
<title>drm: crc: Introduce get_crc_sources callback</title>
<updated>2018-08-13T12:00:20+00:00</updated>
<author>
<name>Mahesh Kumar</name>
<email>mahesh1.kumar@intel.com</email>
</author>
<published>2018-07-13T13:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4396551e9cf3e7233d45a2ce92f73e085bcad4b2'/>
<id>urn:sha1:4396551e9cf3e7233d45a2ce92f73e085bcad4b2</id>
<content type='text'>
This patch introduce a callback function "get_crc_sources" which
will be called during read of control node. It is an optional
callback function and if driver implements this callback, driver
should return a constant pointer to an array of crc sources list
and update count according to the number of source in the list.

Changes Since V1: (Daniel)
 - return const pointer to an array of crc sources list
 - do validation of sources in CRC-core
Changes Since V2:
 - update commit message
 - update callback documentation
 - print one source name per line

Signed-off-by: Mahesh Kumar &lt;mahesh1.kumar@intel.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-3-mahesh1.kumar@intel.com
</content>
</entry>
<entry>
<title>drm: crc: Introduce verify_crc_source callback</title>
<updated>2018-08-13T12:00:20+00:00</updated>
<author>
<name>Mahesh Kumar</name>
<email>mahesh1.kumar@intel.com</email>
</author>
<published>2018-07-13T13:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5cc15a0c66e207d5a7f1b92f32899cc8f380468'/>
<id>urn:sha1:d5cc15a0c66e207d5a7f1b92f32899cc8f380468</id>
<content type='text'>
This patch adds a new callback function "verify_crc_source" which will
be used during setting the crc source in control node. This will help
in avoiding setting of wrong string for source.

Changes since V1:
 - do not yet verify_crc_source during open.
Changes since V1:
 - improve callback description

Signed-off-by: Mahesh Kumar &lt;mahesh1.kumar@intel.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180713135942.25061-2-mahesh1.kumar@intel.com
</content>
</entry>
<entry>
<title>drm/crc: Only report a single overflow when a CRC fd is opened</title>
<updated>2018-07-06T12:57:03+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2018-04-18T12:51:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a012024571d98e2e4bf29a9168fb7ddc44b7ab86'/>
<id>urn:sha1:a012024571d98e2e4bf29a9168fb7ddc44b7ab86</id>
<content type='text'>
This reduces the amount of spam when you debug a CRC reading
program.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
[mlankhorst: Change bool overflow to was_overflow (Ville)]
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180418125121.72081-1-maarten.lankhorst@linux.intel.com
</content>
</entry>
<entry>
<title>drm/crc: Add support for polling on the data fd.</title>
<updated>2018-02-05T12:22:44+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2018-02-02T14:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:52+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-09-12T13:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:51+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-07-06T13:03:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:43+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-06-21T11:00:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:28+00:00</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2017-04-07T20:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>
</feed>
