soc/intel/baytrail: add ACPI backlight support
Add hook to generate ACPI methods in SSDT for screen backlight control. To make use of this, individual boards will need to include default_brightness_levels.asl in their dsdt, as well as add 'register "gfx" = "GMA_STATIC_DISPLAYS(0)"' to their devicetree. Change-Id: I0b7fc45bda3aaf89306bedb579fb1e9f8ce07926 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39942 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
a372f8ae86
commit
c72f5f74a8
|
@ -18,6 +18,7 @@
|
||||||
#ifndef _BAYTRAIL_CHIP_H_
|
#ifndef _BAYTRAIL_CHIP_H_
|
||||||
#define _BAYTRAIL_CHIP_H_
|
#define _BAYTRAIL_CHIP_H_
|
||||||
|
|
||||||
|
#include <drivers/intel/gma/i915.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
struct soc_intel_baytrail_config {
|
struct soc_intel_baytrail_config {
|
||||||
|
@ -84,6 +85,8 @@ struct soc_intel_baytrail_config {
|
||||||
uint16_t gpu_pipeb_power_cycle_delay;
|
uint16_t gpu_pipeb_power_cycle_delay;
|
||||||
int gpu_pipeb_pwm_freq_hz;
|
int gpu_pipeb_pwm_freq_hz;
|
||||||
int disable_ddr_2x_refresh_rate;
|
int disable_ddr_2x_refresh_rate;
|
||||||
|
|
||||||
|
struct i915_gpu_controller_info gfx;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _BAYTRAIL_CHIP_H_ */
|
#endif /* _BAYTRAIL_CHIP_H_ */
|
||||||
|
|
|
@ -397,6 +397,13 @@ static void gfx_init(struct device *dev)
|
||||||
intel_gma_restore_opregion();
|
intel_gma_restore_opregion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gma_generate_ssdt(struct device *dev)
|
||||||
|
{
|
||||||
|
const struct soc_intel_baytrail_config *chip = dev->chip_info;
|
||||||
|
|
||||||
|
drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
gma_write_acpi_tables(struct device *const dev,
|
gma_write_acpi_tables(struct device *const dev,
|
||||||
unsigned long current,
|
unsigned long current,
|
||||||
|
@ -430,6 +437,7 @@ static struct device_operations gfx_device_ops = {
|
||||||
.init = gfx_init,
|
.init = gfx_init,
|
||||||
.ops_pci = &soc_pci_ops,
|
.ops_pci = &soc_pci_ops,
|
||||||
.write_acpi_tables = gma_write_acpi_tables,
|
.write_acpi_tables = gma_write_acpi_tables,
|
||||||
|
.acpi_fill_ssdt = gma_generate_ssdt,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct pci_driver gfx_driver __pci_driver = {
|
static const struct pci_driver gfx_driver __pci_driver = {
|
||||||
|
|
Loading…
Reference in New Issue