mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Matt Roper](/assets/img/avatar_default.png)
Several of our i915 header files, have been including i915_reg.h. This means that any change to i915_reg.h will trigger a full rebuild of pretty much every file of the driver, even those that don't have any kind of register access. Let's delete the i915_reg.h include from all headers and add an explicit include from the .c files that truly need the register definitions; those that need a definition of i915_reg_t for a function definition can get it from i915_reg_defs.h instead. We also remove two non-register #define's (VLV_DISPLAY_BASE and GEN12_SFC_DONE_MAX) into i915_reg_defs.h to allow us to drop the i915_reg.h include from a couple of headers. There's probably a lot more header dependency optimization possible, but the changes here roughly cut the number of files compiled after 'touch i915_reg.h' in half --- a good first step. Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-7-matthew.d.roper@intel.com
58 lines
1.3 KiB
C
58 lines
1.3 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_DMC_H__
|
|
#define __INTEL_DMC_H__
|
|
|
|
#include "i915_reg_defs.h"
|
|
#include "intel_wakeref.h"
|
|
#include <linux/workqueue.h>
|
|
|
|
struct drm_i915_private;
|
|
|
|
#define DMC_VERSION(major, minor) ((major) << 16 | (minor))
|
|
#define DMC_VERSION_MAJOR(version) ((version) >> 16)
|
|
#define DMC_VERSION_MINOR(version) ((version) & 0xffff)
|
|
|
|
enum {
|
|
DMC_FW_MAIN = 0,
|
|
DMC_FW_PIPEA,
|
|
DMC_FW_PIPEB,
|
|
DMC_FW_PIPEC,
|
|
DMC_FW_PIPED,
|
|
DMC_FW_MAX
|
|
};
|
|
|
|
struct intel_dmc {
|
|
struct work_struct work;
|
|
const char *fw_path;
|
|
u32 required_version;
|
|
u32 max_fw_size; /* bytes */
|
|
u32 version;
|
|
struct dmc_fw_info {
|
|
u32 mmio_count;
|
|
i915_reg_t mmioaddr[20];
|
|
u32 mmiodata[20];
|
|
u32 dmc_offset;
|
|
u32 start_mmioaddr;
|
|
u32 dmc_fw_size; /*dwords */
|
|
u32 *payload;
|
|
bool present;
|
|
} dmc_info[DMC_FW_MAX];
|
|
|
|
u32 dc_state;
|
|
u32 target_dc_state;
|
|
u32 allowed_dc_mask;
|
|
intel_wakeref_t wakeref;
|
|
};
|
|
|
|
void intel_dmc_ucode_init(struct drm_i915_private *i915);
|
|
void intel_dmc_load_program(struct drm_i915_private *i915);
|
|
void intel_dmc_ucode_fini(struct drm_i915_private *i915);
|
|
void intel_dmc_ucode_suspend(struct drm_i915_private *i915);
|
|
void intel_dmc_ucode_resume(struct drm_i915_private *i915);
|
|
bool intel_dmc_has_payload(struct drm_i915_private *i915);
|
|
|
|
#endif /* __INTEL_DMC_H__ */
|