<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/gpu/drm/udl, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/udl?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/udl?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-10T19:45:53Z</updated>
<entry>
<title>drm/udl: Sync pending URBs at the end of suspend</title>
<updated>2022-09-10T19:45:53Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fa47573b04a35078953be5f81a78f22c96358817'/>
<id>urn:sha1:fa47573b04a35078953be5f81a78f22c96358817</id>
<content type='text'>
It's better to perform the sync at the very last of the suspend
instead of the pipe-disable function, so that we can catch all pending
URBs (if any).

While we're at it, drop the error code from udl_sync_pending_urb()
since we basically ignore it; instead, give a clear error message
indicating a problem.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-13-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Don't re-initialize stuff at retrying the URB list allocation</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2c2705bd09730dba6017b26897a2bcd3c5d21557'/>
<id>urn:sha1:2c2705bd09730dba6017b26897a2bcd3c5d21557</id>
<content type='text'>
udl_alloc_urb_list() retires the allocation if there is no enough room
left, and it reinitializes the stuff unnecessarily such as the linked
list head and the waitqueue, which could be harmful.  Those should be
outside the retry loop.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-12-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Fix inconsistent urbs.count value during udl_free_urb_list()</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c5c354a3a4728045e1342166394c615d75d45377'/>
<id>urn:sha1:c5c354a3a4728045e1342166394c615d75d45377</id>
<content type='text'>
In the current design, udl_get_urb() may be called asynchronously
during the driver freeing its URL list via udl_free_urb_list().
The problem is that the sync is determined by comparing the urbs.count
and urbs.available fields, while we clear urbs.count field only once
after udl_free_urb_list() finishes, i.e. during udl_free_urb_list(),
the state becomes inconsistent.

For fixing this inconsistency and also for hardening the locking
scheme, this patch does a slight refactoring of the code around
udl_get_urb() and udl_free_urb_list().  Now urbs.count is updated in
the same spinlock at extracting a URB from the list in
udl_free_url_list().

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-11-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Fix potential URB leaks</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=046f4f0af7fd1fad06793d863d288c6b2cd84e99'/>
<id>urn:sha1:046f4f0af7fd1fad06793d863d288c6b2cd84e99</id>
<content type='text'>
A couple of error handlings forgot to process the URB completion.
Those are both with WARN_ON() so should be visible, but we must fix
them in anyway.

Fixes: 7350b2a3fbc6 ("drm/udl: Replace BUG_ON() with WARN_ON()")
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-10-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Pass rectangle directly to udl_handle_damage()</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T12:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b13fa27a4b72caebe99bd483092479c3767453be'/>
<id>urn:sha1:b13fa27a4b72caebe99bd483092479c3767453be</id>
<content type='text'>
Just for some code simplification.

Suggested-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/87tu5iauw4.wl-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Drop unneeded alignment</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aeb76f97fcf5bf6c094c62ac5cc22a1949751236'/>
<id>urn:sha1:aeb76f97fcf5bf6c094c62ac5cc22a1949751236</id>
<content type='text'>
The alignment of damaged area was needed for the original udlfb driver
that tried to trim the superfluous copies between front and backend
buffers and handle data in long int.  It's not the case for udl DRM
driver, hence we can omit the whole unneeded alignment, as well as the
dead code.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-8-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Increase the default URB list size to 20</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2a07a5ddb135e4bd15bf6468b7d2daa4deeaf07d'/>
<id>urn:sha1:2a07a5ddb135e4bd15bf6468b7d2daa4deeaf07d</id>
<content type='text'>
It seems that the current size (4) for the URB list is too small on
some devices, and it resulted in the occasional stalls.  Increase the
default URB list size to 20 for working around it.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-7-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Suppress error print for -EPROTO at URB completion</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=53593515ec1a4a5afaaa88fd4522bc4c2d7f5d9b'/>
<id>urn:sha1:53593515ec1a4a5afaaa88fd4522bc4c2d7f5d9b</id>
<content type='text'>
The driver may receive -EPROTO at the URB completion when the device
gets disconnected, and it's a normal situation.  Suppress the error
print for that, too.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-6-tiwai@suse.de
</content>
</entry>
<entry>
<title>Revert "drm/udl: Kill pending URBs at suspend and disconnect"</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-08T09:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ed9605a66b62f27513aba1d95f7d470c4abda29f'/>
<id>urn:sha1:ed9605a66b62f27513aba1d95f7d470c4abda29f</id>
<content type='text'>
This reverts the recent fix commit
  e25d5954264d ("drm/udl: Kill pending URBs at suspend and disconnect")
as it turned out to lead to potential hangup at a disconnection, and
it doesn't help much for suspend/resume problem, either.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-5-tiwai@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Enable damage clipping</title>
<updated>2022-09-10T19:45:52Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-09-08T09:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0a80005d3c5fea0a21fa6553724c171495ece9b5'/>
<id>urn:sha1:0a80005d3c5fea0a21fa6553724c171495ece9b5</id>
<content type='text'>
Call drm_plane_enable_fb_damage_clips() and give userspace a chance
of minimizing the updated display area.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-4-tiwai@suse.de
</content>
</entry>
</feed>
