virtual hdmi analyzer changes#215
Open
thanushreevani wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the framework’s HDMI analyser support to enable HDMI output–related event injection by adding new analyser backends (virtual + manual) and wiring them into the existing HDMIAnalyserController facade and testController.
Changes:
- Expose
hdmiAnalyserControllerontestControllerfor easier access in tests. - Add
virtualHdmiControllerandmanualHdmiControllerbackends and register them inHDMIAnalyserController. - Add YAML command templates for HDMI output events (EDID read, frame-rate change, HDCP status, hotplug state).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/core/testControl.py | Exposes self.hdmiAnalyserController from the DUT. |
| framework/core/hdmiAnalyserModules/virtualHdmiController.py | New virtual controller that sends HDMI output events to utPlaneController. |
| framework/core/hdmiAnalyserModules/manualHdmiController.py | New manual controller intended for interactive hotplug handling. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_hotplug_state.yaml | Adds YAML template for hotplug state event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_hdcp_status.yaml | Adds YAML template for HDCP status event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_frame_rate_changed.yaml | Adds YAML template for frame-rate changed event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_edid_read.yaml | Adds YAML template for EDID read event. |
| framework/core/hdmiAnalyserController.py | Registers new backend types and adds HDMI-output event facade methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Comment on lines
+158
to
+159
| print(f"Validate EDID for HDMI input port {port} with expected data {expected_edid} Done") | ||
| return True |
Comment on lines
+229
to
+230
| print(f"SetHDCP version '{hdcp_version}' for HDMI input port {port} Done") | ||
| return True |
Comment on lines
+109
to
+117
| def setHDCPStatus(self, port: int, hdcp_version: str, status: str): | ||
| """ | ||
| Ask user to manually set HDCP status for the HDMI input port and confirm. | ||
| """ | ||
| if self.device == "source": | ||
| results = self.getUserYN(f"Set HDCP status '{status}' (version: {hdcp_version}) for HDMI input port {port}? (Y/N):") | ||
| return results | ||
| else: | ||
| return True # For sink devices. |
Comment on lines
+84
to
+98
| def setHDCPStatus(self, port: int, status: str, version: str): | ||
| if self.analyserdevice == "sink": | ||
| with open(HDMIOUT_HDCP_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmioutput']['params']['port'] = port | ||
| msg['hdmioutput']['params']['status'] = status | ||
| msg['hdmioutput']['params']['version'] = version | ||
| elif self.analyserdevice == "source": | ||
| with open(HDCP_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmiinput']['params']['port'] = port | ||
| msg['hdmiinput']['params']['state'] = status | ||
| msg['hdmiinput']['params']['version'] = version | ||
| yaml_str = yaml.dump(msg) | ||
| return self.utPlaneController.sendMessage(yaml_str) |
Comment on lines
+100
to
+112
| def setHotplugState(self, port: int, connected: bool, version: str): | ||
| if self.analyserdevice == "sink": | ||
| with open(HPD_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmioutput']['params']['port'] = port | ||
| msg['hdmioutput']['params']['connected'] = connected | ||
| elif self.analyserdevice == "source": | ||
| with open(CONNECTION_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmiinput']['params']['port'] = port | ||
| msg['hdmiinput']['params']['connected'] = connected | ||
| yaml_str = yaml.dump(msg) | ||
| return self.utPlaneController.sendMessage(yaml_str) |
Comment on lines
+34
to
38
| from framework.core.hdmiAnalyserModules.virtualHdmiController import virtualHdmiController | ||
| from framework.core.hdmiAnalyserModules.manualHdmiController import manualHdmiController | ||
|
|
||
|
|
||
| class HDMIAnalyserController(): |
Comment on lines
+155
to
+156
| """ | ||
| Start the virtual HDMI controller (stub). |
Comment on lines
+164
to
+165
| """ | ||
| Stop the virtual HDMI controller (stub). |
| card=config.get("card"), | ||
| ) | ||
| elif self.controllerType == "manual-hdmi-controller": | ||
| #if self.controllerType == "manual-hdmi-controller": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated the hdmi controller related changes for hdmi output