Skip to content

[mipi_dsi] Disallow swap_xy#14124

Merged
clydebarrow merged 4 commits intoesphome:devfrom
clydebarrow:mipi_dsi
Feb 21, 2026
Merged

[mipi_dsi] Disallow swap_xy#14124
clydebarrow merged 4 commits intoesphome:devfrom
clydebarrow:mipi_dsi

Conversation

@clydebarrow
Copy link
Contributor

What does this implement/fix?

Custom model DSI display would try to use hardware rotation. This disallows swapping x/y for all DSI models since DSI fundamentally doesn't appear to support it (could be re-enabled in the future if a use-case is demonstrated.)

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Developer breaking change (an API change that could break external components)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

Pull request in esphome-docs with documentation (if applicable):

  • esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx
  • LN882x
  • nRF52840

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

Copilot AI review requested due to automatic review settings February 19, 2026 21:21
@github-actions
Copy link
Contributor

To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file:

external_components:
  - source: github://pr#14124
    components: [mipi_dsi]
    refresh: 1h

(Added by the PR bot)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disallows the swap_xy transform for all MIPI DSI display models by setting swap_xy=cv.UNDEFINED and explicitly rejecting it in the transform schema. This prevents DSI displays from attempting to use hardware rotation modes that require axis swapping, which DSI hardware fundamentally doesn't support.

Changes:

  • Modified model_schema to disallow swap_xy for all DSI models
  • Simplified dimension validation logic by removing swap_xy-related conditionals
  • Removed rotation-to-transform conversion code
  • Cleaned up unused imports (CONF_ROTATION, CONF_WIDTH)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.11%. Comparing base (17a810b) to head (c4e82a9).
⚠️ Report is 5 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #14124   +/-   ##
=======================================
  Coverage   74.11%   74.11%           
=======================================
  Files          55       55           
  Lines       11590    11590           
  Branches     1578     1578           
=======================================
  Hits         8590     8590           
  Misses       2598     2598           
  Partials      402      402           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@clydebarrow clydebarrow merged commit 518f08b into esphome:dev Feb 21, 2026
37 checks passed
@clydebarrow clydebarrow added this to the 2026.2.2 milestone Feb 21, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants