The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.10 01/24] drm/mediatek: Set sensible cursor width/height values to fix crash
@ 2024-08-23 14:00 Sasha Levin
  2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 02/24] ksmbd: override fsids for share path check Sasha Levin
                   ` (22 more replies)
  0 siblings, 23 replies; 26+ messages in thread
From: Sasha Levin @ 2024-08-23 14:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: AngeloGioacchino Del Regno, Fei Shao, Daniel Stone, CK Hu,
	Chun-Kuang Hu, Sasha Levin, p.zabel, airlied, daniel,
	matthias.bgg, dri-devel, linux-mediatek, linux-arm-kernel

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

[ Upstream commit 042b8711a0beafb2c3b888bebe3c300ab4c817fa ]

Hardware-speaking, there is no feature-reduced cursor specific
plane, so this driver reserves the last all Overlay plane as a
Cursor plane, but sets the maximum cursor width/height to the
maximum value that the full overlay plane can use.

While this could be ok, it raises issues with common userspace
using libdrm (especially Mutter, but other compositors too) which
will crash upon performing allocations and/or using said cursor
plane.

Reduce the maximum width/height for the cursor to 512x512 pixels,
value taken from IGT's maximum cursor size test, which succeeds.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Tested-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240718082410.204459-1-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 56f409ad7f390..ab2bace792e46 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -539,8 +539,8 @@ static int mtk_drm_kms_init(struct drm_device *drm)
 	}
 
 	/* IGT will check if the cursor size is configured */
-	drm->mode_config.cursor_width = drm->mode_config.max_width;
-	drm->mode_config.cursor_height = drm->mode_config.max_height;
+	drm->mode_config.cursor_width = 512;
+	drm->mode_config.cursor_height = 512;
 
 	/* Use OVL device for all DMA memory allocations */
 	crtc = drm_crtc_from_index(drm, 0);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-08-24 14:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 14:00 [PATCH AUTOSEL 6.10 01/24] drm/mediatek: Set sensible cursor width/height values to fix crash Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 02/24] ksmbd: override fsids for share path check Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 03/24] ksmbd: override fsids for smb2_query_info() Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 04/24] usbnet: ipheth: race between ipheth_close and error handling Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 05/24] usbnet: ipheth: remove extraneous rx URB length check Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 06/24] usbnet: ipheth: drop RX URBs with no payload Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 07/24] usbnet: ipheth: do not stop RX on failing RX callback Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 08/24] usbnet: ipheth: fix carrier detection in modes 1 and 4 Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 09/24] kbuild: rust: skip -fmin-function-alignment in bindgen flags Sasha Levin
2024-08-24 14:45   ` Miguel Ojeda
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 10/24] rust: add intrinsics to fix `-Os` builds Sasha Levin
2024-08-24 14:45   ` Miguel Ojeda
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 11/24] net: ethernet: use ip_hdrlen() instead of bit shift Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 12/24] drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 13/24] drm: panel-orientation-quirks: Add quirk for Ayn Loki Max Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 14/24] net: phy: vitesse: repair vsc73xx autonegotiation Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 15/24] powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 16/24] wifi: mt76: mt7921: fix NULL pointer access in mt7921_ipv6_addr_change Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 17/24] Squashfs: sanity check symbolic link size Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 18/24] drm/amdgpu: Update kmd_fw_shared for VCN5 Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 19/24] of/irq: Prevent device address out-of-bounds read in interrupt map walk Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 20/24] lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 21/24] net: hns3: void array out of bound when loop tnl_num Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 22/24] net: hns3: use correct release function during uninitialization Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 23/24] kunit/overflow: Fix UB in overflow_allocation_test Sasha Levin
2024-08-23 14:00 ` [PATCH AUTOSEL 6.10 24/24] btrfs: update target inode's ctime on unlink Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox