mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
drm: add func to get max iomem address v2
it will be used to check if the driver needs swiotlb v2: Don't use inline, instead, move function to drm_memory.c (Michel Daenzer <[email protected]>) Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
1 parent
65101d8c91
commit
82626363a2
2 files changed
+15
No files matched your search
@@ -149,3 +149,16 @@ void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
|
||||
iounmap(map->handle);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_legacy_ioremapfree);
|
||||
|
||||
u64 drm_get_max_iomem(void)
|
||||
{
|
||||
struct resource *tmp;
|
||||
u64 max_iomem = 0;
|
||||
|
||||
for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
|
||||
max_iomem = max(max_iomem, tmp->end);
|
||||
}
|
||||
|
||||
return max_iomem;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_get_max_iomem);
|
||||
@@ -38,6 +38,8 @@
|
||||
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
|
||||
void drm_clflush_sg(struct sg_table *st);
|
||||
void drm_clflush_virt_range(void *addr, unsigned long length);
|
||||
u64 drm_get_max_iomem(void);
|
||||
|
||||
|
||||
static inline bool drm_arch_can_wc_memory(void)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user