Patch "drm/mediatek: Set sensible cursor width/height values to fix crash" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/mediatek: Set sensible cursor width/height values to fix crash

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-mediatek-set-sensible-cursor-width-height-values.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8158bec1be4d09c0b250a54bbe74e875642b02fb
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
Date:   Thu Jul 18 10:24:10 2024 +0200

    drm/mediatek: Set sensible cursor width/height values to fix crash
    
    [ 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@xxxxxxxxxxxxx>
    Reviewed-by: Fei Shao <fshao@xxxxxxxxxxxx>
    Tested-by: Fei Shao <fshao@xxxxxxxxxxxx>
    Reviewed-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
    Reviewed-by: CK Hu <ck.hu@xxxxxxxxxxxx>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20240718082410.204459-1-angelogioacchino.delregno@xxxxxxxxxxxxx/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 56f409ad7f39..ab2bace792e4 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux