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

Souza, Jose jose.souza at intel.com
Thu Jun 1 15:23:27 UTC 2023


On Thu, 2023-06-01 at 08:08 -0700, Matt Roper wrote:
> On Mon, May 29, 2023 at 12:56:07PM -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.
> > 
> > Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> > ---
> >  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 d2fa0b4c8bcc0..b79dafbe7c4f8 100644
> > --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> > +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> > @@ -249,11 +249,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);
> 
> Is there a specific need to check xe->gt[0] rather than the gt pointer
> we already have?  This function will only get called on a primary GT
> (since media GTs don't have render/compute engines), so it seems like
> checking the current tile's primary would have been fine?

Huum! Yeah for all current platforms it would be fine checking against gt or xe->gt[0].
But I have already pushed it...

> 
> 
> Matt
> 
> >  	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;
> > @@ -275,7 +275,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);
> >  
> > -- 
> > 2.40.1
> > 
> 



More information about the Intel-xe mailing list