[haiku-commits] Change in haiku[master]: intel_extreme: detect pipe usage from hardware register on gen3 cards

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Jan 2020 20:57:31 +0000

From Adrien Destugues <pulkomandy@xxxxxxxxx>:

Adrien Destugues has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2163 ;)


Change subject: intel_extreme: detect pipe usage from hardware register on gen3 
cards
......................................................................

intel_extreme: detect pipe usage from hardware register on gen3 cards

There is no reason to not do this. The docs say the register is there
and writable, so I don't see why this wouldn't work.
---
M src/add-ons/accelerants/intel_extreme/Ports.cpp
1 file changed, 12 insertions(+), 9 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/63/2163/1

diff --git a/src/add-ons/accelerants/intel_extreme/Ports.cpp 
b/src/add-ons/accelerants/intel_extreme/Ports.cpp
index e3f82de..f08aadd 100644
--- a/src/add-ons/accelerants/intel_extreme/Ports.cpp
+++ b/src/add-ons/accelerants/intel_extreme/Ports.cpp
@@ -372,16 +372,18 @@
 pipe_index
 LVDSPort::PipePreference()
 {
-       // Older devices have hardcoded pipe/port mappings, so just use that
        if (gInfo->shared_info->device_type.Generation() < 4)
                return INTEL_PIPE_B;

-       // Ideally we could just return INTEL_PIPE_ANY for the newer devices, 
but
-       // this doesn't quite work yet.
+       // Ideally we could just return INTEL_PIPE_ANY, but this doesn't quite 
work
+       // yet (probably because we need to unlock the panel power sequencer 
above
+       // for all devices so we can actually change the pipe configuration)

-       // For Ibex Point, read the existing LVDS configuration and just reuse 
that
-       // (it seems our attempt to change it doesn't work, anyway)
-       if (gInfo->shared_info->pch_info == INTEL_PCH_IBX
+       // For now, read the existing LVDS configuration and just reuse that
+       // It doesn't matter as long as we don't attempt to handle multiple
+       // displays, anyway.
+       if (gInfo->shared_info->device_type.Generation() < 4
+               || gInfo->shared_info->pch_info == INTEL_PCH_IBX
                || gInfo->shared_info->pch_info == INTEL_PCH_CPT) {
                uint32 portState = read32(_PortRegister());
                if (portState & DISPLAY_MONITOR_PIPE_B)
@@ -390,9 +392,10 @@
                        return INTEL_PIPE_A;
        }

-       // For later PCH versions, assume pipe B for now. Note that later 
devices
-       // add a pipe C (but do they add a transcoder C?), so we'd need to 
handle
-       // that and the port register has a different format because of it.
+       // For later PCH versions and generation 4 devices, assume pipe B for 
now.
+       // Note that later devices add a pipe C (but do they add a transcoder 
C?),
+       // so we'd need to handle that and the port register has a different 
format
+       // because of it.
        return INTEL_PIPE_B;
 }


--
To view, visit https://review.haiku-os.org/c/haiku/+/2163
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I971d978d4ba65634a24772240fd7d67c1128af56
Gerrit-Change-Number: 2163
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: intel_extreme: detect pipe usage from hardware register on gen3 cards - Gerrit