SF: Reject hotplugs on invalid or duplicate ports

When a HWC returns an invalid or duplicate port that collides with an
existing active port, the end result is display identification confusion
in higher layers of the stack. This is especially bad when the confusion
is with the internal/primary display and causes it to malfunction.

Reject hotplugs in which the reported port from HWC is already active.

Flag: EXEMPT bugfix
Bug: 383430671
Test: Display{Id | Identification}Test && libsurfaceflinger_unittest
Change-Id: Id3569ef1d973f4ace51d14c7e3cc9aef17630b22
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index af2b48f..23b3637 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -260,6 +260,7 @@
     struct Physical {
         PhysicalDisplayId id;
         hardware::graphics::composer::hal::HWDisplayId hwcDisplayId;
+        uint8_t port;
         DisplayModePtr activeMode;
 
         bool operator==(const Physical& other) const {