mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
intel/display: add i915_gem_evict_for_node
When the aperture is close to full or such fragmented, this unimplemented function may be invoked. Fixes #5377
This commit is contained in:
parent
6f5bcd4446
commit
188080e15f
28
repos/dde_linux/patches/i915_ggtt.patch
Normal file
28
repos/dde_linux/patches/i915_ggtt.patch
Normal file
@ -0,0 +1,28 @@
|
||||
intel_fb: avoid pagefault, since gt not setup by our port
|
||||
|
||||
--- src/linux/drivers/gpu/drm/i915/i915_gem_evict.c
|
||||
+++ src/linux/drivers/gpu/drm/i915/i915_gem_evict.c
|
||||
@@ -187,8 +187,9 @@
|
||||
if (i915_is_ggtt(vm)) {
|
||||
struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm);
|
||||
|
||||
- list_for_each_entry(gt, &ggtt->gt_list, ggtt_link)
|
||||
- intel_gt_retire_requests(gt);
|
||||
+ if (gt)
|
||||
+ list_for_each_entry(gt, &ggtt->gt_list, ggtt_link)
|
||||
+ intel_gt_retire_requests(gt);
|
||||
} else {
|
||||
intel_gt_retire_requests(vm->gt);
|
||||
}
|
||||
@@ -353,8 +354,9 @@
|
||||
struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm);
|
||||
struct intel_gt *gt;
|
||||
|
||||
- list_for_each_entry(gt, &ggtt->gt_list, ggtt_link)
|
||||
- intel_gt_retire_requests(gt);
|
||||
+ if (gt)
|
||||
+ list_for_each_entry(gt, &ggtt->gt_list, ggtt_link)
|
||||
+ intel_gt_retire_requests(gt);
|
||||
} else {
|
||||
intel_gt_retire_requests(vm->gt);
|
||||
}
|
@ -1 +1 @@
|
||||
501de7d0dc5363c9f271c2cd853b963b2a881438
|
||||
5e77186d61fe216b38cf516c5a40babcfdbd50ad
|
||||
|
@ -10,6 +10,7 @@ DIR(linux) := src/linux
|
||||
# Patches
|
||||
#
|
||||
PATCH_FILES := i915_irq.patch \
|
||||
i915_ggtt.patch \
|
||||
iwlwifi_break_busy_loop.patch \
|
||||
iwlwifi_enable_irq_before_pnvm.patch \
|
||||
iwlwifi_limit_rx_bufs.patch \
|
||||
|
@ -720,3 +720,51 @@ int intel_pxp_key_check(struct intel_pxp *pxp, struct drm_i915_gem_object *obj,
|
||||
lx_emul_trace(__func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
int intel_gt_wait_for_idle(struct intel_gt *gt, long timeout)
|
||||
{
|
||||
printk("%s - timeout=%ld\n", __func__, timeout);
|
||||
lx_emul_trace(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
long intel_gt_retire_requests_timeout(struct intel_gt * gt, long timeout, long * remaining_timeout)
|
||||
{
|
||||
printk("%s - timeout=%ld\n", __func__, timeout);
|
||||
|
||||
if (remaining_timeout)
|
||||
*remaining_timeout = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void * vmap(struct page ** pages, unsigned int count, unsigned long flags, pgprot_t prot)
|
||||
{
|
||||
bool contiguous = true;
|
||||
void * vmap_addr = 0;
|
||||
unsigned long prev_addr = 0;
|
||||
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
void * virt_addr = page_address(pages[i]);
|
||||
|
||||
if (!i)
|
||||
vmap_addr = virt_addr;
|
||||
|
||||
if (i && contiguous)
|
||||
contiguous = (void *)(prev_addr + 4096) == virt_addr;
|
||||
|
||||
prev_addr = (unsigned long)virt_addr;
|
||||
|
||||
if (!contiguous)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!contiguous)
|
||||
printk("%s -- failed, pages are non contiguous count=%u\n",
|
||||
__func__, count);
|
||||
|
||||
return contiguous ? vmap_addr : 0;
|
||||
}
|
||||
|
@ -712,20 +712,6 @@ struct intel_context * i915_gem_engines_iter_next(struct i915_gem_engines_iter *
|
||||
}
|
||||
|
||||
|
||||
extern int i915_gem_evict_for_node(struct i915_address_space * vm,struct i915_gem_ww_ctx * ww,struct drm_mm_node * target,unsigned int flags);
|
||||
int i915_gem_evict_for_node(struct i915_address_space * vm,struct i915_gem_ww_ctx * ww,struct drm_mm_node * target,unsigned int flags)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern int i915_gem_evict_something(struct i915_address_space * vm,struct i915_gem_ww_ctx * ww,u64 min_size,u64 alignment,unsigned long color,u64 start,u64 end,unsigned flags);
|
||||
int i915_gem_evict_something(struct i915_address_space * vm,struct i915_gem_ww_ctx * ww,u64 min_size,u64 alignment,unsigned long color,u64 start,u64 end,unsigned flags)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern int i915_gem_execbuffer2_ioctl(struct drm_device * dev,void * data,struct drm_file * file);
|
||||
int i915_gem_execbuffer2_ioctl(struct drm_device * dev,void * data,struct drm_file * file)
|
||||
{
|
||||
@ -1227,13 +1213,6 @@ void intel_gt_mcr_unlock(struct intel_gt * gt,unsigned long flags)
|
||||
}
|
||||
|
||||
|
||||
extern long intel_gt_retire_requests_timeout(struct intel_gt * gt,long timeout,long * remaining_timeout);
|
||||
long intel_gt_retire_requests_timeout(struct intel_gt * gt,long timeout,long * remaining_timeout)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
extern int intel_gt_runtime_resume(struct intel_gt * gt);
|
||||
int intel_gt_runtime_resume(struct intel_gt * gt)
|
||||
{
|
||||
@ -2086,14 +2065,6 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
void * vmap(struct page ** pages,unsigned int count,unsigned long flags,pgprot_t prot)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
void * vmap_pfn(unsigned long * pfns,unsigned int count,pgprot_t prot)
|
||||
|
@ -191,6 +191,7 @@ drivers/gpu/drm/i915/i915_active.c
|
||||
drivers/gpu/drm/i915/i915_config.c
|
||||
drivers/gpu/drm/i915/i915_driver.c
|
||||
drivers/gpu/drm/i915/i915_drm_client.c
|
||||
drivers/gpu/drm/i915/i915_gem_evict.c
|
||||
drivers/gpu/drm/i915/i915_gem_gtt.c
|
||||
drivers/gpu/drm/i915/i915_gem_ww.c
|
||||
drivers/gpu/drm/i915/i915_getparam.c
|
||||
|
@ -194,6 +194,7 @@ drivers/gpu/drm/i915/i915_active.c
|
||||
drivers/gpu/drm/i915/i915_config.c
|
||||
drivers/gpu/drm/i915/i915_driver.c
|
||||
drivers/gpu/drm/i915/i915_drm_client.c
|
||||
drivers/gpu/drm/i915/i915_gem_evict.c
|
||||
drivers/gpu/drm/i915/i915_gem_gtt.c
|
||||
drivers/gpu/drm/i915/i915_gem_ww.c
|
||||
drivers/gpu/drm/i915/i915_getparam.c
|
||||
|
Loading…
Reference in New Issue
Block a user