All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH 08/10] more reverts
Date: Wed, 25 Oct 2023 12:20:43 +0200	[thread overview]
Message-ID: <20231025102045.817068-9-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20231025102045.817068-1-maarten.lankhorst@linux.intel.com>

---
 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


  parent reply	other threads:[~2023-10-25 10:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 10:20 [Intel-xe] [PATCH 00/10] Split out most of "FIXME: drm/i915/display: Remaining changes to make xe compile" Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 01/10] revert fixme in intel_atomic_plane.c Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 02/10] drm/atomic: Add drm_atomic_helper_set_fence_deadline() function Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 03/10] drm/i915: Implement fence->set_deadline Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 04/10] FIXME drm/i915/display: Use fence->set_deadline to boost requests Maarten Lankhorst
2023-10-27 10:05   ` [Intel-xe] [04/10] " Hogander, Jouni
2023-10-25 10:20 ` [Intel-xe] [PATCH 05/10] fixup xe i915_drv.h compat header Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 06/10] revert intel_frontbuffer changes Maarten Lankhorst
2023-10-27 10:17   ` [Intel-xe] [06/10] " Hogander, Jouni
2023-10-25 10:20 ` [Intel-xe] [PATCH 07/10] Update compat headers Maarten Lankhorst
2023-10-25 10:20 ` Maarten Lankhorst [this message]
2023-10-25 10:20 ` [Intel-xe] [PATCH 09/10] drm/i915/display: Use i915_gem_object_get_dma_address to get dma address Maarten Lankhorst
2023-10-25 10:20 ` [Intel-xe] [PATCH 10/10] revert more (fbc) Maarten Lankhorst
2023-10-27 10:01   ` [Intel-xe] [10/10] " Hogander, Jouni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231025102045.817068-9-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.