projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/i915/guc: Start protecting access to CTB descriptors
[linux-2.6-microblaze.git]
/
drivers
/
gpu
/
drm
/
i915
/
gt
/
uc
/
intel_guc_ct.h
diff --git
a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
index
494a51a
..
bc52dc4
100644
(file)
--- a/
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
+++ b/
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
@@
-27,12
+27,16
@@
struct intel_guc;
* record (command transport buffer descriptor) and the actual buffer which
* holds the commands.
*
* record (command transport buffer descriptor) and the actual buffer which
* holds the commands.
*
+ * @lock: protects access to the commands buffer and buffer descriptor
* @desc: pointer to the buffer descriptor
* @cmds: pointer to the commands buffer
* @desc: pointer to the buffer descriptor
* @cmds: pointer to the commands buffer
+ * @size: size of the commands buffer
*/
struct intel_guc_ct_buffer {
*/
struct intel_guc_ct_buffer {
+ spinlock_t lock;
struct guc_ct_buffer_desc *desc;
u32 *cmds;
struct guc_ct_buffer_desc *desc;
u32 *cmds;
+ u32 size;
};
};
@@
-45,8
+49,11
@@
struct intel_guc_ct {
struct i915_vma *vma;
bool enabled;
struct i915_vma *vma;
bool enabled;
- /* buffers for sending(0) and receiving(1) commands */
- struct intel_guc_ct_buffer ctbs[2];
+ /* buffers for sending and receiving commands */
+ struct {
+ struct intel_guc_ct_buffer send;
+ struct intel_guc_ct_buffer recv;
+ } ctbs;
struct {
u32 last_fence; /* last fence used to send request */
struct {
u32 last_fence; /* last fence used to send request */