[Intel-xe] [PATCH v2 04/31] drm/xe: Use DRM_SCHED_POLICY_SINGLE_ENTITY mode

Thomas Hellström thomas.hellstrom at linux.intel.com
Mon May 8 12:41:45 UTC 2023


On 5/2/23 02:17, Matthew Brost wrote:
> We create 1 GPU scheduler per entity in Xe, use
> DRM_SCHED_POLICY_SINGLE_ENTITY scheduling which is designed for that
> paradigm.
>
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_execlist.c   | 3 ++-
>   drivers/gpu/drm/xe/xe_guc_submit.c | 3 +--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_execlist.c b/drivers/gpu/drm/xe/xe_execlist.c
> index 48060d14547a..79fb951c2965 100644
> --- a/drivers/gpu/drm/xe/xe_execlist.c
> +++ b/drivers/gpu/drm/xe/xe_execlist.c
> @@ -339,7 +339,8 @@ static int execlist_engine_init(struct xe_engine *e)
>   	err = drm_sched_init(&exl->sched, &drm_sched_ops, NULL,
>   			     e->lrc[0].ring.size / MAX_JOB_SIZE_BYTES,
>   			     XE_SCHED_HANG_LIMIT, XE_SCHED_JOB_TIMEOUT,
> -			     NULL, NULL, e->hwe->name, DRM_SCHED_POLICY_DEFAULT,
> +			     NULL, NULL, e->hwe->name,
> +			     DRM_SCHED_POLICY_SINGLE_ENTITY,
>   			     gt_to_xe(e->gt)->drm.dev);
>   	if (err)
>   		goto err_free;
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 9d3fadca43be..68d09e7a4cc0 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1084,7 +1084,7 @@ static int guc_engine_init(struct xe_engine *e)
>   	err = drm_sched_init(&ge->sched, &drm_sched_ops, NULL,
>   			     e->lrc[0].ring.size / MAX_JOB_SIZE_BYTES,
>   			     64, timeout, guc_to_gt(guc)->ordered_wq, NULL,
> -			     e->name, DRM_SCHED_POLICY_DEFAULT,
> +			     e->name, DRM_SCHED_POLICY_SINGLE_ENTITY,
>   			     gt_to_xe(e->gt)->drm.dev);
>   	if (err)
>   		goto err_free;
> @@ -1185,7 +1185,6 @@ static int guc_engine_set_priority(struct xe_engine *e,
>   	if (!msg)
>   		return -ENOMEM;
>   
> -	drm_sched_entity_set_priority(e->entity, priority);
>   	guc_engine_add_msg(e, msg, SET_SCHED_PROPS);
>   
>   	return 0;

Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>




More information about the Intel-xe mailing list