[Intel-xe] [PATCH 3/3] drm/xe: Replace PVC check by engine type check

Thomas Hellström thomas.hellstrom at linux.intel.com
Mon May 29 09:10:42 UTC 2023


On Fri, 2023-05-26 at 12:06 -0700, José Roberto de Souza wrote:
> __emit_job_gen12_render_compute() masks some PIPE_CONTROL bits that
> do not exist in platforms without render engine.
> So here replacing the PVC check by something more generic that will
> support any future platforms without render engine.
> 
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>

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

Perhaps need an Ack by mbrost or mlankhorst as well.



> ---
>  drivers/gpu/drm/xe/xe_ring_ops.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c
> b/drivers/gpu/drm/xe/xe_ring_ops.c
> index 4f3ef39109b9b..ecae5101cfad6 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> @@ -251,11 +251,11 @@ static void
> __emit_job_gen12_render_compute(struct xe_sched_job *job,
>         u32 ppgtt_flag = get_ppgtt_flag(job);
>         struct xe_gt *gt = job->engine->gt;
>         struct xe_device *xe = gt_to_xe(gt);
> -       bool pvc = xe->info.platform == XE_PVC;
> +       bool lacks_render = !(xe->gt[0].info.engine_mask &
> XE_HW_ENGINE_RCS_MASK);
>         u32 mask_flags = 0;
>  
>         dw[i++] = preparser_disable(true);
> -       if (pvc)
> +       if (lacks_render)
>                 mask_flags = PIPE_CONTROL_3D_ARCH_FLAGS;
>         else if (job->engine->class == XE_ENGINE_CLASS_COMPUTE)
>                 mask_flags = PIPE_CONTROL_3D_ENGINE_FLAGS;
> @@ -277,7 +277,7 @@ static void
> __emit_job_gen12_render_compute(struct xe_sched_job *job,
>                                                 job-
> >user_fence.value,
>                                                 dw, i);
>  
> -       i = emit_pipe_imm_ggtt(xe_lrc_seqno_ggtt_addr(lrc), seqno,
> pvc, dw, i);
> +       i = emit_pipe_imm_ggtt(xe_lrc_seqno_ggtt_addr(lrc), seqno,
> lacks_render, dw, i);
>  
>         i = emit_user_interrupt(dw, i);
>  



More information about the Intel-xe mailing list