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 13
13
* Display engines requiring physically contiguous allocations should
14
14
* look into Mesa's "renderonly" support (as used by the Mesa pl111
15
15
* 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.
20
16
*/
21
17
22
18
#include <linux/dma-buf.h>
Original file line number Diff line number Diff line change 4
4
/**
5
5
* DOC: Broadcom V3D MMU
6
6
*
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
8
8
* a single level of page tables for the V3D's 4GB address space to
9
9
* map to AXI bus addresses, thus it could need up to 4MB of
10
10
* physically contiguous memory to store the PTEs.
15
15
*
16
16
* To protect clients from each other, we should use the GMP to
17
17
* 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.
19
19
*/
20
20
21
21
#include "v3d_drv.h"
22
22
#include "v3d_regs.h"
23
23
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.
26
26
*/
27
27
#define V3D_PTE_SUPERPAGE BIT(31)
28
28
#define V3D_PTE_BIGPAGE BIT(30)
Original file line number Diff line number Diff line change 2
2
/*
3
3
* Copyright (C) 2024 Raspberry Pi
4
4
*/
5
+
5
6
#ifndef V3D_PERFORMANCE_COUNTERS_H
6
7
#define V3D_PERFORMANCE_COUNTERS_H
7
8
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`.
10
11
*/
11
12
struct v3d_perf_counter_desc {
12
13
/* Category of the counter */
@@ -20,15 +21,12 @@ struct v3d_perf_counter_desc {
20
21
};
21
22
22
23
struct v3d_perfmon_info {
23
- /*
24
- * Different revisions of V3D have different total number of
24
+ /* Different revisions of V3D have different total number of
25
25
* performance counters.
26
26
*/
27
27
unsigned int max_counters ;
28
28
29
- /*
30
- * Array of counters valid for the platform.
31
- */
29
+ /* Array of counters valid for the platform. */
32
30
const struct v3d_perf_counter_desc * counters ;
33
31
};
34
32
Original file line number Diff line number Diff line change 5
5
* DOC: Broadcom V3D scheduling
6
6
*
7
7
* 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 .
11
11
*
12
12
* For simplicity, and in order to keep latency low for interactive
13
13
* jobs when bulk background jobs are queued up, we submit a new job
14
14
* 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
18
18
* semaphores to interlock between them.
19
19
*/
20
20
Original file line number Diff line number Diff line change @@ -52,10 +52,11 @@ v3d_clock_up_put(struct v3d_dev *v3d)
52
52
}
53
53
54
54
/* 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.
56
57
*
57
58
* 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
59
60
* to v3d, so we don't attach dma-buf fences to them.
60
61
*/
61
62
static int
@@ -96,11 +97,11 @@ v3d_lock_bo_reservations(struct v3d_job *job,
96
97
* @bo_count: Number of GEM handles passed in
97
98
*
98
99
* 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
100
101
* BO list and reference counting for the lifetime of the job.
101
102
*
102
103
* 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()` .
104
105
*/
105
106
static int
106
107
v3d_lookup_bos (struct drm_device * dev ,
You can’t perform that action at this time.
0 commit comments