[RFC PATCH v2 3/3] drm: initialize accel framework

Jeffrey Hugo quic_jhugo at quicinc.com
Wed Nov 2 21:30:27 UTC 2022


On 11/2/2022 2:34 PM, Oded Gabbay wrote:
> @@ -163,7 +174,11 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
>   
>   	ret = drm_debugfs_init(minor, minor->index, drm_debugfs_root);
>   	if (ret) {
> -		DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
> +		if (minor->type == DRM_MINOR_ACCEL)
> +			DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/accel.\n");
> +		else
> +			DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
> +
>   		goto err_debugfs;
>   	}
>   

This doesn't look right.  Don't you need to call drm_debugfs_init() with 
accel_debugfs_root for the case - minor->type == DRM_MINOR_ACCEL? 
Unless I fail to understand something, this will put all the accel 
devices under /sys/kernel/debug/dri


More information about the dri-devel mailing list