Skip to content

Commit 3af06b3

Browse files
committed
soc/intel/alderlake: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with Kconfig values for accessing the registers. Tested by adding gfx register on system76/lemp11 and booting Windows. Display settings has a brightness setting, and can change the brightness level. Change-Id: Ia29fb2adde1ec90ed8b0757a4d81e54240ee7575 Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent a3b0137 commit 3af06b3

4 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/soc/intel/alderlake/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,4 +447,16 @@ config BUILDING_WITH_DEBUG_FSP
447447
help
448448
Set this option if debug build of FSP is used.
449449

450+
config INTEL_GMA_BCLV_OFFSET
451+
default 0xc8258
452+
453+
config INTEL_GMA_BCLV_WIDTH
454+
default 32
455+
456+
config INTEL_GMA_BCLM_OFFSET
457+
default 0xc8254
458+
459+
config INTEL_GMA_BCLM_WIDTH
460+
default 32
461+
450462
endif

src/soc/intel/alderlake/Makefile.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ramstage-y += elog.c
3131
ramstage-y += espi.c
3232
ramstage-y += finalize.c
3333
ramstage-y += fsp_params.c
34+
ramstage-y += graphics.c
3435
ramstage-y += hsphy.c
3536
ramstage-y += lockdown.c
3637
ramstage-y += me.c

src/soc/intel/alderlake/chip.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define _SOC_CHIP_H_
55

66
#include <drivers/i2c/designware/dw_i2c.h>
7+
#include <drivers/intel/gma/gma.h>
78
#include <device/pci_ids.h>
89
#include <intelblocks/cfg.h>
910
#include <intelblocks/gpio.h>
@@ -637,6 +638,9 @@ struct soc_intel_alderlake_config {
637638
* Set this to 1 in order to disable Package C-state demotion.
638639
*/
639640
bool disable_package_c_state_demotion;
641+
642+
/* i915 struct for GMA backlight control */
643+
struct i915_gpu_controller_info gfx;
640644
};
641645

642646
typedef struct soc_intel_alderlake_config config_t;

src/soc/intel/alderlake/graphics.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
2+
#include <intelblocks/graphics.h>
3+
#include <soc/ramstage.h>
4+
const struct i915_gpu_controller_info *
5+
intel_igd_get_controller_info(const struct device *const dev)
6+
{
7+
const struct soc_intel_alderlake_config *const chip = dev->chip_info;
8+
return &chip->gfx;
9+
}

0 commit comments

Comments
 (0)