]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Kill the fbdev vma reuse hack
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 8 May 2026 14:34:18 +0000 (17:34 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 11 May 2026 14:43:25 +0000 (17:43 +0300)
This fbdev vma reuse hacks is a massive layering violation. It
really does not belong in the fb pinning code. And it's in the
way of properly abstracting this stuff, so kill it.

I don't think this hack even does anything useful because the
normal view will just use bo->ggtt_node when present, and the
fbdev bo will be permanenly pinned with xe_bo_create_pin_map_at_novm()
which does set up bo->ggtt_node. So we should never end up
rebuilding the PTEs for the fbdev bo, even without the reuse hack.

v2: Pimp the commit message a a bit (Jani)
v3: Also nuke intel_fbdev_vma_pointer()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260508143426.26504-9-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/i915/display/intel_fbdev.h
drivers/gpu/drm/xe/display/xe_fb_pin.c

index aa2701795caa077f6953e814c827b86f57eeb322..1ae7f62842fc373605c1601a8b94299cd4b86908 100644 (file)
@@ -560,11 +560,6 @@ struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
        return fbdev->fb;
 }
 
-struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev)
-{
-       return fbdev ? fbdev->vma : NULL;
-}
-
 void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map)
 {
        struct intel_fbdev *fbdev = display->fbdev.fbdev;
index edaf5d16a456a2f3c13b81fc8d8dbdfb690b7315..0ae36d321c77334561d7e7f9b4fc53a11c1624c7 100644 (file)
@@ -22,7 +22,6 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
        .fbdev_probe = intel_fbdev_driver_fbdev_probe
 void intel_fbdev_setup(struct intel_display *display);
 struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
-struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev);
 void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map);
 #else
 #define INTEL_FBDEV_DRIVER_OPS \
@@ -34,12 +33,6 @@ static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbd
 {
        return NULL;
 }
-
-static inline struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev)
-{
-       return NULL;
-}
-
 static inline void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map)
 {
 }
index 21cc38dadb180d2426abaf1f70e99904183cf310..52ddb73f8a0cb5abd7a14dd75d42af964b5acc05 100644 (file)
@@ -10,7 +10,6 @@
 #include "intel_display_types.h"
 #include "intel_fb.h"
 #include "intel_fb_pin.h"
-#include "intel_fbdev.h"
 #include "xe_bo.h"
 #include "xe_device.h"
 #include "xe_display_vma.h"
@@ -431,10 +430,7 @@ void intel_fb_unpin_vma(struct i915_vma *vma, int fence_id)
 static bool reuse_vma(struct intel_plane_state *new_plane_state,
                      const struct intel_plane_state *old_plane_state)
 {
-       struct intel_framebuffer *fb = to_intel_framebuffer(new_plane_state->hw.fb);
        struct intel_plane *plane = to_intel_plane(new_plane_state->uapi.plane);
-       struct xe_device *xe = to_xe_device(fb->base.dev);
-       struct intel_display *display = xe->display;
        struct i915_vma *vma;
 
        if (old_plane_state->hw.fb == new_plane_state->hw.fb &&
@@ -445,12 +441,6 @@ static bool reuse_vma(struct intel_plane_state *new_plane_state,
                goto found;
        }
 
-       if (fb == intel_fbdev_framebuffer(display->fbdev.fbdev)) {
-               vma = intel_fbdev_vma_pointer(display->fbdev.fbdev);
-               if (vma)
-                       goto found;
-       }
-
        return false;
 
 found: