diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2020-04-20 18:50:17 -0500 |
---|---|---|
committer | Matt DeVillier <matt.devillier@gmail.com> | 2020-04-28 08:01:50 +0000 |
commit | 168d8a49b60d54ab4692e83de2439f5fd573cd82 (patch) | |
tree | 7a7ecce47cce081cbfb312b56a448cce73e67a92 /src/drivers | |
parent | b4a0ec52842d28f1dc6e30d37672935501da0fa2 (diff) |
drivers/intel/gma: put controller in separate header
Including i915.h just for the GMA/SSDT related functions means
dragging along all of i915_reg.h as well, which is problematic
since some platforms (like Apollo Lake) use overlapping symbols.
To avoid this conflict, break out the GMA/SSDT bits into their
own header which can be included without conflict.
Change-Id: I73fb7ef01abaafdcdbc44f1e3f5eb1883fc31616
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40592
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/intel/gma/gma.h | 22 | ||||
-rw-r--r-- | src/drivers/intel/gma/i915.h | 16 |
2 files changed, 23 insertions, 15 deletions
diff --git a/src/drivers/intel/gma/gma.h b/src/drivers/intel/gma/gma.h new file mode 100644 index 0000000000..7d20e6beff --- /dev/null +++ b/src/drivers/intel/gma/gma.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* This file is part of the coreboot project. */ + +#ifndef _GMA_H_ +#define _GMA_H_ + +#include <stdint.h> + +struct i915_gpu_controller_info { + int use_spread_spectrum_clock; + int ndid; + u32 did[5]; +}; + +#define GMA_STATIC_DISPLAYS(ssc) { \ + .use_spread_spectrum_clock = (ssc), \ + .ndid = 3, .did = { 0x0100, 0x0240, 0x0410, } \ +} + +void drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *conf); + +#endif diff --git a/src/drivers/intel/gma/i915.h b/src/drivers/intel/gma/i915.h index f8721a2fa9..e18c795672 100644 --- a/src/drivers/intel/gma/i915.h +++ b/src/drivers/intel/gma/i915.h @@ -6,6 +6,7 @@ #include <drivers/intel/gma/i915_reg.h> #include <drivers/intel/gma/drm_dp_helper.h> +#include <drivers/intel/gma/gma.h> #include <edid.h> /* port types. We stick with the same defines as the kernel */ @@ -75,21 +76,6 @@ int gtt_poll(u32 reg, u32 mask, u32 value); void gtt_write(u32 reg, u32 data); u32 gtt_read(u32 reg); -struct i915_gpu_controller_info -{ - int use_spread_spectrum_clock; - int ndid; - u32 did[5]; -}; - -#define GMA_STATIC_DISPLAYS(ssc) { \ - .use_spread_spectrum_clock = (ssc), \ - .ndid = 3, .did = { 0x0100, 0x0240, 0x0410, } \ -} - -void -drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *conf); - /* vbt.c */ struct device; void |