MAJOR=4
MINOR=50
DEVNAME=tty50
     ©ˆÑÐƒoÎ¿Ó     ©/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2018 Linaro Ltd
 *
 * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
 *
 */
#ifndef __IDLE_INJECT_H__
#define __IDLE_INJECT_H__

/* private idle injection device structure */
struct idle_inject_device;

struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);

struct idle_inject_device *idle_inject_register_full(struct cpumask *cpumask,
						     bool (*update)(void));

void idle_inject_unregister(struct idle_inject_device *ii_dev);

int idle_inject_start(struct idle_inject_device *ii_dev);

void idle_inject_stop(struct idle_inject_device *ii_dev);

void idle_inject_set_duration(struct idle_inject_device *ii_dev,
				 unsigned int run_duration_us,
				 unsigned int idle_duration_us);

void idle_inject_get_duration(struct idle_inject_device *ii_dev,
				 unsigned int *run_duration_us,
				 unsigned int *idle_duration_us);

void idle_inject_set_latency(struct idle_inject_device *ii_dev,
			     unsigned int latency_us);

#endif /* __IDLE_INJECT_H__ */
     «ˆÑÐƒyá=Î¿Ó "|    «/*
 * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs
 *
 * Copyright (c) 2010 Red Hat Inc.
 * Author : Dave Airlie <airlied@redhat.com>
 *
 * Copyright (c) 2015 Lukas Wunner <lukas@wunner.de>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS
 * IN THE SOFTWARE.
 *
 */

#ifndef _LINUX_VGA_SWITCHEROO_H_
#define _LINUX_VGA_SWITCHEROO_H_

#include <linux/fb.h>

struct pci_dev;

/**
 * enum vga_switcheroo_handler_flags_t - handler flags bitmask
 * @VGA_SWITCHEROO_CAN_SWITCH_DDC: whether the handler is able to switch the
 * 	DDC lines separately. This signals to clients that they should call
 * 	drm_get_edid_switcheroo() to probe the EDID
 * @VGA_SWITCHEROO_NEEDS_EDP_CONFIG: whether the handler is unable to switch
 * 	the AUX channel separately. This signals to clients that the active
 * 	GPU needs to train the link and communicate the link parameters to the
 * 	inactive GPU (mediated by vga_switcheroo). The inactive GPU may then
 * 	skip the AUX handshake and set up its output with these pre-calibrated
 * 	values (DisplayPort specification v1.1a, section 2.5.3.3)
 *
 * Handler flags bitmask. Used by handlers to declare their capabilities upon
 * registering with vga_switcheroo.
 */
enum vga_switcheroo_handler_flags_t {
	VGA_SWITCHEROO_CAN_SWITCH_DDC	= (1 << 0),
	VGA_SWITCHEROO_NEEDS_EDP_CONFIG	= (1 << 1),
};

/**
 * enum vga_switcheroo_state - client power state
 * @VGA_SWITCHEROO_OFF: off
 * @VGA_SWITCHEROO_ON: on
 * @VGA_SWITCHEROO_NOT_FOUND: client has not registered with vga_switcheroo.
 * 	Only used in vga_switcheroo_get_client_state() which in turn is only
 * 	called from hda_intel.c
 *
 * Client power state.
 */
enum vga_switcheroo_state {
	VGA_SWITCHEROO_OFF,
	VGA_SWITCHEROO_ON,
	/* below are referred only from vga_switcheroo_get_client_state() */
	VGA_SWITCHEROO_NOT_FOUND,
};

/**
 * enum vga_switcheroo_client_id - client identifier
 * @VGA_SWITCHEROO