[Intel-xe] [PATCH] drm/xe/display: Handle NULL ggtt_vma unpinning.
Lucas De Marchi
lucas.demarchi at intel.com
Fri Oct 13 16:46:10 UTC 2023
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?
Lucas De Marchi
> }
>--
>2.40.1
>
More information about the Intel-xe
mailing list