xref: /openbsd-src/sys/dev/pci/drm/amd/display/include/irq_service_interface.h (revision fb4d85023675bc7da402da96b2bb84fd12905dbf)
1*fb4d8502Sjsg /*
2*fb4d8502Sjsg  * Copyright 2012-15 Advanced Micro Devices, Inc.
3*fb4d8502Sjsg  *
4*fb4d8502Sjsg  * Permission is hereby granted, free of charge, to any person obtaining a
5*fb4d8502Sjsg  * copy of this software and associated documentation files (the "Software"),
6*fb4d8502Sjsg  * to deal in the Software without restriction, including without limitation
7*fb4d8502Sjsg  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*fb4d8502Sjsg  * and/or sell copies of the Software, and to permit persons to whom the
9*fb4d8502Sjsg  * Software is furnished to do so, subject to the following conditions:
10*fb4d8502Sjsg  *
11*fb4d8502Sjsg  * The above copyright notice and this permission notice shall be included in
12*fb4d8502Sjsg  * all copies or substantial portions of the Software.
13*fb4d8502Sjsg  *
14*fb4d8502Sjsg  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*fb4d8502Sjsg  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*fb4d8502Sjsg  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*fb4d8502Sjsg  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*fb4d8502Sjsg  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*fb4d8502Sjsg  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*fb4d8502Sjsg  * OTHER DEALINGS IN THE SOFTWARE.
21*fb4d8502Sjsg  *
22*fb4d8502Sjsg  * Authors: AMD
23*fb4d8502Sjsg  *
24*fb4d8502Sjsg  */
25*fb4d8502Sjsg 
26*fb4d8502Sjsg #ifndef __DAL_IRQ_SERVICE_INTERFACE_H__
27*fb4d8502Sjsg #define __DAL_IRQ_SERVICE_INTERFACE_H__
28*fb4d8502Sjsg 
29*fb4d8502Sjsg struct irq_service_init_data {
30*fb4d8502Sjsg 	struct dc_context *ctx;
31*fb4d8502Sjsg };
32*fb4d8502Sjsg 
33*fb4d8502Sjsg struct irq_service;
34*fb4d8502Sjsg 
35*fb4d8502Sjsg void dal_irq_service_destroy(struct irq_service **irq_service);
36*fb4d8502Sjsg 
37*fb4d8502Sjsg bool dal_irq_service_set(
38*fb4d8502Sjsg 	struct irq_service *irq_service,
39*fb4d8502Sjsg 	enum dc_irq_source source,
40*fb4d8502Sjsg 	bool enable);
41*fb4d8502Sjsg 
42*fb4d8502Sjsg bool dal_irq_service_ack(
43*fb4d8502Sjsg 	struct irq_service *irq_service,
44*fb4d8502Sjsg 	enum dc_irq_source source);
45*fb4d8502Sjsg 
46*fb4d8502Sjsg enum dc_irq_source dal_irq_service_to_irq_source(
47*fb4d8502Sjsg 		struct irq_service *irq_service,
48*fb4d8502Sjsg 		uint32_t src_id,
49*fb4d8502Sjsg 		uint32_t ext_id);
50*fb4d8502Sjsg 
51*fb4d8502Sjsg #endif
52