File tree Expand file tree Collapse file tree 5 files changed +20
-25
lines changed
Expand file tree Collapse file tree 5 files changed +20
-25
lines changed Original file line number Diff line number Diff line change 1313 * Display engines requiring physically contiguous allocations should
1414 * look into Mesa's "renderonly" support (as used by the Mesa pl111
1515 * driver) for an example of how to integrate with V3D.
16- *
17- * Long term, we should support evicting pages from the MMU when under
18- * memory pressure (thus the v3d_bo_get_pages() refcounting), but
19- * that's not a high priority since our systems tend to not have swap.
2016 */
2117
2218#include <linux/dma-buf.h>
Original file line number Diff line number Diff line change 44/**
55 * DOC: Broadcom V3D MMU
66 *
7- * The V3D 3.x hardware (compared to VC4) now includes an MMU. It has
7+ * The V3D 3.x hardware (compared to VC4) now includes an MMU. It has
88 * a single level of page tables for the V3D's 4GB address space to
99 * map to AXI bus addresses, thus it could need up to 4MB of
1010 * physically contiguous memory to store the PTEs.
1515 *
1616 * To protect clients from each other, we should use the GMP to
1717 * quickly mask out (at 128kb granularity) what pages are available to
18- * each client. This is not yet implemented.
18+ * each client. This is not yet implemented.
1919 */
2020
2121#include "v3d_drv.h"
2222#include "v3d_regs.h"
2323
24- /* Note: All PTEs for the 1MB superpage must be filled with the
25- * superpage bit set.
24+ /* Note: All PTEs for the 64KB bigpage or 1MB superpage must be filled
25+ * with the bigpage/ superpage bit set.
2626 */
2727#define V3D_PTE_SUPERPAGE BIT(31)
2828#define V3D_PTE_BIGPAGE BIT(30)
Original file line number Diff line number Diff line change 22/*
33 * Copyright (C) 2024 Raspberry Pi
44 */
5+
56#ifndef V3D_PERFORMANCE_COUNTERS_H
67#define V3D_PERFORMANCE_COUNTERS_H
78
8- /* Holds a description of a given performance counter. The index of performance
9- * counter is given by the array on v3d_performance_counter.h
9+ /* Holds a description of a given performance counter. The index of
10+ * performance counter is given by the array on ` v3d_performance_counter.c`.
1011 */
1112struct v3d_perf_counter_desc {
1213 /* Category of the counter */
@@ -20,15 +21,12 @@ struct v3d_perf_counter_desc {
2021};
2122
2223struct v3d_perfmon_info {
23- /*
24- * Different revisions of V3D have different total number of
24+ /* Different revisions of V3D have different total number of
2525 * performance counters.
2626 */
2727 unsigned int max_counters ;
2828
29- /*
30- * Array of counters valid for the platform.
31- */
29+ /* Array of counters valid for the platform. */
3230 const struct v3d_perf_counter_desc * counters ;
3331};
3432
Original file line number Diff line number Diff line change 55 * DOC: Broadcom V3D scheduling
66 *
77 * The shared DRM GPU scheduler is used to coordinate submitting jobs
8- * to the hardware. Each DRM fd (roughly a client process) gets its
9- * own scheduler entity, which will process jobs in order. The GPU
10- * scheduler will round-robin between clients to submit the next job .
8+ * to the hardware. Each DRM fd (roughly a client process) gets its
9+ * own scheduler entity, which will process jobs in order. The GPU
10+ * scheduler will schedule the clients with a FIFO scheduling algorithm .
1111 *
1212 * For simplicity, and in order to keep latency low for interactive
1313 * jobs when bulk background jobs are queued up, we submit a new job
1414 * to the HW only when it has completed the last one, instead of
15- * filling up the CT[01]Q FIFOs with jobs. Similarly, we use
16- * drm_sched_job_add_dependency() to manage the dependency between bin and
17- * render, instead of having the clients submit jobs using the HW's
15+ * filling up the CT[01]Q FIFOs with jobs. Similarly, we use
16+ * ` drm_sched_job_add_dependency()` to manage the dependency between bin
17+ * and render, instead of having the clients submit jobs using the HW's
1818 * semaphores to interlock between them.
1919 */
2020
Original file line number Diff line number Diff line change @@ -52,10 +52,11 @@ v3d_clock_up_put(struct v3d_dev *v3d)
5252}
5353
5454/* Takes the reservation lock on all the BOs being referenced, so that
55- * at queue submit time we can update the reservations.
55+ * we can attach fences and update the reservations after pushing the job
56+ * to the queue.
5657 *
5758 * We don't lock the RCL the tile alloc/state BOs, or overflow memory
58- * (all of which are on exec ->unref_list). They're entirely private
59+ * (all of which are on render ->unref_list). They're entirely private
5960 * to v3d, so we don't attach dma-buf fences to them.
6061 */
6162static int
@@ -96,11 +97,11 @@ v3d_lock_bo_reservations(struct v3d_job *job,
9697 * @bo_count: Number of GEM handles passed in
9798 *
9899 * The command validator needs to reference BOs by their index within
99- * the submitted job's BO list. This does the validation of the job's
100+ * the submitted job's BO list. This does the validation of the job's
100101 * BO list and reference counting for the lifetime of the job.
101102 *
102103 * Note that this function doesn't need to unreference the BOs on
103- * failure, because that will happen at v3d_exec_cleanup() time .
104+ * failure, because that will happen at `v3d_job_free()` .
104105 */
105106static int
106107v3d_lookup_bos (struct drm_device * dev ,
You can’t perform that action at this time.
0 commit comments