[Intel-xe] [PATCH] drm/xe/display: Handle NULL ggtt_vma unpinning.

Shankar, Uma uma.shankar at intel.com
Thu Nov 16 08:25:24 UTC 2023



> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Lucas De
> Marchi
> Sent: Friday, October 13, 2023 10:16 PM
> To: maarten.lankhorst at linux.intel.com
> Cc: intel-xe at lists.freedesktop.org
> Subject: Re: [Intel-xe] [PATCH] drm/xe/display: Handle NULL ggtt_vma unpinning.
> 
> On Fri, Oct 13, 2023 at 05:14:52PM +0200, Maarten Lankhorst wrote:
> >From: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> >
> >Makes cursor patches work on xe. Probably best to commit to xe as well.
> >
> >Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> >---
> > drivers/gpu/drm/xe/display/xe_fb_pin.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >index 2c36e5032433..48d394e152d8 100644
> >--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >@@ -324,6 +324,7 @@ int intel_plane_pin_fb(struct intel_plane_state
> >*plane_state)
> >
> > void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
> >{
> >-	__xe_unpin_fb_vma(old_plane_state->ggtt_vma);
> >+	if (old_plane_state->ggtt_vma)
> >+		__xe_unpin_fb_vma(old_plane_state->ggtt_vma);
> > 	old_plane_state->ggtt_vma = NULL;
> 
> any reason to deviate from what we do in the i915 side? There we use:
> 
> 	vma = fetch_and_zero(&old_plane_state->ggtt_vma);
> 	if (vma)
> 		intel_unpin_fb_vma(vma, old_plane_state->flags);
> 
> Also... aren't we using or going to use DPT for MTL and above?

I think the ggtt_swap logic which Maarten introduced in 
https://patchwork.freedesktop.org/patch/566831/?series=126202&rev=1
may need the above check.

Also we need to make sure DPT path is taken care properly.
@Heikkila, Juha-pekka Can you also check this one once.

Regards,
Uma Shankar

> Lucas De Marchi
> 
> > }
> >--
> >2.40.1
> >


More information about the Intel-xe mailing list