aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJouni Högander <[email protected]>2023-09-12 09:47:01 +0300
committerRodrigo Vivi <[email protected]>2023-12-21 11:44:30 -0500
commit1be5ff7f82063dab2e1d86bc21f2deb4cf4908bd (patch)
treeebd4c8a9bb6ac9f4bf045213039b96312c1103b6
parent9aab7851ff1922930558274fd3983d047d1dfe22 (diff)
drm/xe/display: Add macro to get i915 device from xe_bo
Add helper macro to kill couple of #ifdefs Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_bo_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h
index c628625c8a89..051fe990c133 100644
--- a/drivers/gpu/drm/xe/xe_bo_types.h
+++ b/drivers/gpu/drm/xe/xe_bo_types.h
@@ -78,4 +78,7 @@ struct xe_bo {
bool created;
};
+#define intel_bo_to_drm_bo(bo) (&(bo)->ttm.base)
+#define intel_bo_to_i915(bo) to_i915(intel_bo_to_drm_bo(bo)->dev)
+
#endif