<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/udl, branch v5.10.45</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.45</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.45'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-03-17T16:06:19+00:00</updated>
<entry>
<title>drm: Use USB controller's DMA mask when importing dmabufs</title>
<updated>2021-03-17T16:06:19+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-03-03T13:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=915f2f8cadbd3017c0f0ea025790012e6b598743'/>
<id>urn:sha1:915f2f8cadbd3017c0f0ea025790012e6b598743</id>
<content type='text'>
commit 659ab7a49cbebe0deffcbe1f9560e82006b21817 upstream.

USB devices cannot perform DMA and hence have no dma_mask set in their
device structure. Therefore importing dmabuf into a USB-based driver
fails, which breaks joining and mirroring of display in X11.

For USB devices, pick the associated USB controller as attachment device.
This allows the DRM import helpers to perform the DMA setup. If the DMA
controller does not support DMA transfers, we're out of luck and cannot
import. Our current USB-based DRM drivers don't use DMA, so the actual
DMA device is not important.

Tested by joining/mirroring displays of udl and radeon under Gnome/X11.

v8:
	* release dmadev if device initialization fails (Noralf)
	* fix commit description (Noralf)
v7:
	* fix use-before-init bug in gm12u320 (Dan)
v6:
	* implement workaround in DRM drivers and hold reference to
	  DMA device while USB device is in use
	* remove dev_is_usb() (Greg)
	* collapse USB helper into usb_intf_get_dma_device() (Alan)
	* integrate Daniel's TODO statement (Daniel)
	* fix typos (Greg)
v5:
	* provide a helper for USB interfaces (Alan)
	* add FIXME item to documentation and TODO list (Daniel)
v4:
	* implement workaround with USB helper functions (Greg)
	* use struct usb_device-&gt;bus-&gt;sysdev as DMA device (Takashi)
v3:
	* drop gem_create_object
	* use DMA mask of USB controller, if any (Daniel, Christian, Noralf)
v2:
	* move fix to importer side (Christian, Daniel)
	* update SHMEM and CMA helpers for new PRIME callbacks

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 6eb0233ec2d0 ("usb: don't inherity DMA properties for USB devices")
Tested-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.10+
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210303133229.3288-1-tzimmermann@suse.de
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/udl: Fix missing error code in udl_handle_damage()</title>
<updated>2020-12-30T10:53:09+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-11-13T10:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4e1f57c6afb6b41e80f677ad1defc0bdf138ae5'/>
<id>urn:sha1:e4e1f57c6afb6b41e80f677ad1defc0bdf138ae5</id>
<content type='text'>
[ Upstream commit a7319c8f50c5e93a12997e2d0821a2f7946fb734 ]

If udl_get_urb() fails then this should return a negative error code
but currently it returns success.

Fixes: 798ce3fe1c3a ("drm/udl: Begin/end access to imported buffers in damage-handler")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201113101502.GD168908@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/udl: Use GEM vmap/mmap function from SHMEM helpers</title>
<updated>2020-06-10T08:17:21+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2020-06-09T09:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99f55c798fcd838915c84fba868d9f7b996a5fbc'/>
<id>urn:sha1:99f55c798fcd838915c84fba868d9f7b996a5fbc</id>
<content type='text'>
The udl driver contains an implementation of GEM vmap and mmap
operations that is identical to the common SHMEM helper; except
that udl's code uses cached pages by default.

Convert udl to regular SHMEM helper functions. There's no reason
to have udl behave differently from all other SHMEM drivers. The
udl driver uses the SHMEM helper to enable caching.

v3:
	* rebased onto Daniel's shmem untangle series
v2:
	* implement .gem_create_object with SHMEM helper

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200609090820.20256-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Don't call get/put_pages on imported dma-buf</title>
<updated>2020-06-03T12:48:27+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-05-11T09:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a5a5971bc1fe34a9a24b59118db0b3a1f9c2902'/>
<id>urn:sha1:3a5a5971bc1fe34a9a24b59118db0b3a1f9c2902</id>
<content type='text'>
There's no direct harm, because for the shmem helpers these are noops
on imported buffers. The trouble is in the locks these take - I want
to change dma_buf_vmap locking, and so need to make sure that we only
ever take certain locks on one side of the dma-buf interface: Either
for exporters, or for importers.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-6-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/udl: Make udl_handle_damage static</title>
<updated>2020-05-06T19:08:37+00:00</updated>
<author>
<name>Zou Wei</name>
<email>zou_wei@huawei.com</email>
</author>
<published>2020-04-30T12:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b173bfe2d744e74610c87d4f6ebade7b6ebd9845'/>
<id>urn:sha1:b173bfe2d744e74610c87d4f6ebade7b6ebd9845</id>
<content type='text'>
Fix the following sparse warning:

drivers/gpu/drm/udl/udl_modeset.c:269:5: warning: symbol 'udl_handle_damage'
was not declared. Should it be static?

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zou Wei &lt;zou_wei@huawei.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1588248797-70568-1-git-send-email-zou_wei@huawei.com
</content>
</entry>
<entry>
<title>drm/udl: don't set drm_device-&gt;dev_private</title>
<updated>2020-04-28T13:18:27+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ae355a260d25d2bd465f89d1668300aaa9fec4c'/>
<id>urn:sha1:6ae355a260d25d2bd465f89d1668300aaa9fec4c</id>
<content type='text'>
We're mostly there already, just a handful of places that didn't use
the to_udl container_of cast. To make sure no new appear, don't set
-&gt;dev_private.

Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: "José Roberto de Souza" &lt;jose.souza@intel.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Allison Randal &lt;allison@lohutok.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-13-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/udl: Use devm_drm_dev_alloc</title>
<updated>2020-04-28T13:16:43+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=50b9bbecaa5bdb78aaa51a39a01242016ed96314'/>
<id>urn:sha1:50b9bbecaa5bdb78aaa51a39a01242016ed96314</id>
<content type='text'>
With Thomas' patch to clean up fbdev init this is a rather standard
conversion to the new wrapper macro.

v2: Rebase on top of Thomas' patches to remove the return value from
drm_fbdev_generic_setup()

v3: Update commit message to reflect the reality of the rebased patch
(Sam)

Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-12-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/udl: Remove error check from fbdev setup</title>
<updated>2020-04-08T14:24:59+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2020-04-08T08:26:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66459fa21dfe79ae95c1d685b21a214142046d96'/>
<id>urn:sha1:66459fa21dfe79ae95c1d685b21a214142046d96</id>
<content type='text'>
Remove the error check from the fbdev setup function. The driver's
probe function should not depend on a DRM client's state.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-9-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: drop drm_driver.release hook</title>
<updated>2020-03-26T15:09:40+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-03-23T14:49:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1a981bd55767123d3c34626c41d18d3c7cd7c14'/>
<id>urn:sha1:b1a981bd55767123d3c34626c41d18d3c7cd7c14</id>
<content type='text'>
There's only two functions called from that:
drm_kms_helper_poll_fini() and udl_free_urb_list(). Both of these are
also called from the ubs_driver-&gt;disconnect hook, so entirely
pointless to do the same again in the -&gt;release hook.

Furthermore by the time we clean up the drm_driver we really shouldn't
be touching hardware anymore, so stopping the poll worker and freeing
the urb allocations in -&gt;disconnect is the right thing to do.

Now disconnect still cleans things up before unregistering the driver,
but that's a different issue.

v2: Use _fini, not _disable in unplug, motivated by discussions with
Thomas. _disable/_enable are for suspend/resume.

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: "Noralf Trønnes" &lt;noralf@tronnes.org&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-51-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/udl: Drop explicit drm_mode_config_cleanup call</title>
<updated>2020-03-26T15:09:25+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-03-23T14:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe5b7c86d6068ac33df2d46cf3c7a1859c3b84a8'/>
<id>urn:sha1:fe5b7c86d6068ac33df2d46cf3c7a1859c3b84a8</id>
<content type='text'>
It's right above the drm_dev_put().

This allows us to delete a bit of onion unwinding in
udl_modeset_init().

This is made possible by a preceeding patch which added a drmm_
cleanup action to drm_mode_config_init(), hence all we need to do to
ensure that drm_mode_config_cleanup() is run on final drm_device
cleanup is check the new error code for _init().

v2: Explain why this cleanup is possible (Laurent).

v3: Use drmm_mode_config_init() for more clarity (Sam, Thomas)

Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: "Noralf Trønnes" &lt;noralf@tronnes.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-50-daniel.vetter@ffwll.ch
</content>
</entry>
</feed>
