drm/i915/display: Use i915_gem_object_get_dma_address to get dma address
authorjsg <jsg@openbsd.org>
Thu, 11 Apr 2024 02:56:48 +0000 (02:56 +0000)
committerjsg <jsg@openbsd.org>
Thu, 11 Apr 2024 02:56:48 +0000 (02:56 +0000)
From Maarten Lankhorst
2c07e2437a3e98027c049ca560e4b6e39a975089 in linux-6.6.y/6.6.26
7054b551de18e9875fbdf8d4f3baade428353545 in mainline linux

sys/dev/pci/drm/i915/display/intel_cursor.c

index b342fad..0d21c34 100644 (file)
@@ -23,6 +23,8 @@
 #include "intel_psr.h"
 #include "skl_watermark.h"
 
+#include "gem/i915_gem_object.h"
+
 /* Cursor formats */
 static const u32 intel_cursor_formats[] = {
        DRM_FORMAT_ARGB8888,
@@ -33,11 +35,11 @@ static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
        struct drm_i915_private *dev_priv =
                to_i915(plane_state->uapi.plane->dev);
        const struct drm_framebuffer *fb = plane_state->hw.fb;
-       const struct drm_i915_gem_object *obj = intel_fb_obj(fb);
+       struct drm_i915_gem_object *obj = intel_fb_obj(fb);
        u32 base;
 
        if (DISPLAY_INFO(dev_priv)->cursor_needs_physical)
-               base = sg_dma_address(obj->mm.pages->sgl);
+               base = i915_gem_object_get_dma_address(obj, 0);
        else
                base = intel_plane_ggtt_offset(plane_state);