Skip to content

Commit

Permalink
mb/system76: Add custom backlight levels for Intel GMA
Browse files Browse the repository at this point in the history
Add custom backlight levels for all models except:

- addw1
- bonw14: Does not use the iGPU

Change-Id: Ibea37f19acca0d718211fc41706019a92a240c70
Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Jan 23, 2023
1 parent 8414aa8 commit 779872f
Show file tree
Hide file tree
Showing 23 changed files with 273 additions and 7 deletions.
31 changes: 31 additions & 0 deletions src/mainboard/system76/cml-u/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/cml-u/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

Scope (\_GPE) {
Expand Down
1 change: 0 additions & 1 deletion src/mainboard/system76/cml-u/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ DefinitionBlock(
{
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/gaze15/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/gaze15/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

Scope (\_GPE) {
Expand Down
1 change: 0 additions & 1 deletion src/mainboard/system76/gaze15/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ DefinitionBlock(
Device (\_SB.PCI0) {
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/kbl-u/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
4 changes: 4 additions & 0 deletions src/mainboard/system76/kbl-u/acpi/mainboard.asl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */

Scope (\_SB) {
Scope (PCI0) {
#include "backlight.asl"
}

#include "ac.asl"
#include "battery.asl"
#include "buttons.asl"
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/oryp5/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/oryp5/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
Scope (\_SB)
{
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

Scope (\_GPE)
Expand Down
1 change: 0 additions & 1 deletion src/mainboard/system76/oryp5/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ DefinitionBlock(
{
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/oryp6/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/oryp6/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

Scope (\_GPE) {
Expand Down
1 change: 0 additions & 1 deletion src/mainboard/system76/oryp6/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ DefinitionBlock(
Device (\_SB.PCI0) {
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/tgl-h/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/tgl-h/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}
1 change: 0 additions & 1 deletion src/mainboard/system76/tgl-h/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DefinitionBlock(
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/tigerlake/acpi/southbridge.asl>
#include <soc/intel/tigerlake/acpi/tcss.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/tgl-u/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/tgl-u/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}
1 change: 0 additions & 1 deletion src/mainboard/system76/tgl-u/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DefinitionBlock(
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/tigerlake/acpi/southbridge.asl>
#include <soc/intel/tigerlake/acpi/tcss.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down
31 changes: 31 additions & 0 deletions src/mainboard/system76/whl-u/acpi/backlight.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/intel/gma/acpi/gma.asl>

Scope (GFX0)
{
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}
3 changes: 3 additions & 0 deletions src/mainboard/system76/whl-u/acpi/mainboard.asl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

Scope (\_GPE) {
Expand Down
1 change: 0 additions & 1 deletion src/mainboard/system76/whl-u/dsdt.asl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ DefinitionBlock(
{
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
#include <drivers/intel/gma/acpi/default_brightness_levels.asl>
}

#include <southbridge/intel/common/acpi/sleepstates.asl>
Expand Down

0 comments on commit 779872f

Please sign in to comment.