Opened 2 years ago

Last modified 2 years ago

#17675 assigned enhancement

Please support HD Graphics 5500 (id: 0x1616) in Intel extreme driver

Reported by: fotisk Owned by: rudolfc
Priority: normal Milestone: Unscheduled
Component: Drivers/Graphics/intel_extreme/broadwell Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

@rudolfc, creating the ticket after our communication in forums.

This is for a my Lenovo Thinkpad T450s. Native resolution is 1920 x 1080.

Currently working with framebuffer.

Attachments (1)

intel_extreme.8086_9a49_000200.rom (9.0 KB ) - added by pulkomandy 2 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by waddlesplash, 2 years ago

Component: DriversDrivers/Graphics/intel_extreme/broadwell
Keywords: Intel extreme HD Graphics 5500 removed
Owner: changed from nobody to rudolfc
Platform: x86-64All
Status: newassigned
Version: R1/beta3R1/Development

I think my laptop's card is one of these, so @rudolfc, I can help with testing if you need. (Though I don't think I have a serial hookup for it, so that may limit usefulness somewhat.)

comment:2 by rudolfc, 2 years ago

Hi! Looks like this type has DDI style outputs and I can find some register level info. I guess we could try to add the ID's and see what happens as a test, though probably it won't be ok yet currently.

Might be there's a picture though if started in native mode during the icons screen. We could start from that.

@waddlesplash if you want please add the ID, it might be also the GART part still needs to be added though, so you'd have to look at that as well.. :-)

comment:3 by waddlesplash, 2 years ago

At least this ID is already in GART: https://xref.landonf.org/source/xref/haiku/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp#127

I will let you take care of adding the rest of the Broadwell IDs, though.

comment:4 by waddlesplash, 2 years ago

I enabled Broadwell devices in hrev55988 as my HD 5500 seemed to work, after disabling the "acceleration engine." However, brightness control does not work. There must be yet another method?

comment:5 by pulkomandy, 2 years ago

There must be yet another method?

Did you test with or without https://review.haiku-os.org/c/haiku/+/5162 ?

Also, there I added a TODO about the older generations where the existing code is obviously incorrect (mixing south and norhtbridge registers from different generations). This should be fixed.

To check what your hardware is using, you can test the various registers from KDL:

ie_reg 0x61254 // MCH_BLC_PWM_CTL
ie_reg 0x48254 // PCH_BLC_PWM_CTL
ie_reg 0xc8254 // PCH_SOUTH_BLC_PWM_PERIOD

ie_reg 0x61354 // MCH_BLC_PWM_CTL (secondary backlight controller)
ie_reg 0x48354 // PCH_BLC_PWM2_CTL
ie_reg 0xc8354 // PCH_SOUTH_BLC_PWM2_PERIOD

If any of these is not 0, it's probably the one being in use for your machine.

If it's PCH_SOUTH_BLC_PWM_PERIOD, the new method in my patchset should work. If it's MCH_BLC_PWM_CTL or PCH_BLC_PWM_CTL, the old method should be used with the corresponding register.

If it's one of the last 3, for some reason the second backlight controller is used, we don't support this yet.

comment:6 by rudolfc, 2 years ago

Would be nice if the backlight control extensions make it into the driver, the 5162 patch looks nice to me when glancing over it, though I did not check details. :-)

comment:7 by pulkomandy, 2 years ago

There is a build fix to make (missing return statement in a function) and then it will be good to go. I think I can't easily do it this weekend however, I will not be home and I don't have wifi on the new laptop yet…

comment:8 by korli, 2 years ago

I'll have a look, the logic is a little more complex as we try to do everything in one loop.

comment:9 by pulkomandy, 2 years ago

Yes, but the "min backlight" is not essential and has a default value, so it doesn't need to affect the return code, I think. So it shouldn't change that much of the logic?

Also I could not fully test this because on my machine the panelType is not found. I think I will need to get it from the "opRegion"? That's what Linux seems to try first.

comment:10 by korli, 2 years ago

I adjusted and tested on JasperLake, brightness now works fine, thanks!

About the panelType, could it be that the section order isn't ascending, meaning that the backlight section comes before the one with the panel type?

hrev55994

Last edited 2 years ago by korli (previous) (diff)

comment:11 by pulkomandy, 2 years ago

In my case I think the section is foundg but the panel type in it is 255. I saw in the Linux driver that they first get the panel type from a different place (called opRegion), and the VBT can define 16 different panel types.

This makes sense, my laptop can be fitted with several display panels at the factory (different resolutions, touch vs non-touch), so it can have a single VBT and separately an index in the table, that's adjusted depending on which exact display is connected. This way they don't need to reflash/patch the bios just to change the display type

comment:12 by korli, 2 years ago

pulkomandy, can you share the vbt? it can be decoded with intel_vbt_decode from xorg-intel-gpu-tools.

comment:13 by pulkomandy, 2 years ago

I guess I need to install Linux to run that? I will try when I have some time (maybe not this week).

comment:14 by korli, 2 years ago

The dump should be available in the home when enabling this setting: https://dev.haiku-os.org/ticket/17632#comment:4

The dump can then be decoded and attached to the ticket.

by pulkomandy, 2 years ago

comment:15 by pulkomandy, 2 years ago

Hi Korli, I have added the dump. Sorry for the delay.

comment:16 by pulkomandy, 2 years ago

VBT header:
        VBT signature:          "$VBT TIGERLAKE      "
        VBT version:            0x0064 (1.0)
        VBT header size:        0x0030 (48)
        VBT size:               0x219f (8607)
        VBT checksum:           0x90
        BDB offset:             0x00000030 (48)

BDB header:
        BDB signature:          "BIOS_DATA_BLOCK "
        BDB version:            240
        BDB header size:        0x0016 (22)
        BDB size:               0x216e (8558)

BDB blocks present:
          1   2   9  10  12  20  27  40  42  43  44  46  51  52  56  57
        252 253 254

BDB block 1 - General features block:
        Panel fitting: text & graphics
        Flexaim: yes
        Message: yes
        Clear screen: 0
        DVO color flip required: no
        External VBT: no
        Enable SSC: no
        LFP on override: no
        Disable SSC on clone: no
        Underscan support for VGA timings: no
        Dynamic CD clock: yes
        Hotplug support in VBIOS: yes
        Disable smooth vision: no
        Single DVI for CRT/DVI: no
        Enable 180 degree rotation: no
        Inverted FDI Rx polarity: no
        Extended VBIOS mode: no
        Copy iLFP DTD to SDVO LVDS DTD: no
        Best fit panel timing algorithm: no
        Ignore strap state: no
        Legacy monitor detect: yes
        Integrated CRT: no
        Integrated TV: no
        Integrated EFP: no
        DP SSC enable: yes
        SSC frequency: 96 MHz
        DP SSC dongle supported: no

BDB block 2 - General definitions block:
        CRT DDC GMBUS addr: 0x02
        Use ACPI DPMS CRT power states: no
        Skip CRT detect at boot: no
        Use DPMS on AIM devices: yes
        Boot display type: 0x0000
        Child device size: 39
        Child device count: 9
        Child device info:
                Device handle: 0x0008 (LFP 1 (eDP))
                Device type: 0x1806 (unknown)
                        Internal connector
                        DisplayPort output
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x00
                DP ondock redriver: 0x00
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x00
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x0a (DP-A)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x03
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x40
                Dongle detect: 0x00
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x00
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: no
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x02
                IBoost level for DP/eDP: 0x00
        Child device info:
                Device handle: 0x0004 (EFP 1 (HDMI/DVI/DP))
                Device type: 0x60d2 (DVI-D)
                        Power management
                        Hotplug signaling
                        HDMI output
                        Content protection
                        High speed link
                        TMDS/DVI signaling
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x10
                DP ondock redriver: 0x10
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x20bf
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x01 (HDMI-B)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x02
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x00
                Dongle detect: 0x01
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x01
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: no
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x00
                IBoost level for DP/eDP: 0x00
        Child device info:
                Device handle: 0x0040 (EFP 2 (HDMI/DVI/DP))
                Device type: 0x68c6 (DisplayPort)
                        Power management
                        Hotplug signaling
                        Content protection
                        High speed link
                        DisplayPort output
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x10
                DP ondock redriver: 0x10
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x20db
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x09 (DP-D)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x00
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x30
                Dongle detect: 0x01
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x01
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: yes
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x00
                IBoost level for DP/eDP: 0x00
        Child device info:
                Device handle: 0x0020 (EFP 3 (HDMI/DVI/DP))
                Device type: 0x68c6 (DisplayPort)
                        Power management
                        Hotplug signaling
                        Content protection
                        High speed link
                        DisplayPort output
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x10
                DP ondock redriver: 0x10
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x20f7
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x0b (DP-E)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x00
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x50
                Dongle detect: 0x01
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x01
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: yes
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x00
                IBoost level for DP/eDP: 0x00
        Child device info:
                Device handle: 0x0010 (EFP 4 (HDMI/DVI/DP))
                Device type: 0x60d6 (DisplayPort/HDMI/DVI)
                        Power management
                        Hotplug signaling
                        HDMI output
                        Content protection
                        High speed link
                        TMDS/DVI signaling
                        DisplayPort output
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x50
                DP ondock redriver: 0x50
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x2113
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x0d (unknown)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x06
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x60
                Dongle detect: 0x01
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x01
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: no
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x00
                IBoost level for DP/eDP: 0x00
        Child device info:
                Device handle: 0x0002 (unknown)
                Device type: 0x60d6 (DisplayPort/HDMI/DVI)
                        Power management
                        Hotplug signaling
                        HDMI output
                        Content protection
                        High speed link
                        TMDS/DVI signaling
                        DisplayPort output
                        Digital output
                I2C speed: 0x00
                DP onboard redriver: 0x50
                DP ondock redriver: 0x50
                HDMI level shifter value: 0x00
                HDMI max data rate: <platform max> (0x00)
                Offset to DTD buffer for edidless CHILD: 0x212f
                Edidless EFP: no
                Compression enable: no
                Compression method CPS: no
                Dual pipe ganged eDP: no
                Compression structure index: 0x00)
                Slave DDI port: 0x00 (HDMI-A)
                AIM offset: 0
                DVO Port: 0x0f (unknown)
                AIM I2C pin: 0x00
                AIM Slave address: 0x00
                DDC pin: 0x07
                EDID buffer ptr: 0x00
                DVO config: 0x00
                EFP routed through dock: no
                Lane reversal: no
                Onboard LSPCON: no
                Iboost enable: no
                HPD sense invert: no
                HDMI compatible? no
                DP compatible? no
                TMDS compatible? no
                Aux channel: 0x70
                Dongle detect: 0x01
                Pipe capabilities: 0x00
                SDVO stall signal available: no
                Hotplug connect status: 0x00
                Integrated encoder instead of SDVO: yes
                DVO wiring: 0x01
                MIPI bridge type: 00 (unknown)
                Device class extension: 0x00
                DVO function: 0x00
                DP USB type C support: no
                2X DP GPIO index: 0x00
                2X DP GPIO pin number: 0x00
                IBoost level for HDMI: 0x00
                IBoost level for DP/eDP: 0x00

BDB block 9 - PSR block:

BDB block 10 - Unknown, no decoding available:

BDB block 12 - Driver feature data block:
        Boot Device Algorithm: os default
        Block display switching when DVD active: yes
        Allow display switching when in Full Screen DOS: no
        Hot Plug DVO: yes
        Dual View Zoom: no
        Driver INT 15h hook: no
        Enable Sprite in Clone Mode: yes
        Use 00000110h ID for Primary LFP: no
        Boot Mode X: 1024
        Boot Mode Y: 768
        Boot Mode Bpp: 8
        Boot Mode Refresh: 60
        Enable LFP as primary: no
        Selective Mode Pruning: no
        Dual-Frequency Graphics Technology: yes
        Default Render Clock Frequency: high
        NT 4.0 Dual Display Clone Support: no
        Default Power Scheme user interface: CUI
        Sprite Display Assignment when Overlay is Active in Clone Mode: secondary
        Display Maintain Aspect Scaling via CUI: yes
        Preserve Aspect Ratio: no
        Enable SDVO device power down: no
        CRT hotplug: yes
        LVDS config: Embedded DisplayPort
        Define Display statically: no
        Legacy CRT max X: 1920
        Legacy CRT max Y: 1200
        Legacy CRT max refresh: 60
        Enable DRRS: yes
        Enable PSR: yes

BDB block 20 - Unknown, no decoding available:

BDB block 27 - eDP block:

BDB block 40 - LVDS options block:
        Panel type: 255
        LVDS EDID available: yes
        Pixel dither: yes
        PFIT auto ratio: yes
        PFIT enhanced graphics mode: no
        PFIT enhanced text mode: no
        PFIT mode: 3

BDB block 42 - LVDS panel data block:
No LVDS ptr block

BDB block 43 - Backlight info block:

BDB block 44 - Unknown, no decoding available:

BDB block 46 - Unknown, no decoding available:

BDB block 51 - Unknown, no decoding available:

BDB block 52 - MIPI configuration block:
        General Param
                 BTA disable: Disabled
                 Panel Rotation: 270 degrees
                 Video Mode Color Format:                PPS GPIO Pins: Using PMIC 
                 CABC Support: supported
                 Mode: COMMAND
                 Video transfer mode: burst (0x3)
                 Dithering: done in Panel Controller
        Port Desc
                 Pixel overlap: 6
                 Lane Count: 3
                 Dual Link Support: not supported
        Dphy Flags
                 Clock Stop: DISABLED
                 EOT disabled: EOT to be sent

        HSTxTimeOut: 0x7400ffff
        LPRXTimeOut: 0x858b4828
        TurnAroundTimeOut: 0xfffffd88
        DeviceResetTimer: 0xc3172580
        MasterinitTimer: 0x31fb0002
        DBIBandwidthTimer: 0xbac9
        LpByteClkValue: 0x8d480200

        Dphy Params
                Exit to zero Count: 0x2
                Trail Count: 0x1F
                Clk zero count: 0xed
                Prepare count:0x3d

        ClockLaneSwitchingCount: 0xb08b4800
        HighToLowSwitchingCount: 0x398

        Timings based on Dphy spec
                TClkMiss: 0xbd
                TClkPost: 0x58
                TClkPre: 0xff
                TClkPrepare: 0xff
                TClkSettle: 0xba
                TClkTermEnable: 0x1

        TClkTrail: 0x0
        TClkPrepareTClkZero: 0x0
        THSExit: 0x68
        THsPrepare: 0xfd
        THsPrepareTHsZero: 0xffff
        THSSettle: 0x8b
        THSSkip: 0x9d
        THsTrail: 0x68
        TInit: 0xfd
        TLPX: 0xff
        MIPI PPS
                Panel power ON delay: 0
                Panel power on to Backlight enable delay: 0
                Backlight disable to Panel power OFF delay: 0
                Panel power OFF delay: 0
                Panel power cycle delay: 0

BDB block 56 - Compression parameters block:

BDB block 57 - Unknown, no decoding available:

BDB block 252 - Unknown, no decoding available:

BDB block 253 - Unknown, no decoding available:

BDB block 254 - Unknown, no decoding available:

comment:17 by korli, 2 years ago

Thanks. So no panel type because there is no section needing it (backlight and panel data).

Note: See TracTickets for help on using tickets.