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
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
/* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _INTEL_DSB_H
|
|
#define _INTEL_DSB_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "i915_reg_defs.h"
|
|
|
|
struct intel_crtc_state;
|
|
struct i915_vma;
|
|
|
|
enum dsb_id {
|
|
INVALID_DSB = -1,
|
|
DSB1,
|
|
DSB2,
|
|
DSB3,
|
|
MAX_DSB_PER_PIPE
|
|
};
|
|
|
|
struct intel_dsb {
|
|
enum dsb_id id;
|
|
u32 *cmd_buf;
|
|
struct i915_vma *vma;
|
|
|
|
/*
|
|
* free_pos will point the first free entry position
|
|
* and help in calculating tail of command buffer.
|
|
*/
|
|
int free_pos;
|
|
|
|
/*
|
|
* ins_start_offset will help to store start address of the dsb
|
|
* instuction and help in identifying the batch of auto-increment
|
|
* register.
|
|
*/
|
|
u32 ins_start_offset;
|
|
};
|
|
|
|
void intel_dsb_prepare(struct intel_crtc_state *crtc_state);
|
|
void intel_dsb_cleanup(struct intel_crtc_state *crtc_state);
|
|
void intel_dsb_reg_write(const struct intel_crtc_state *crtc_state,
|
|
i915_reg_t reg, u32 val);
|
|
void intel_dsb_indexed_reg_write(const struct intel_crtc_state *crtc_state,
|
|
i915_reg_t reg, u32 val);
|
|
void intel_dsb_commit(const struct intel_crtc_state *crtc_state);
|
|
|
|
#endif
|