New laptop for me

@TmTFx, would you mind sharing a patch with the changes you made for your “UHD Graphics 600” to be recognized?

(I managed to make it publish a /dev/graphics/intel_extreme_000200 device for mine, but Screen still shows Framebuffer being used :smiley:).

Thanks in advance!

Well, it looks nice to see “Gemini Lake” or UHD Graphics 600 in Screen preflet BUT the results are limited to that. When I change resolution I get blank screen. I’ll look into what I changed (very minor changes, just PCI IDs and something like that), hoping I’ve not deleted the folder.

If I remember, I added 2 lines in src/add-ons/kernel/drivers/graphics/intel_Extreme/driver.cpp one for my GeminiLake card, one for the other one of the same family
and one line in src/add-ons/kernel/busses/agp_gart/intel_gart.cpp, adding only my card (as I don’t know the other card data)

here my git diff:

diff --git a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
index c1f54660..c7e1d665 100644
--- a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
+++ b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
@@ -188,6 +188,8 @@ const struct supported_device {
 	{0x3ec4, 0x3eab, INTEL_MODEL_CFLM, "CoffeeLake Halo GT2"},
 	{0x3ed0, 0x3ea5, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
 	{0x3ed0, 0x3ea6, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
+	
+	{0x31f0, 0x3185, INTEL_MODEL_CFL,  "GeminiLake GT1"},
 
 	{0x9b64, 0x9ba4, INTEL_MODEL_CML,	"CometLake GT1"},
 	{0x9b73, 0x9ba8, INTEL_MODEL_CML,	"CometLake GT1"},
diff --git a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
index f1981e73..dc01e835 100644
--- a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
+++ b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
@@ -172,6 +172,9 @@ const struct supported_device {
 	{0x3eab, INTEL_MODEL_CFLM, "CoffeeLake Halo GT2"},
 	{0x3ea5, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
 	{0x3ea6, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
+	
+	{0x3185, INTEL_MODEL_CFL, "GeminiLake GT1"},
+	{0x3184, INTEL_MODEL_CFL, "GeminiLake GT1.5"},
 
 	{0x9ba4, INTEL_MODEL_CML,	"CometLake GT1"},
 	{0x9ba8, INTEL_MODEL_CML,	"CometLake GT1"},

I’m going to test my changes again, because 1) I lost my working dir 2) I made multiple attempts with different graphic_families (CFL CFLM etc.) to test if resolution change works (unfortunately not). With CFL, as far as I can remember, it displayed GeminiLake in Screen preflet, with CFLM no.

3 Likes

Thanks, I made similar changes, but I might have left it with mismatched family/model, LOL.

I’ve also added #define INTEL_PCH_GMP_DEVICE_ID 0x3180 to intel_extreme.h, that I use on intel_extreme.cpp’s detect_intel_pch() (output looked correct on syslog, at least).

Even if changing resolutions or brightness do not work, would be nice to see if the screen can be made to turn on/off if we open/close the lid (via DPMS perhaps?).

1 Like

Alright, managed to get it to use the intel_extreme.accelerant. (only worked, from non-packaged/add-ons/..., after blacklisting the system provided intel drivers).

Screen still doesn’t turns off when closing the lid, or with screen saver’s “Turn off screen”, but… resolution and color depth changes seems to be working pretty well, at least for the LCD panel :smiley:. (tested every single one from 640x350 to 1920x1200… even when native resolution is 1366x786).

I’ll do more tests with an external monitor, and try a couple of more little things with family/model to see we can gain some more features “for free”, and I’ll report back.

Edit: so far… external HDMI screen completely ignored.

Cool!!! :tada:

Maybe some family with M (CFLM or others of the same intel gen 9 KBYM, SKYM)

good news

With the latest Haiku code (Git pulled), it seems that the touchpad works too! (Recognized as Ps2 mouse in Input preflet)

I’ve added intel_extreme.h #define
and :tada: It works, with resolution modifications too :star_struck:

I’m going to test (as you) some other families, and try to set up a new family/group or whatever to distinguish those cards

1 Like

Hurrayyyyy :tada:
Screen DIM WORKS * _ *

screenshot1

3 Likes

This is the git diff:

diff --git a/headers/private/graphics/intel_extreme/intel_extreme.h b/headers/private/graphics/intel_extreme/intel_extreme.h
index 41e0439e..db876d92 100644
--- a/headers/private/graphics/intel_extreme/intel_extreme.h
+++ b/headers/private/graphics/intel_extreme/intel_extreme.h
@@ -51,6 +51,7 @@
 #define INTEL_GROUP_BDW		(INTEL_FAMILY_SOC0 | 0x0040)  // Broadwell
 #define INTEL_GROUP_SKY		(INTEL_FAMILY_LAKE | 0x0010)  // SkyLake
 #define INTEL_GROUP_KBY		(INTEL_FAMILY_LAKE | 0x0020)  // KabyLake
+#define INTEL_GROUP_GML		(INTEL_FAMILY_LAKE | 0x0020)  // GeminiLake
 #define INTEL_GROUP_CFL		(INTEL_FAMILY_LAKE | 0x0040)  // CoffeeLake
 #define INTEL_GROUP_CML		(INTEL_FAMILY_LAKE | 0x0080)  // CometLake
 #define INTEL_GROUP_JSL		(INTEL_FAMILY_LAKE | 0x0100)  // JasperLake
@@ -87,6 +88,8 @@
 #define INTEL_MODEL_SKY		(INTEL_GROUP_SKY)
 #define INTEL_MODEL_SKYM	(INTEL_GROUP_SKY | INTEL_TYPE_MOBILE)
 #define INTEL_MODEL_SKYS	(INTEL_GROUP_SKY | INTEL_TYPE_SERVER)
+#define INTEL_MODEL_GML		(INTEL_GROUP_GML )
+#define INTEL_MODEL_GMLM	(INTEL_GROUP_GML | INTEL_TYPE_MOBILE)
 #define INTEL_MODEL_KBY		(INTEL_GROUP_KBY)
 #define INTEL_MODEL_KBYM	(INTEL_GROUP_KBY | INTEL_TYPE_MOBILE)
 #define INTEL_MODEL_CFL		(INTEL_GROUP_CFL)
@@ -125,6 +128,7 @@
 #define INTEL_PCH_ADP4_DEVICE_ID	0x5480
 #define INTEL_PCH_P2X_DEVICE_ID		0x7100
 #define INTEL_PCH_P3X_DEVICE_ID		0x7000
+#define INTEL_PCH_GMP_DEVICE_ID 	0x3180
 
 // ValleyView MMIO offset
 #define VLV_DISPLAY_BASE		0x180000
@@ -265,6 +269,7 @@ enum pch_info {
 	INTEL_PCH_MCC,			// Mule Creek Canyon
 	INTEL_PCH_TGP,			// TigerLake
 	INTEL_PCH_ADP,			// AlderLake
+	INTEL_PCH_GMP,			// GeminiLake
 	INTEL_PCH_NOP
 };
 
diff --git a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
index c1f54660..a6576fde 100644
--- a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
+++ b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
@@ -188,6 +188,8 @@ const struct supported_device {
 	{0x3ec4, 0x3eab, INTEL_MODEL_CFLM, "CoffeeLake Halo GT2"},
 	{0x3ed0, 0x3ea5, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
 	{0x3ed0, 0x3ea6, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
+	
+	{0x31f0, 0x3185, INTEL_MODEL_GML,  "GeminiLake GT1"},
 
 	{0x9b64, 0x9ba4, INTEL_MODEL_CML,	"CometLake GT1"},
 	{0x9b73, 0x9ba8, INTEL_MODEL_CML,	"CometLake GT1"},
diff --git a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
index f1981e73..b5fb0ccd 100644
--- a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
+++ b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
@@ -172,6 +172,9 @@ const struct supported_device {
 	{0x3eab, INTEL_MODEL_CFLM, "CoffeeLake Halo GT2"},
 	{0x3ea5, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
 	{0x3ea6, INTEL_MODEL_CFL,  "CoffeeLake GT3"},
+	
+	{0x3185, INTEL_MODEL_GMLM, "GeminiLake GT1"},
+	{0x3184, INTEL_MODEL_GMLM, "GeminiLake GT1.5"},
 
 	{0x9ba4, INTEL_MODEL_CML,	"CometLake GT1"},
 	{0x9ba8, INTEL_MODEL_CML,	"CometLake GT1"},
@@ -300,6 +303,9 @@ detect_intel_pch()
 			case INTEL_PCH_JSP_DEVICE_ID:
 				ERROR("%s: Found Jasper Lake PCH\n", __func__);
 				return INTEL_PCH_JSP;
+			case INTEL_PCH_GMP_DEVICE_ID:
+				ERROR("%s: Found Gemini Lake PCH\n", __func__);
+				return INTEL_PCH_GMP;
 			case INTEL_PCH_ADP_DEVICE_ID:
 			case INTEL_PCH_ADP2_DEVICE_ID:
 			case INTEL_PCH_ADP3_DEVICE_ID:

I have ASUS B560 WIFI PLUS with soc1200 Celeron G5905 and Intel UHD gfx, maybe time for testing.

And what about adding settings for change font size in display settings

Gemini lake is equal to Kabylake. The patch can be simplified.

Got brightness control working here too! Great!

Still no luck with:

  • Turning the screen off.
  • Using HDMI output.

(lucky you with the touchpad! mine still won’t work :smiley: (is one of those that uses I2C).

Here’s my diff:

diff --git a/headers/private/graphics/intel_extreme/intel_extreme.h b/headers/private/graphics/intel_extreme/intel_extreme.h
index 41e0439e1..27a527bc6 100644
--- a/headers/private/graphics/intel_extreme/intel_extreme.h
+++ b/headers/private/graphics/intel_extreme/intel_extreme.h
@@ -89,6 +90,8 @@
 #define INTEL_MODEL_SKYS	(INTEL_GROUP_SKY | INTEL_TYPE_SERVER)
 #define INTEL_MODEL_KBY		(INTEL_GROUP_KBY)
 #define INTEL_MODEL_KBYM	(INTEL_GROUP_KBY | INTEL_TYPE_MOBILE)
+#define INTEL_MODEL_GML		(INTEL_GROUP_KBY)	// No Desktop/Mobile diff on GeminiLake device IDs.
+#define INTEL_MODEL_GMLM	(INTEL_GROUP_KBY | INTEL_TYPE_MOBILE)
 #define INTEL_MODEL_CFL		(INTEL_GROUP_CFL)
 #define INTEL_MODEL_CFLM	(INTEL_GROUP_CFL | INTEL_TYPE_MOBILE)
 #define INTEL_MODEL_CML		(INTEL_GROUP_CML)
@@ -108,6 +111,7 @@
 #define INTEL_PCH_SPT_DEVICE_ID		0xa100
 #define INTEL_PCH_SPT_LP_DEVICE_ID	0x9d00
 #define INTEL_PCH_KBP_DEVICE_ID		0xa280
+#define INTEL_PCH_GMP_DEVICE_ID		0x3180
 #define INTEL_PCH_CNP_DEVICE_ID		0xa300
 #define INTEL_PCH_CNP_LP_DEVICE_ID	0x9d80
 #define INTEL_PCH_CMP_DEVICE_ID		0x0280
diff --git a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
index c1f546604..dc1cdae1f 100644
--- a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
+++ b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp
@@ -176,6 +176,9 @@ const struct supported_device {
 	{0x5904, 0x5926, INTEL_MODEL_KBY,  "Kabylake ULT GT3"},
 	{0x5904, 0x5927, INTEL_MODEL_KBY,  "Kabylake ULT GT3"},
 
+//	{0x31f0, 0x3184, INTEL_MODEL_GML,	"GeminiLake GT1.5"},
+	{0x31f0, 0x3185, INTEL_MODEL_GML,	"GeminiLake GT1"},
+
 	{0x3e0f, 0x3e90, INTEL_MODEL_CFL,  "CoffeeLake GT1"},
 	{0x3e0f, 0x3e93, INTEL_MODEL_CFL,  "CoffeeLake GT1"},
 	{0x3e1f, 0x3e91, INTEL_MODEL_CFL,  "CoffeeLake GT2"},
diff --git a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
index f1981e735..8a237e0aa 100644
--- a/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
+++ b/src/add-ons/kernel/drivers/graphics/intel_extreme/driver.cpp
@@ -161,6 +161,9 @@ const struct supported_device {
 	{0x5926, INTEL_MODEL_KBY,  "Kabylake ULT GT3"},
 	{0x5927, INTEL_MODEL_KBY,  "Kabylake ULT GT3"},
 
+	{0x3184, INTEL_MODEL_GMLM,  "GeminiLake GT1.5"},
+	{0x3185, INTEL_MODEL_GMLM,  "GeminiLake GT1"},
+
 	{0x3e90, INTEL_MODEL_CFL,  "CoffeeLake GT1"},
 	{0x3e93, INTEL_MODEL_CFL,  "CoffeeLake GT1"},
 	{0x3e91, INTEL_MODEL_CFL,  "CoffeeLake GT2"},
@@ -275,6 +278,9 @@ detect_intel_pch()
 			case INTEL_PCH_KBP_DEVICE_ID:
 				ERROR("%s: Found Kaby Lake PCH\n", __func__);
 				return INTEL_PCH_SPT;
+			case INTEL_PCH_GMP_DEVICE_ID:
+				ERROR("%s: Found Gemini Lake PCH\n", __func__);
+				return INTEL_PCH_CNP;
 			case INTEL_PCH_CNP_DEVICE_ID:
 			case INTEL_PCH_CNP_LP_DEVICE_ID:
 				ERROR("%s: Found Cannon Lake PCH\n", __func__);


And here the notes I took while trying different things:


GeminiLake/GeminiLake Refresh.

  • Intel Gen9 Graphics with Kaby Lake improvements.
  • No Desktop/Mobile IDs distinction for the graphics
    (but we need to set INTEL_TYPE_MOBILE for brighness control)

Product IDs:

  • 0x3185 - UHD Graphics 600 (GeminiLake GT1), 12 EU
    Celeron J4105, J4005, N4100, N4000
    Celeron J4125, J4025, N4120, N4020
  • 0x3184 - UHD Graphics 605 (GeminiLake GT1.5), 18 EU
    Pentium Silver J5005, N5000
    Pentium Silver J5040, N5030

Relevant “defines”, in relation to Haiku’s intel_extreme driver/accelerant:

INTEL_FAMILY_xxx

As long as it is INTEL_FAMILY_LAKE, we’re good.

INTEL_GROUP_xxx

DigitalDisplayInterface::_PortRegister(): (INTEL_PORT_F) returns DDI_BUF_CTL_F if != INTEL_GROUP_SKY.

(driver): info.shared_info->pll_info differs if INTEL_GROUP_SKY

So… INTEL_GROUP_KBY/INTEL_GROUP_CFL should be good enough.

INTEL_MODEL_xxx

Not relevant for GeminiLake (so far).

INTEL_PCH_xxx pch_info enum (returned detect_intel_pch())

Only matters that its value is:

  • != to INTEL_PCH_NONE, INTEL_PCH_IBX, INTEL_PCH_CPT, or INTEL_PCH_LPT.

  • for Port::_DDCPin() mapping of INTEL_I2C_IO_x differes for:
    >= INTEL_PCH_ICP,
    >= INTEL_PCH_CNP,
    rest of Gen 9 graphics.

  • (driver): gen8_handle_interrupts() has extra stuff for >= INTEL_PCH_ICP (IceLake’s SHOTPLUG_CTL_DDI/SHOTPLUG_CTL_TC)

  • For brightness control to work:

    Needs >= INTEL_PCH_CNP, and INTEL_TYPE_MOBILE

  • (driver): intel_extreme_init()
    just an empty if block instead of reading “hraw_clock” if >= INTEL_PCH_CNP

So… just return INTEL_PCH_CNP from detect_intel_pch().

Not sure about this but: have you tried with latest efi bootx64.efi? I noticed that using an older efi (present in my rEFInd menu) the touchpad didn’t work again… But not tested accurately

Someone pointed out that I didn’t mention the brand and model. That’s true!! Here it is:

HP Laptop 15s-fq0008sl

Thanks for the reminder about updating bootx64.efi (had that in mind, but forgot it with all the excitement about the working brightness control :smiley:).

Sadly, touchpad still unusable. Thanks for the suggestion, and thanks for helping save my eyes from some unbearable screen brightness!

(funny we can set the brightness all the way down to pitch black :crazy_face:. maybe there should be a safe-guard against that, on the Screen preflet at least)

There is one, but I did not find a way to find what the minimal “safe” level is on each machine. So I hardcoded it to the minimal value that worked on my machine when I added the check.

I think it’s somewhere in the tables found in the video card BIOS, for which we already have a parser. But we have to find where exactly.

I’ve made the same tests and changes for my IceLake laptop. Screen dim works there too, not sure about screen resolution, if there’s only one resolution or it don’t read correctly the edid or whatever
icelakegt1

this is what syslog says on edid read:

KERN: intel_extreme: Digital Display Interface A: found EDID information!
KERN: EDID info:
KERN: package_daemon: [9720386: 123] EDID version: 1.4
KERN: Vendor: NCP Product ID: 0x2d
KERN: Serial #: 0
KERN: Produced in week/year: 1/2018
KERN: Type: Digital
KERN: Digital Bit Depth: 6
KERN: DisplayPort interface
KERN: Size: 34 cm x 19 cm
KERN: Gamma=2.20
KERN: Display supports continuous frequency
KERN: Red (X,Y)=(0.5947,0.3613)
KERN: Green (X,Y)=(0.3457,0.5547)
KERN: Blue (X,Y)=(0.1572,0.1064)
KERN: White (X,Y)=(0.3125,0.3281)
KERN: Supported Future Video Modes:
KERN: Supported VESA Video Modes:
KERN: Additional Video Mode (1920x1080@59Hz):
KERN: clock=138.500 MHz
KERN: h: (1920, 1968, 2000, 2080)
KERN: v: (1080, 1083, 1088, 1111)
KERN: size: 34.4 cm x 19.4 cm
KERN: border: 0.0 cm x 0.0 cm
KERN: Additional Video Mode (1920x1080@39Hz):
KERN: clock=138.500 MHz
KERN: h: (1920, 1968, 2000, 2080)
KERN: v: (1080, 1083, 1088, 1665)
KERN: size: 34.4 cm x 19.4 cm
KERN: border: 0.0 cm x 0.0 cm
KERN: Horizontal frequency range = 67…67 kHz
KERN: Vertical frequency range = 40…60 Hz
KERN: Maximum pixel clock = 140 MHz
KERN: Ascii Data: LM156LF-CL03

but only 1920x1080 is listed

Should I push these changes to gerrit review? (as soon as I have some spare time?)

Sure, Reviewing code is easier on gerrit anyway. : )