[PATCH v8 05/16] drm/mediatek: Set DRM mode configs accordingly

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Jun 10 08:14:44 UTC 2024


Il 06/06/24 11:26, Shawn Sung ha scritto:
> From: Hsiao Chien Sung <shawn.sung at mediatek.com>
> 
> Set DRM mode configs limitation according to the hardware capabilities
> and pass the IGT checks as below:
> 
> - The test "graphics.IgtKms.kms_plane" requires a frame buffer with
>    width of 4512 pixels (> 4096).
> - The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor size is
>    defined, and run the test with cursor size from 1x1 to 512x512.
> 
> Please notice that the test conditions may change as IGT is updated.
> 
> Reviewed-by: CK Hu <ck.hu at mediatek.com>
> Signed-off-by: Hsiao Chien Sung <shawn.sung at mediatek.com>
> ---
>   drivers/gpu/drm/mediatek/mtk_drm_drv.c | 22 ++++++++++++++++++++++
>   drivers/gpu/drm/mediatek/mtk_drm_drv.h |  4 ++++
>   2 files changed, 26 insertions(+)
> 

..snip..

> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> index 78d698ede1bf..6cfa790e8df5 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h
> @@ -46,6 +46,10 @@ struct mtk_mmsys_driver_data {
>   	bool shadow_register;
>   	unsigned int mmsys_id;
>   	unsigned int mmsys_dev_num;
> +
> +	int max_width;
> +	int min_width;
> +	int min_height;

Only one nit here.

Since {min,max}_{width,height}:
  - Will never be negative; and
  - Will never need more than 16 bits; and
  - Are local to this driver and anyway copied to drm later

Can you please change them to unsigned 16-bits (u16)?

After which,

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

Cheers,
Angelo

>   };
>   
>   struct mtk_drm_private {




More information about the dri-devel mailing list