forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/xe/display: Implement display support
As for display, the intent is to share the display code with the i915 driver so that there is maximum reuse there. We do this by recompiling i915/display code twice. Now that i915 has been adapted to support the Xe build, we can add the xe/display support. This initial work is a collaboration of many people and unfortunately this squashed patch won't fully honor the proper credits. But let's try to add a few from the squashed patches: Co-developed-by: Matthew Brost <matthew.brost@intel.com> Co-developed-by: Jani Nikula <jani.nikula@intel.com> Co-developed-by: Lucas De Marchi <lucas.demarchi@intel.com> Co-developed-by: Matt Roper <matthew.d.roper@intel.com> Co-developed-by: Mauro Carvalho Chehab <mchehab@kernel.org> Co-developed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Co-developed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
- Loading branch information
1 parent
a839e36
commit 44e6949
Showing
59 changed files
with
2,873 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Empty */ |
17 changes: 17 additions & 0 deletions
17
drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_mman.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2023 Intel Corporation | ||
*/ | ||
|
||
#ifndef _I915_GEM_MMAN_H_ | ||
#define _I915_GEM_MMAN_H_ | ||
|
||
#include "xe_bo_types.h" | ||
#include <drm/drm_prime.h> | ||
|
||
static inline int i915_gem_fb_mmap(struct xe_bo *bo, struct vm_area_struct *vma) | ||
{ | ||
return drm_gem_prime_mmap(&bo->ttm.base, vma); | ||
} | ||
|
||
#endif |
65 changes: 65 additions & 0 deletions
65
drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2022 Intel Corporation | ||
*/ | ||
|
||
#ifndef _I915_GEM_OBJECT_H_ | ||
#define _I915_GEM_OBJECT_H_ | ||
|
||
#include <linux/types.h> | ||
|
||
#include "xe_bo.h" | ||
|
||
#define i915_gem_object_is_shmem(obj) ((obj)->flags & XE_BO_CREATE_SYSTEM_BIT) | ||
|
||
static inline dma_addr_t i915_gem_object_get_dma_address(const struct xe_bo *bo, pgoff_t n) | ||
{ | ||
/* Should never be called */ | ||
WARN_ON(1); | ||
return n; | ||
} | ||
|
||
static inline bool i915_gem_object_is_tiled(const struct xe_bo *bo) | ||
{ | ||
/* legacy tiling is unused */ | ||
return false; | ||
} | ||
|
||
static inline bool i915_gem_object_is_userptr(const struct xe_bo *bo) | ||
{ | ||
/* legacy tiling is unused */ | ||
return false; | ||
} | ||
|
||
static inline 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2023 Intel Corporation | ||
*/ | ||
|
||
#ifndef __INTEL_RPS_H__ | ||
#define __INTEL_RPS_H__ | ||
|
||
#define gen5_rps_irq_handler(x) ({}) | ||
|
||
#endif /* __INTEL_RPS_H__ */ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2023 Intel Corporation | ||
*/ | ||
|
||
#ifndef __I915_CONFIG_H__ | ||
#define __I915_CONFIG_H__ | ||
|
||
#include <linux/sched.h> | ||
|
||
struct drm_i915_private; | ||
|
||
static inline unsigned long | ||
i915_fence_timeout(const struct drm_i915_private *i915) | ||
{ | ||
return MAX_SCHEDULE_TIMEOUT; | ||
} | ||
|
||
#endif /* __I915_CONFIG_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2023 Intel Corporation | ||
*/ | ||
|
||
#ifndef __I915_DEBUGFS_H__ | ||
#define __I915_DEBUGFS_H__ | ||
|
||
struct drm_i915_gem_object; | ||
struct seq_file; | ||
|
||
static inline void i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) {} | ||
|
||
#endif /* __I915_DEBUGFS_H__ */ |
Oops, something went wrong.