mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 16:09:57 +07:00
drm/i915: Introduce struct intel_gt as replacement for anonymous i915->gt
We have long been slighlty annoyed by the anonymous i915->gt. Promote it to a separate structure and give it its own header. This is a first step towards cleaning up the separation between i915 and gt. v2: * Adjust SPDX header. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190621070811.7006-2-tvrtko.ursulin@linux.intel.com
This commit is contained in:
parent
3cb4ce0024
commit
e5be5c7a8f
52
drivers/gpu/drm/i915/gt/intel_gt_types.h
Normal file
52
drivers/gpu/drm/i915/gt/intel_gt_types.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright © 2019 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __INTEL_GT_TYPES__
|
||||
#define __INTEL_GT_TYPES__
|
||||
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "i915_vma.h"
|
||||
#include "intel_wakeref.h"
|
||||
|
||||
struct intel_gt {
|
||||
struct i915_gt_timelines {
|
||||
struct mutex mutex; /* protects list, tainted by GPU */
|
||||
struct list_head active_list;
|
||||
|
||||
/* Pack multiple timelines' seqnos into the same page */
|
||||
spinlock_t hwsp_lock;
|
||||
struct list_head hwsp_free_list;
|
||||
} timelines;
|
||||
|
||||
struct list_head active_rings;
|
||||
|
||||
struct intel_wakeref wakeref;
|
||||
|
||||
struct list_head closed_vma;
|
||||
spinlock_t closed_lock; /* guards the list of closed_vma */
|
||||
|
||||
/**
|
||||
* Is the GPU currently considered idle, or busy executing
|
||||
* userspace requests? Whilst idle, we allow runtime power
|
||||
* management to power down the hardware and display clocks.
|
||||
* In order to reduce the effect on performance, there
|
||||
* is a slight delay before we do so.
|
||||
*/
|
||||
intel_wakeref_t awake;
|
||||
|
||||
struct blocking_notifier_head pm_notifications;
|
||||
|
||||
ktime_t last_init_time;
|
||||
|
||||
struct i915_vma *scratch;
|
||||
};
|
||||
|
||||
#endif /* __INTEL_GT_TYPES_H__ */
|
@ -72,6 +72,7 @@
|
||||
|
||||
#include "gt/intel_lrc.h"
|
||||
#include "gt/intel_engine.h"
|
||||
#include "gt/intel_gt_types.h"
|
||||
#include "gt/intel_workarounds.h"
|
||||
|
||||
#include "intel_device_info.h"
|
||||
@ -1824,38 +1825,7 @@ struct drm_i915_private {
|
||||
} perf;
|
||||
|
||||
/* Abstract the submission mechanism (legacy ringbuffer or execlists) away */
|
||||
struct {
|
||||
struct i915_gt_timelines {
|
||||
struct mutex mutex; /* protects list, tainted by GPU */
|
||||
struct list_head active_list;
|
||||
|
||||
/* Pack multiple timelines' seqnos into the same page */
|
||||
spinlock_t hwsp_lock;
|
||||
struct list_head hwsp_free_list;
|
||||
} timelines;
|
||||
|
||||
struct list_head active_rings;
|
||||
|
||||
struct intel_wakeref wakeref;
|
||||
|
||||
struct list_head closed_vma;
|
||||
spinlock_t closed_lock; /* guards the list of closed_vma */
|
||||
|
||||
/**
|
||||
* Is the GPU currently considered idle, or busy executing
|
||||
* userspace requests? Whilst idle, we allow runtime power
|
||||
* management to power down the hardware and display clocks.
|
||||
* In order to reduce the effect on performance, there
|
||||
* is a slight delay before we do so.
|
||||
*/
|
||||
intel_wakeref_t awake;
|
||||
|
||||
struct blocking_notifier_head pm_notifications;
|
||||
|
||||
ktime_t last_init_time;
|
||||
|
||||
struct i915_vma *scratch;
|
||||
} gt;
|
||||
struct intel_gt gt;
|
||||
|
||||
struct {
|
||||
struct notifier_block pm_notifier;
|
||||
|
Loading…
Reference in New Issue
Block a user