summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJouni Högander <jouni.hogander@intel.com>2023-09-12 09:47:01 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:44:30 -0500
commit1be5ff7f82063dab2e1d86bc21f2deb4cf4908bd (patch)
treeebd4c8a9bb6ac9f4bf045213039b96312c1103b6 /drivers/gpu/drm
parent9aab7851ff1922930558274fd3983d047d1dfe22 (diff)
downloadlwn-1be5ff7f82063dab2e1d86bc21f2deb4cf4908bd.tar.gz
lwn-1be5ff7f82063dab2e1d86bc21f2deb4cf4908bd.zip
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 <jouni.hogander@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm')
-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