brintos

brintos / linux-shallow public Read only

0
0
Text · 786 B · adab512 Raw
32 lines · c
1/* SPDX-License-Identifier: MIT */2/*3 * Copyright (C) 2024 Intel Corporation4 */5 6#ifndef __INTEL_WAKELOCK_H__7#define __INTEL_WAKELOCK_H__8 9#include <linux/types.h>10#include <linux/workqueue.h>11#include <linux/refcount.h>12 13#include "i915_reg_defs.h"14 15struct intel_display;16 17struct intel_dmc_wl {18	spinlock_t lock; /* protects enabled, taken  and refcount */19	bool enabled;20	bool taken;21	refcount_t refcount;22	struct delayed_work work;23};24 25void intel_dmc_wl_init(struct intel_display *display);26void intel_dmc_wl_enable(struct intel_display *display);27void intel_dmc_wl_disable(struct intel_display *display);28void intel_dmc_wl_get(struct intel_display *display, i915_reg_t reg);29void intel_dmc_wl_put(struct intel_display *display, i915_reg_t reg);30 31#endif /* __INTEL_WAKELOCK_H__ */32