[Intel-xe] [PATCH 08/10] more reverts
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Wed Oct 25 10:20:43 UTC 2023
---
drivers/gpu/drm/i915/display/intel_cursor.c | 8 ++---
drivers/gpu/drm/i915/display/intel_display.c | 35 -------------------
.../drm/i915/display/intel_display_types.h | 4 ---
.../drm/i915/display/skl_universal_plane.c | 4 ---
4 files changed, 3 insertions(+), 48 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 8ed8a623fa98b..b342fad180ca5 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -30,17 +30,15 @@ static const u32 intel_cursor_formats[] = {
static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
{
- __maybe_unused struct drm_i915_private *dev_priv =
+ struct drm_i915_private *dev_priv =
to_i915(plane_state->uapi.plane->dev);
- __maybe_unused const struct drm_framebuffer *fb = plane_state->hw.fb;
- __maybe_unused const struct drm_i915_gem_object *obj = intel_fb_obj(fb);
+ const struct drm_framebuffer *fb = plane_state->hw.fb;
+ const struct drm_i915_gem_object *obj = intel_fb_obj(fb);
u32 base;
-#ifdef I915
if (DISPLAY_INFO(dev_priv)->cursor_needs_physical)
base = sg_dma_address(obj->mm.pages->sgl);
else
-#endif
base = intel_plane_ggtt_offset(plane_state);
return base + plane_state->view.color_plane[0].offset;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 1b66d5adcebee..2f012ea75fba6 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -42,10 +42,8 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
-#ifdef I915
#include "gem/i915_gem_lmem.h"
#include "gem/i915_gem_object.h"
-#endif
#include "g4x_dp.h"
#include "g4x_hdmi.h"
@@ -7121,39 +7119,6 @@ static void intel_atomic_cleanup_work(struct work_struct *work)
intel_atomic_helper_free_state(i915);
}
-#ifndef I915
-static int i915_gem_object_read_from_page(struct xe_bo *bo,
- u32 ofs, u64 *ptr, u32 size)
-{
- struct ttm_bo_kmap_obj map;
- void *virtual;
- bool is_iomem;
- int ret;
-
- XE_WARN_ON(size != 8);
-
- ret = xe_bo_lock(bo, true);
- if (ret)
- return ret;
-
- ret = ttm_bo_kmap(&bo->ttm, ofs >> PAGE_SHIFT, 1, &map);
- if (ret)
- goto out_unlock;
-
- ofs &= ~PAGE_MASK;
- virtual = ttm_kmap_obj_virtual(&map, &is_iomem);
- if (is_iomem)
- *ptr = readq((void __iomem *)(virtual + ofs));
- else
- *ptr = *(u64 *)(virtual + ofs);
-
- ttm_bo_kunmap(&map);
-out_unlock:
- xe_bo_unlock(bo);
- return ret;
-}
-#endif
-
static void intel_atomic_prepare_plane_clear_colors(struct intel_atomic_state *state)
{
struct drm_i915_private *i915 = to_i915(state->base.dev);
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 1861372077f01..e7d4cdfbd62de 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -2115,11 +2115,7 @@ intel_crtc_needs_color_update(const struct intel_crtc_state *crtc_state)
static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
{
-#ifdef I915
return i915_ggtt_offset(plane_state->ggtt_vma);
-#else
- return plane_state->ggtt_vma->node.start;
-#endif
}
static inline struct intel_frontbuffer *
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 7d91344ec1aa2..5de0cff00e7d5 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2454,15 +2454,11 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
fb->modifier = DRM_FORMAT_MOD_LINEAR;
break;
case PLANE_CTL_TILED_X:
-#ifdef I915
plane_config->tiling = I915_TILING_X;
-#endif
fb->modifier = I915_FORMAT_MOD_X_TILED;
break;
case PLANE_CTL_TILED_Y:
-#ifdef I915
plane_config->tiling = I915_TILING_Y;
-#endif
if (val & PLANE_CTL_RENDER_DECOMPRESSION_ENABLE)
if (DISPLAY_VER(dev_priv) >= 14)
fb->modifier = I915_FORMAT_MOD_4_TILED_MTL_RC_CCS;
--
2.39.2
More information about the Intel-xe
mailing list