<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/xlnx, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-04-10T12:30:56+00:00</updated>
<entry>
<title>drm: xlnx: zynqmp: Fix max dma segment size</title>
<updated>2025-04-10T12:30:56+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2025-01-15T09:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c42f15cc3493c69cf50073b08fe47e64cde731e'/>
<id>urn:sha1:3c42f15cc3493c69cf50073b08fe47e64cde731e</id>
<content type='text'>
[ Upstream commit 28b529a98525123acd37372a04d21e87ec2edcf7 ]

Fix "mapping sg segment longer than device claims to support" warning by
setting the max segment size.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Reviewed-by: Sean Anderson &lt;sean.anderson@linux.dev&gt;
Tested-by: Sean Anderson &lt;sean.anderson@linux.dev&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250115-xilinx-formats-v2-10-160327ca652a@ideasonboard.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask</title>
<updated>2023-09-19T10:20:13+00:00</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2023-06-07T02:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a21e73a6d8e0fc5842303e2672286608eebf25be'/>
<id>urn:sha1:a21e73a6d8e0fc5842303e2672286608eebf25be</id>
<content type='text'>
[ Upstream commit 1832fba7f9780aff67c96ad30f397c2d76141833 ]

Add check for dma_set_mask() and return the error if it fails.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers</title>
<updated>2021-09-18T11:40:27+00:00</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2021-03-23T02:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f0f1de02b9b1c793cff929b55c42b9fda7680b1'/>
<id>urn:sha1:0f0f1de02b9b1c793cff929b55c42b9fda7680b1</id>
<content type='text'>
[ Upstream commit a338619bd76011035d462f0f9e8b2f24d7fe5a1e ]

When insmod zynqmp-dpsub.ko after rmmod it, system will hang with the
error log as below:

root@xilinx-zynqmp:~# insmod zynqmp-dpsub.ko
[   88.391289] [drm] Initialized zynqmp-dpsub 1.0.0 20130509 for fd4a0000.display on minor 0
[   88.529906] Console: switching to colour frame buffer device 128x48
[   88.549402] zynqmp-dpsub fd4a0000.display: [drm] fb0: zynqmp-dpsubdrm frame buffer device
[   88.571624] zynqmp-dpsub fd4a0000.display: ZynqMP DisplayPort Subsystem driver probed
root@xilinx-zynqmp:~# rmmod zynqmp_dpsub
[   94.023404] Console: switching to colour dummy device 80x25
root@xilinx-zynqmp:~# insmod zynqmp-dpsub.ko
	&lt;hang here&gt;

This is because that in zynqmp_dp_probe it tries to access some DP
registers while the DP controller is still in the reset state. When
running "rmmod zynqmp_dpsub", zynqmp_dp_reset(dp, true) in
zynqmp_dp_phy_exit is called to force the DP controller into the reset
state. Then insmod will call zynqmp_dp_probe to program the DP registers,
but at this moment the DP controller hasn't been brought out of the reset
state yet since the function zynqmp_dp_reset(dp, false) is called later and
this will result the system hang.

Releasing the reset to DP controller before any read/write operation to it
will fix this issue. And for symmetry, move zynqmp_dp_reset() call from
zynqmp_dp_phy_exit() to zynqmp_dp_remove().

Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock</title>
<updated>2021-09-18T11:40:26+00:00</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2021-03-10T04:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f76f78f9f479ebfdd94ec8c868b39aba7ca4fb0f'/>
<id>urn:sha1:f76f78f9f479ebfdd94ec8c868b39aba7ca4fb0f</id>
<content type='text'>
[ Upstream commit a19effb6dbe5bd1be77a6d68eba04dba8993ffeb ]

The Runtime PM subsystem will force the device "fd4a0000.zynqmp-display"
to enter suspend state while booting if the following conditions are met:
- the usage counter is zero (pm_runtime_get_sync hasn't been called yet)
- no 'active' children (no zynqmp-dp-snd-xx node under dpsub node)
- no other device in the same power domain (dpdma node has no
		"power-domains = &lt;&amp;zynqmp_firmware PD_DP&gt;" property)

So there is a scenario as below:
1) DP device enters suspend state   &lt;- call zynqmp_gpd_power_off
2) zynqmp_disp_crtc_setup_clock	    &lt;- configurate register VPLL_FRAC_CFG
3) pm_runtime_get_sync		    &lt;- call zynqmp_gpd_power_on and clear previous
				       VPLL_FRAC_CFG configuration
4) clk_prepare_enable(disp-&gt;pclk)   &lt;- enable failed since VPLL_FRAC_CFG
				       configuration is corrupted

From above, we can see that pm_runtime_get_sync may clear register
VPLL_FRAC_CFG configuration and result the failure of clk enabling.
Putting pm_runtime_get_sync at the very beginning of the function
zynqmp_disp_crtc_atomic_enable can resolve this issue.

Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: xlnx: zynqmp: fix a memset in zynqmp_dp_train()</title>
<updated>2021-05-14T07:50:26+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-03-30T09:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6596d71a63544a6171cd0b9abaed8745ada7c65'/>
<id>urn:sha1:a6596d71a63544a6171cd0b9abaed8745ada7c65</id>
<content type='text'>
[ Upstream commit 5842ab76bbfadb37eaea91e53c1efe34ae504e4a ]

The dp-&gt;train_set[] for this driver is only two characters, not four so
this memsets too much.  Fortunately, this ends up corrupting a struct
hole and not anything important.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/YGLwCBMotnrKZu6P@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable</title>
<updated>2021-02-26T09:13:01+00:00</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2021-02-02T06:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1f683fd2c21f2e7cfbcaa5beb9a2723bd68ae4e8'/>
<id>urn:sha1:1f683fd2c21f2e7cfbcaa5beb9a2723bd68ae4e8</id>
<content type='text'>
[ Upstream commit a7e02f7796c163ac8297b30223bf24bade9f8a50 ]

When running xrandr to change resolution of DP, the kmemleak as below
can be observed:

unreferenced object 0xffff00080a351000 (size 256):
  comm "Xorg", pid 248, jiffies 4294899614 (age 19.960s)
  hex dump (first 32 bytes):
    98 a0 bc 01 08 00 ff ff 01 00 00 00 00 00 00 00  ................
    ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;00000000e0bd0f69&gt;] kmemleak_alloc+0x30/0x40
    [&lt;00000000cde2f318&gt;] kmem_cache_alloc+0x3d4/0x588
    [&lt;0000000088ea9bd7&gt;] drm_atomic_helper_setup_commit+0x84/0x5f8
    [&lt;000000002290a264&gt;] drm_atomic_helper_commit+0x58/0x388
    [&lt;00000000f6ea78c3&gt;] drm_atomic_commit+0x4c/0x60
    [&lt;00000000c8e0725e&gt;] drm_atomic_connector_commit_dpms+0xe8/0x110
    [&lt;0000000020ade187&gt;] drm_mode_obj_set_property_ioctl+0x1b0/0x450
    [&lt;00000000918206d6&gt;] drm_connector_property_set_ioctl+0x3c/0x68
    [&lt;000000008d51e7a5&gt;] drm_ioctl_kernel+0xc4/0x118
    [&lt;000000002a819b75&gt;] drm_ioctl+0x214/0x448
    [&lt;000000008ca4e588&gt;] __arm64_sys_ioctl+0xa8/0xf0
    [&lt;0000000034e15a35&gt;] el0_svc_common.constprop.0+0x74/0x190
    [&lt;000000001b93d916&gt;] do_el0_svc+0x24/0x90
    [&lt;00000000ce9230e0&gt;] el0_svc+0x14/0x20
    [&lt;00000000e3607d82&gt;] el0_sync_handler+0xb0/0xb8
    [&lt;000000003e79c15f&gt;] el0_sync+0x174/0x180

This is because there is a scenario that a drm_crtc_commit commit is
allocated but not freed. The drm subsystem require/release references
to a CRTC commit by calling drm_crtc_commit_get/put, and when
drm_crtc_commit_put find that commit.ref.refcount is zero, it will
call __drm_crtc_commit_free to free this CRTC commit. Among these
drm_crtc_commit_get/put pairs, there is a drm_crtc_commit_get in
drm_atomic_helper_setup_commit as below:

...
new_crtc_state-&gt;event-&gt;base.completion = &amp;commit-&gt;flip_done;
new_crtc_state-&gt;event-&gt;base.completion_release = release_crtc_commit;
drm_crtc_commit_get(commit);
...

This reference to the CRTC commit should be released at the function
release_crtc_commit by calling e-&gt;completion_release(e-&gt;completion) in
drm_send_event_locked. So we need to call drm_send_event_locked at
two places: handling vblank event in the irq handler and the crtc disable
helper. But in zynqmp_disp_crtc_atomic_disable, it only marks the flip
is done and not call drm_crtc_commit_put. This result that the refcount
of this commit is always non-zero and this commit will never be freed.

Since the function drm_crtc_send_vblank_event has operations both sending
a flip_done signal and releasing reference to the CRTC commit, let's use
it instead.

Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210202064121.173362-1-quanyang.wang@windriver.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2020-09-14T16:11:40+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2020-09-14T16:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00af6729b52ede86a08173c8d5f2c8cd9fa3390d'/>
<id>urn:sha1:00af6729b52ede86a08173c8d5f2c8cd9fa3390d</id>
<content type='text'>
Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic
properly.

Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm: xlnx: remove defined but not used 'scaling_factors_666'</title>
<updated>2020-09-12T00:18:50+00:00</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-09-10T14:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5684daa71383324bcd048bc5bc15428c5556ae5e'/>
<id>urn:sha1:5684daa71383324bcd048bc5bc15428c5556ae5e</id>
<content type='text'>
This addresses the following gcc warning with "make W=1":

drivers/gpu/drm/xlnx/zynqmp_disp.c:245:18: warning:
‘scaling_factors_666’ defined but not used [-Wunused-const-variable=]
  245 | static const u32 scaling_factors_666[] = {
      |                  ^~~~~~~~~~~~~~~~~~~

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Hyun Kwon &lt;hyun.kwon@xilinx.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200910140630.1191782-1-yanaijie@huawei.com
</content>
</entry>
<entry>
<title>drm/xlnx: Use devm_drm_dev_alloc</title>
<updated>2020-09-11T08:47:19+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-09-07T08:22:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=075342ea3d93044d68f821cf91c1a1a7d2fa569e'/>
<id>urn:sha1:075342ea3d93044d68f821cf91c1a1a7d2fa569e</id>
<content type='text'>
Gets rid of drmm_add_final_kfree, which I want to unexport so that it
stops confusion people about this transitional state of rolling drm
managed memory out.

This also fixes the missing drm_dev_put in the error path of the probe
code.

v2: Drop the misplaced drm_dev_put from zynqmp_dpsub_drm_init (all
other paths leaked on error, this should have been in
zynqmp_dpsub_probe), now that subsumed by the auto-cleanup of
devm_drm_dev_alloc.

Reviewed-by: Hyun Kwon &lt;hyun.kwon@xilinx.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Hyun Kwon &lt;hyun.kwon@xilinx.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200907082225.150837-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: xlnx: dpsub: Fix DMADEVICES Kconfig dependency</title>
<updated>2020-09-05T16:52:54+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2020-07-28T22:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e8b2403545efd46c6347002e27eae4708205fd4'/>
<id>urn:sha1:3e8b2403545efd46c6347002e27eae4708205fd4</id>
<content type='text'>
The dpsub driver uses the DMA engine API, and thus selects DMA_ENGINE to
provide that API. DMA_ENGINE depends on DMADEVICES, which can be
deselected by the user, creating a possibly unmet indirect dependency:

WARNING: unmet direct dependencies detected for DMA_ENGINE
  Depends on [n]: DMADEVICES [=n]
  Selected by [m]:
  - DRM_ZYNQMP_DPSUB [=m] &amp;&amp; HAS_IOMEM [=y] &amp;&amp; (ARCH_ZYNQMP || COMPILE_TEST [=y]) &amp;&amp; COMMON_CLK [=y] &amp;&amp; DRM [=m] &amp;&amp; OF [=y]

Add a dependency on DMADEVICES to fix this.

Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
</content>
</entry>
</feed>
