xref: /aosp_15_r20/external/mesa3d/src/intel/decoder/intel_batch_decoder_stub.c (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2021 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 #include "intel_decoder.h"
25 #include "util/log.h"
26 
27 void
intel_batch_decode_ctx_init_brw(struct intel_batch_decode_ctx * ctx,const struct brw_isa_info * isa,const struct intel_device_info * devinfo,FILE * fp,enum intel_batch_decode_flags flags,const char * xml_path,struct intel_batch_decode_bo (* get_bo)(void *,bool,uint64_t),unsigned (* get_state_size)(void *,uint64_t,uint64_t),void * user_data)28 intel_batch_decode_ctx_init_brw(struct intel_batch_decode_ctx *ctx,
29                                 const struct brw_isa_info *isa,
30                                 const struct intel_device_info *devinfo,
31                                 FILE *fp, enum intel_batch_decode_flags flags,
32                                 const char *xml_path,
33                                 struct intel_batch_decode_bo (*get_bo)(void *,
34                                                                        bool,
35                                                                        uint64_t),
36                                 unsigned (*get_state_size)(void *, uint64_t,
37                                                            uint64_t),
38                                 void *user_data)
39 {
40    /* Clear ctx to play safe. */
41    memset(ctx, 0, sizeof(*ctx));
42 }
43 
44 void
intel_batch_decode_ctx_init_elk(struct intel_batch_decode_ctx * ctx,const struct elk_isa_info * isa,const struct intel_device_info * devinfo,FILE * fp,enum intel_batch_decode_flags flags,const char * xml_path,struct intel_batch_decode_bo (* get_bo)(void *,bool,uint64_t),unsigned (* get_state_size)(void *,uint64_t,uint64_t),void * user_data)45 intel_batch_decode_ctx_init_elk(struct intel_batch_decode_ctx *ctx,
46                                 const struct elk_isa_info *isa,
47                                 const struct intel_device_info *devinfo,
48                                 FILE *fp, enum intel_batch_decode_flags flags,
49                                 const char *xml_path,
50                                 struct intel_batch_decode_bo (*get_bo)(void *,
51                                                                        bool,
52                                                                        uint64_t),
53                                 unsigned (*get_state_size)(void *, uint64_t,
54                                                            uint64_t),
55                                 void *user_data)
56 {
57    /* Clear ctx to play safe. */
58    memset(ctx, 0, sizeof(*ctx));
59 }
60 
61 void
intel_batch_decode_ctx_finish(struct intel_batch_decode_ctx * ctx)62 intel_batch_decode_ctx_finish(struct intel_batch_decode_ctx *ctx)
63 {
64 }
65 
66 void
intel_print_batch(struct intel_batch_decode_ctx * ctx,const uint32_t * batch,uint32_t batch_size,uint64_t batch_addr,bool from_ring)67 intel_print_batch(struct intel_batch_decode_ctx *ctx,
68                   const uint32_t *batch, uint32_t batch_size,
69                   uint64_t batch_addr, bool from_ring)
70 {
71    mesa_logw("Batch logging not supported on Android.");
72 }
73 
74 void
intel_batch_stats_reset(struct intel_batch_decode_ctx * ctx)75 intel_batch_stats_reset(struct intel_batch_decode_ctx *ctx)
76 {
77 }
78 
79 void
intel_batch_stats(struct intel_batch_decode_ctx * ctx,const uint32_t * batch,uint32_t batch_size,uint64_t batch_addr,bool from_ring)80 intel_batch_stats(struct intel_batch_decode_ctx *ctx,
81                   const uint32_t *batch, uint32_t batch_size,
82                   uint64_t batch_addr, bool from_ring)
83 {
84 }
85 
86 void
intel_batch_print_stats(struct intel_batch_decode_ctx * ctx)87 intel_batch_print_stats(struct intel_batch_decode_ctx *ctx)
88 {
89    mesa_logw("Batch logging not supported on Android.");
90 }
91