Merge branches 'fixes' and 'misc' into for-linus
[linux-2.6-microblaze.git] / drivers / gpu / drm / nouveau / dispnv50 / crcc37d.h
1 /* SPDX-License-Identifier: MIT */
2
3 #ifndef __CRCC37D_H__
4 #define __CRCC37D_H__
5
6 #include <linux/types.h>
7
8 #include "crc.h"
9
10 #define CRCC37D_MAX_ENTRIES 2047
11 #define CRCC37D_FLIP_THRESHOLD (CRCC37D_MAX_ENTRIES - 30)
12
13 struct crcc37d_notifier {
14         u32 status;
15
16         /* reserved */
17         u32:32;
18         u32:32;
19         u32:32;
20         u32:32;
21         u32:32;
22         u32:32;
23         u32:32;
24
25         struct crcc37d_entry {
26                 u32 status[2];
27                 u32:32; /* reserved */
28                 u32 compositor_crc;
29                 u32 rg_crc;
30                 u32 output_crc[2];
31                 u32:32; /* reserved */
32         } entries[CRCC37D_MAX_ENTRIES];
33 } __packed;
34
35 int crcc37d_set_ctx(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx);
36 u32 crcc37d_get_entry(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx,
37                       enum nv50_crc_source source, int idx);
38 bool crcc37d_ctx_finished(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx);
39
40 #endif /* !__CRCC37D_H__ */