mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-20 18:12:53 +00:00
Kernel/Graphics: Export DDC I2C address definition to global header file
This commit is contained in:
parent
0c64abb5e3
commit
cd3c51f29b
Notes:
sideshowbarker
2024-07-17 00:55:34 +09:00
Author: https://github.com/supercomputer7
Commit: cd3c51f29b
Pull-request: https://github.com/SerenityOS/serenity/pull/17216
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
* Copyright (c) 2021-2022, Liav A. <liavalb@hotmail.co.il>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -31,5 +31,7 @@ struct Modesetting {
|
||||||
Timings horizontal;
|
Timings horizontal;
|
||||||
Timings vertical;
|
Timings vertical;
|
||||||
};
|
};
|
||||||
|
// Note: Address 0x50 is expected to be the DDC2 (EDID) i2c address.
|
||||||
|
static constexpr u8 ddc2_i2c_address = 0x50;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,8 +351,8 @@ void IntelNativeDisplayConnector::gmbus_read_edid()
|
||||||
Array<u8, 128> crt_edid_bytes {};
|
Array<u8, 128> crt_edid_bytes {};
|
||||||
{
|
{
|
||||||
SpinlockLocker control_lock(m_control_lock);
|
SpinlockLocker control_lock(m_control_lock);
|
||||||
MUST(m_gmbus_connector->write(DDC2_I2C_ADDRESS, 0));
|
MUST(m_gmbus_connector->write(Graphics::ddc2_i2c_address, 0));
|
||||||
MUST(m_gmbus_connector->read(DDC2_I2C_ADDRESS, crt_edid_bytes.data(), crt_edid_bytes.size()));
|
MUST(m_gmbus_connector->read(Graphics::ddc2_i2c_address, crt_edid_bytes.data(), crt_edid_bytes.size()));
|
||||||
}
|
}
|
||||||
set_edid_bytes(crt_edid_bytes);
|
set_edid_bytes(crt_edid_bytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue