1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +00:00

Kernel/IntelGraphics: Move DisplayPlane enable code to derived classes

Instead of doing that on the IntelDisplayPlane class, let's have this in
derived classes so these classes can decide how to use the settings that
were provided before calling the enable method.
This commit is contained in:
Liav A 2022-04-09 17:39:27 +03:00 committed by Andrew Kaster
parent e393071a9b
commit 016fedbd20
5 changed files with 60 additions and 18 deletions

View file

@ -342,7 +342,14 @@ bool IntelDisplayConnectorGroup::set_crt_resolution(DisplayConnector::ModeSettin
VERIFY(!m_transcoders[0]->pipe_enabled({}));
MUST(m_transcoders[0]->enable_pipe({}));
MUST(m_planes[0]->set_plane_settings({}, m_mmio_second_region.pci_bar_paddr, IntelDisplayPlane::PipeSelect::PipeA, mode_setting.horizontal_active));
MUST(m_planes[0]->set_aperture_base({}, m_mmio_second_region.pci_bar_paddr));
MUST(m_planes[0]->set_pipe({}, IntelDisplayPlane::PipeSelect::PipeA));
MUST(m_planes[0]->set_horizontal_stride({}, mode_setting.horizontal_active * 4));
MUST(m_planes[0]->set_horizontal_active_pixels_count({}, mode_setting.horizontal_active));
// Note: This doesn't affect anything on the plane settings for Gen4, but we still
// do it for the sake of "completeness".
MUST(m_planes[0]->set_vertical_active_pixels_count({}, mode_setting.vertical_active));
MUST(m_planes[0]->enable({}));
enable_dac_output();