Home
last modified time | relevance | path

Searched refs:pfdev (Results 1 – 20 of 20) sorted by relevance

/kernel/linux/linux-5.10/drivers/gpu/drm/panfrost/
Dpanfrost_device.c19 static int panfrost_reset_init(struct panfrost_device *pfdev) in panfrost_reset_init() argument
23 pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true); in panfrost_reset_init()
24 if (IS_ERR(pfdev->rstc)) { in panfrost_reset_init()
25 dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc)); in panfrost_reset_init()
26 return PTR_ERR(pfdev->rstc); in panfrost_reset_init()
29 err = reset_control_deassert(pfdev->rstc); in panfrost_reset_init()
36 static void panfrost_reset_fini(struct panfrost_device *pfdev) in panfrost_reset_fini() argument
38 reset_control_assert(pfdev->rstc); in panfrost_reset_fini()
41 static int panfrost_clk_init(struct panfrost_device *pfdev) in panfrost_clk_init() argument
46 pfdev->clock = devm_clk_get(pfdev->dev, NULL); in panfrost_clk_init()
[all …]
Dpanfrost_gpu.c24 struct panfrost_device *pfdev = data; in panfrost_gpu_irq_handler() local
25 u32 state = gpu_read(pfdev, GPU_INT_STAT); in panfrost_gpu_irq_handler()
26 u32 fault_status = gpu_read(pfdev, GPU_FAULT_STATUS); in panfrost_gpu_irq_handler()
32 u64 address = (u64) gpu_read(pfdev, GPU_FAULT_ADDRESS_HI) << 32; in panfrost_gpu_irq_handler()
33 address |= gpu_read(pfdev, GPU_FAULT_ADDRESS_LO); in panfrost_gpu_irq_handler()
35 dev_warn(pfdev->dev, "GPU Fault 0x%08x (%s) at 0x%016llx\n", in panfrost_gpu_irq_handler()
36 fault_status & 0xFF, panfrost_exception_name(pfdev, fault_status), in panfrost_gpu_irq_handler()
40 dev_warn(pfdev->dev, "There were multiple GPU faults - some have not been reported\n"); in panfrost_gpu_irq_handler()
42 gpu_write(pfdev, GPU_INT_MASK, 0); in panfrost_gpu_irq_handler()
46 panfrost_perfcnt_sample_done(pfdev); in panfrost_gpu_irq_handler()
[all …]
Dpanfrost_perfcnt.c36 void panfrost_perfcnt_clean_cache_done(struct panfrost_device *pfdev) in panfrost_perfcnt_clean_cache_done() argument
38 complete(&pfdev->perfcnt->dump_comp); in panfrost_perfcnt_clean_cache_done()
41 void panfrost_perfcnt_sample_done(struct panfrost_device *pfdev) in panfrost_perfcnt_sample_done() argument
43 gpu_write(pfdev, GPU_CMD, GPU_CMD_CLEAN_CACHES); in panfrost_perfcnt_sample_done()
46 static int panfrost_perfcnt_dump_locked(struct panfrost_device *pfdev) in panfrost_perfcnt_dump_locked() argument
51 reinit_completion(&pfdev->perfcnt->dump_comp); in panfrost_perfcnt_dump_locked()
52 gpuva = pfdev->perfcnt->mapping->mmnode.start << PAGE_SHIFT; in panfrost_perfcnt_dump_locked()
53 gpu_write(pfdev, GPU_PERFCNT_BASE_LO, gpuva); in panfrost_perfcnt_dump_locked()
54 gpu_write(pfdev, GPU_PERFCNT_BASE_HI, gpuva >> 32); in panfrost_perfcnt_dump_locked()
55 gpu_write(pfdev, GPU_INT_CLEAR, in panfrost_perfcnt_dump_locked()
[all …]
Dpanfrost_mmu.c29 static int wait_ready(struct panfrost_device *pfdev, u32 as_nr) in wait_ready() argument
36 ret = readl_relaxed_poll_timeout_atomic(pfdev->iomem + AS_STATUS(as_nr), in wait_ready()
40 dev_err(pfdev->dev, "AS_ACTIVE bit stuck\n"); in wait_ready()
45 static int write_cmd(struct panfrost_device *pfdev, u32 as_nr, u32 cmd) in write_cmd() argument
50 status = wait_ready(pfdev, as_nr); in write_cmd()
52 mmu_write(pfdev, AS_COMMAND(as_nr), cmd); in write_cmd()
57 static void lock_region(struct panfrost_device *pfdev, u32 as_nr, in lock_region() argument
71 mmu_write(pfdev, AS_LOCKADDR_LO(as_nr), region & 0xFFFFFFFFUL); in lock_region()
72 mmu_write(pfdev, AS_LOCKADDR_HI(as_nr), (region >> 32) & 0xFFFFFFFFUL); in lock_region()
73 write_cmd(pfdev, as_nr, AS_COMMAND_LOCK); in lock_region()
[all …]
Dpanfrost_job.c94 static struct dma_fence *panfrost_fence_create(struct panfrost_device *pfdev, int js_num) in panfrost_fence_create() argument
97 struct panfrost_job_slot *js = pfdev->js; in panfrost_fence_create()
103 fence->dev = pfdev->ddev; in panfrost_fence_create()
125 (job->pfdev->features.nr_core_groups == 2)) in panfrost_job_get_slot()
127 if (panfrost_has_hw_issue(job->pfdev, HW_ISSUE_8987)) in panfrost_job_get_slot()
134 static void panfrost_job_write_affinity(struct panfrost_device *pfdev, in panfrost_job_write_affinity() argument
145 affinity = pfdev->features.shader_present; in panfrost_job_write_affinity()
147 job_write(pfdev, JS_AFFINITY_NEXT_LO(js), affinity & 0xFFFFFFFF); in panfrost_job_write_affinity()
148 job_write(pfdev, JS_AFFINITY_NEXT_HI(js), affinity >> 32); in panfrost_job_write_affinity()
153 struct panfrost_device *pfdev = job->pfdev; in panfrost_job_hw_submit() local
[all …]
Dpanfrost_gem_shrinker.c21 struct panfrost_device *pfdev = in panfrost_gem_shrinker_count() local
26 if (!mutex_trylock(&pfdev->shrinker_lock)) in panfrost_gem_shrinker_count()
29 list_for_each_entry(shmem, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_count()
34 mutex_unlock(&pfdev->shrinker_lock); in panfrost_gem_shrinker_count()
68 struct panfrost_device *pfdev = in panfrost_gem_shrinker_scan() local
73 if (!mutex_trylock(&pfdev->shrinker_lock)) in panfrost_gem_shrinker_scan()
76 list_for_each_entry_safe(shmem, tmp, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_scan()
86 mutex_unlock(&pfdev->shrinker_lock); in panfrost_gem_shrinker_scan()
102 struct panfrost_device *pfdev = dev->dev_private; in panfrost_gem_shrinker_init() local
103 pfdev->shrinker.count_objects = panfrost_gem_shrinker_count; in panfrost_gem_shrinker_init()
[all …]
Dpanfrost_drv.c29 struct panfrost_device *pfdev = ddev->dev_private; in panfrost_ioctl_get_param() local
36 param->value = pfdev->features.member; \ in panfrost_ioctl_get_param()
41 param->value = pfdev->features.member[param->param - \ in panfrost_ioctl_get_param()
250 struct panfrost_device *pfdev = dev->dev_private; in panfrost_ioctl_submit() local
276 job->pfdev = pfdev; in panfrost_ioctl_submit()
279 job->flush_id = panfrost_gpu_get_latest_flush_id(pfdev); in panfrost_ioctl_submit()
398 struct panfrost_device *pfdev = dev->dev_private; in panfrost_ioctl_madvise() local
411 mutex_lock(&pfdev->shrinker_lock); in panfrost_ioctl_madvise()
440 &pfdev->shrinker_list); in panfrost_ioctl_madvise()
447 mutex_unlock(&pfdev->shrinker_lock); in panfrost_ioctl_madvise()
[all …]
Dpanfrost_devfreq.c56 struct panfrost_device *pfdev = dev_get_drvdata(dev); in panfrost_devfreq_get_dev_status() local
57 struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq; in panfrost_devfreq_get_dev_status()
60 status->current_frequency = clk_get_rate(pfdev->clock); in panfrost_devfreq_get_dev_status()
75 dev_dbg(pfdev->dev, "busy %lu total %lu %lu %% freq %lu MHz\n", in panfrost_devfreq_get_dev_status()
89 int panfrost_devfreq_init(struct panfrost_device *pfdev) in panfrost_devfreq_init() argument
94 struct device *dev = &pfdev->pdev->dev; in panfrost_devfreq_init()
98 struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq; in panfrost_devfreq_init()
100 opp_table = dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names, in panfrost_devfreq_init()
101 pfdev->comp->num_supplies); in panfrost_devfreq_init()
126 cur_freq = clk_get_rate(pfdev->clock); in panfrost_devfreq_init()
[all …]
Dpanfrost_device.h75 void (*vendor_quirk)(struct panfrost_device *pfdev);
123 struct panfrost_device *pfdev; member
135 struct panfrost_device *pfdev; member
147 static inline int panfrost_model_cmp(struct panfrost_device *pfdev, s32 id) in panfrost_model_cmp() argument
149 s32 match_id = pfdev->features.id; in panfrost_model_cmp()
156 static inline bool panfrost_model_is_bifrost(struct panfrost_device *pfdev) in panfrost_model_is_bifrost() argument
158 return panfrost_model_cmp(pfdev, 0x1000) >= 0; in panfrost_model_is_bifrost()
161 static inline bool panfrost_model_eq(struct panfrost_device *pfdev, s32 id) in panfrost_model_eq() argument
163 return !panfrost_model_cmp(pfdev, id); in panfrost_model_eq()
168 int panfrost_device_init(struct panfrost_device *pfdev);
[all …]
Dpanfrost_gpu.h10 int panfrost_gpu_init(struct panfrost_device *pfdev);
11 void panfrost_gpu_fini(struct panfrost_device *pfdev);
13 u32 panfrost_gpu_get_latest_flush_id(struct panfrost_device *pfdev);
15 int panfrost_gpu_soft_reset(struct panfrost_device *pfdev);
16 void panfrost_gpu_power_on(struct panfrost_device *pfdev);
17 void panfrost_gpu_power_off(struct panfrost_device *pfdev);
19 void panfrost_gpu_amlogic_quirk(struct panfrost_device *pfdev);
Dpanfrost_mmu.h14 int panfrost_mmu_init(struct panfrost_device *pfdev);
15 void panfrost_mmu_fini(struct panfrost_device *pfdev);
16 void panfrost_mmu_reset(struct panfrost_device *pfdev);
18 u32 panfrost_mmu_as_get(struct panfrost_device *pfdev, struct panfrost_mmu *mmu);
19 void panfrost_mmu_as_put(struct panfrost_device *pfdev, struct panfrost_mmu *mmu);
23 struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev);
Dpanfrost_job.h19 struct panfrost_device *pfdev; member
43 int panfrost_job_init(struct panfrost_device *pfdev);
44 void panfrost_job_fini(struct panfrost_device *pfdev);
49 void panfrost_job_enable_interrupts(struct panfrost_device *pfdev);
50 int panfrost_job_is_idle(struct panfrost_device *pfdev);
Dpanfrost_perfcnt.h8 void panfrost_perfcnt_sample_done(struct panfrost_device *pfdev);
9 void panfrost_perfcnt_clean_cache_done(struct panfrost_device *pfdev);
10 int panfrost_perfcnt_init(struct panfrost_device *pfdev);
11 void panfrost_perfcnt_fini(struct panfrost_device *pfdev);
Dpanfrost_devfreq.h33 int panfrost_devfreq_init(struct panfrost_device *pfdev);
34 void panfrost_devfreq_fini(struct panfrost_device *pfdev);
36 void panfrost_devfreq_resume(struct panfrost_device *pfdev);
37 void panfrost_devfreq_suspend(struct panfrost_device *pfdev);
Dpanfrost_gem.c20 struct panfrost_device *pfdev = obj->dev->dev_private; in panfrost_gem_free_object() local
28 mutex_lock(&pfdev->shrinker_lock); in panfrost_gem_free_object()
30 mutex_unlock(&pfdev->shrinker_lock); in panfrost_gem_free_object()
44 dma_unmap_sgtable(pfdev->dev, &bo->sgts[i], in panfrost_gem_free_object()
219 struct panfrost_device *pfdev = dev->dev_private; in panfrost_gem_create_object() local
229 obj->base.map_cached = pfdev->coherent; in panfrost_gem_create_object()
Dpanfrost_issues.h251 static inline bool panfrost_has_hw_issue(struct panfrost_device *pfdev, in panfrost_has_hw_issue() argument
254 return test_bit(issue, pfdev->features.hw_issues); in panfrost_has_hw_issue()
Dpanfrost_features.h303 static inline bool panfrost_has_hw_feature(struct panfrost_device *pfdev, in panfrost_has_hw_feature() argument
306 return test_bit(feat, pfdev->features.hw_features); in panfrost_has_hw_feature()
/kernel/linux/linux-5.10/drivers/media/pci/ddbridge/
Dddbridge.h321 struct platform_device *pfdev; member
/kernel/linux/patches/linux-5.10/yangfan_patch/
Ddrivers.patch16277 - struct panfrost_device *pfdev;
16344 panfrost_priv->pfdev = pfdev;
16347 - panfrost_priv->mmu = panfrost_mmu_ctx_create(pfdev);
16459 - cfg = panfrost_mmu_as_get(pfdev, job->file_priv->mmu);
16460 + cfg = panfrost_mmu_as_get(pfdev, &job->file_priv->mmu);
16462 job_write(pfdev, JS_HEAD_NEXT_LO(js), jc_head & 0xFFFFFFFF);
16463 job_write(pfdev, JS_HEAD_NEXT_HI(js), jc_head >> 32);
16466 pfdev->jobs[j] = NULL;
16468 - panfrost_mmu_as_put(pfdev, job->file_priv->mmu);
16469 + panfrost_mmu_as_put(pfdev, &job->file_priv->mmu);
[all …]
/kernel/linux/patches/linux-5.10/unionpi_tiger_pacth/
Dlinux-5.10.patch9957 panfrost_devfreq_record_busy(&pfdev->pfdevfreq);
9959 - ret = pm_runtime_get_sync(pfdev->dev);
9960 + ret = pm_runtime_resume_and_get(pfdev->dev);
9969 struct panfrost_device *pfdev = data;
9970 u32 status = mmu_read(pfdev, MMU_INT_RAWSTAT);
9988 - fault_status = mmu_read(pfdev, AS_FAULTSTATUS(i));
9989 - addr = mmu_read(pfdev, AS_FAULTADDRESS_LO(i));
9990 - addr |= (u64)mmu_read(pfdev, AS_FAULTADDRESS_HI(i)) << 32;
9991 + fault_status = mmu_read(pfdev, AS_FAULTSTATUS(as));
9992 + addr = mmu_read(pfdev, AS_FAULTADDRESS_LO(as));
[all …]