drm/amd/amdxcp: Fix warningsRange of possible values of pdev_num is 0-63. Use int8_t as data type.That also fixes below warnings:>> drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:58: warning: '%
drm/amd/amdxcp: Fix warningsRange of possible values of pdev_num is 0-63. Use int8_t as data type.That also fixes below warnings:>> drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:58: warning: '%d'>> directive output may be truncated writing between 1 and 11 bytes into>> a region of size 9 [-Wformat-truncation=] 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~ drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:46: note: directive argument in the range [-2147483648, 63] 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:9: note: 'snprintf' output between 13 and 23 bytes into a destination of size 20 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Fixes: 97d814fe4f69 ("drm/amd/amdxcp: Use unique name for partition dev")Signed-off-by: Lijo Lazar <[email protected]>Reported-by: kernel test robot <[email protected]>Reviewed-by: Hawking Zhang <[email protected]>Signed-off-by: Alex Deucher <[email protected]>
show more ...
drm/amd/amdxcp: Use unique name for partition devamdxcp is a platform driver for creating partition devices. libdrmlibrary identifies a platform device based on 'OF_FULLNAME' or'MODALIAS'. If two
drm/amd/amdxcp: Use unique name for partition devamdxcp is a platform driver for creating partition devices. libdrmlibrary identifies a platform device based on 'OF_FULLNAME' or'MODALIAS'. If two or more devices have the same platform name, drmlibrary only picks the first device. Platform driver core uses name ofthe device to populate 'MODALIAS'. When 'amdgpu_xcp' is used as the basename, only first partition device gets identified. Assign unique name sothat drm library identifies partition devices separately.amdxcp doesn't support probe of partitions, it doesn't bother aboutmodaliases.Signed-off-by: Lijo Lazar <[email protected]>Acked-by: Alex Deucher <[email protected]>Acked-by: Christian König <[email protected]>Acked-by: James Zhu <[email protected]>Reviewed-by: Asad Kamal <[email protected]>Signed-off-by: Alex Deucher <[email protected]>
drm/amdxcp: fix amdxcp unloads incompletelyamdxcp unloads incompletely, and below error will be seen during load/unload,sysfs: cannot create duplicate filename '/devices/platform/amdgpu_xcp.0'de
drm/amdxcp: fix amdxcp unloads incompletelyamdxcp unloads incompletely, and below error will be seen during load/unload,sysfs: cannot create duplicate filename '/devices/platform/amdgpu_xcp.0'devres_release_group will free xcp device at first, platform device will beunregistered later in platform_device_unregister.Signed-off-by: James Zhu <[email protected]>Acked-by: Alex Deucher <[email protected]>Signed-off-by: Alex Deucher <[email protected]>
drm/amdxcp: fix Makefile to build amdxcp moduleAfter drm conduct amdgpu Makefile, amdgpu.ko has been createdand "amdgpu-y +=" in amdxcp Makefile isn't used.So modify amdgpu-y to amdxcp-y and buil
drm/amdxcp: fix Makefile to build amdxcp moduleAfter drm conduct amdgpu Makefile, amdgpu.ko has been createdand "amdgpu-y +=" in amdxcp Makefile isn't used.So modify amdgpu-y to amdxcp-y and build amdxcp module.Signed-off-by: Bob Zhou <[email protected]>Reviewed-by: James Zhu <[email protected]>Reviewed-by: Guchun Chen <[email protected]>Acked-by: Alex Deucher <[email protected]>Signed-off-by: Alex Deucher <[email protected]>
drm/amdxcp: add platform device driver for amdxcpAdd platform device driver for amdxcp to supportamdgpu spatial partition.-v2: fix build warningSigned-off-by: James Zhu <[email protected]>Ack
drm/amdxcp: add platform device driver for amdxcpAdd platform device driver for amdxcp to supportamdgpu spatial partition.-v2: fix build warningSigned-off-by: James Zhu <[email protected]>Acked-by: Alex Deucher <[email protected]>Signed-off-by: Alex Deucher <[email protected]>