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