Skip to content

Commit

Permalink
Update drm_hwcomposer
Browse files Browse the repository at this point in the history
Part 1: 0001-Update-drm-hwcomposer.patch
Update drm_hwcomposer

git clone
https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer.git
Aligned to commit 8adf544306db75a3fb0843b9977693d2a817bf5d

Part 2: 0002-Fix-issue-and-add-some-properties.patch
Fix issue and add some properties

1. Fix issue caused by crtc count and connector count doesn't match.
2. Multi-plane support
   Multi-plane can be enabled by property
   vendor.hwcomposer.planes.enabling.
   By default, only one plane is used if the property is not set.
   vendor.hwcomposer.planes.enabling=1 #support all planes
   vendor.hwcomposer.planes.enabling=0 #only support PRIMARY by default
3. Select preferred mode
   If the property 'vendor.hwcomposer.preferred.mode.limit' does not
   exist, or set to '1' then only support preferred mode.
   If the property 'vendor.hwcomposer.preferred.mode.limit' is set to
   '0', support all modes.
   vendor.hwcomposer.preferred.mode.limit=1#only support preferred mode
   vendor.hwcomposer.preferred.mode.limit=0#support all modes
4. Select specific mode
   This function is controlled by 2 properties.
      vendor.hwcomposer.connector.id
      vendor.hwcomposer.mode.id
   If the properties 'vendor.hwcomposer.connector.id' and
   'vendor.hwcomposer.mode.id' are all set, then only support the
   selected mode indicated by 'vendor.hwcomposer.mode.id'.
   If any one of the properties 'vendor.hwcomposer.connector.id' and
   'vendor.hwcomposer.mode.id' is not set, then to check the property
   'vendor.hwcomposer.preferred.mode.limit'.
      vendor.hwcomposer.connector.id=117
      vendor.hwcomposer.mode.id=2
5. With these properties, hwc can provide flexibility for performance
   tuning and bug triage.
6. Find mode id
cat /sys/kernel/debug/dri/0/i915_display_info.The output like below:
[CONNECTOR:117:DP-4]: status: connected
modes:
"1920x1080": 62 144500 1920 1968 2000 2080 1080 1083 1088 1112 0x48 0x9
"1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0xa
"1680x1050": 60 146250 1680 1784 1960 2240 1050 1053 1059 1089 0x40 0x6
"1680x945": 60 131481 1680 1784 1960 2240 945 946 949 978 0x0 0x6
mode id starts from 1, and increases with a step of 1 in order.
"1920x1080": 62 144500 1920 1968 2000 2080 1080 1083 1088 1112 0x48 0x9
mode id is 1
"1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0xa
mode id is 2
"1680x1050": 60 146250 1680 1784 1960 2240 1050 1053 1059 1089 0x40 0x6
mode id is 3
"1680x945": 60 131481 1680 1784 1960 2240 945 946 949 978 0x0 0x6
mode id is 4
7. The property can be set in /vendor/default.prop.
8. Support 'SetActiveConfigWithConstraints' interface needed by vts.
9. Fix multi-display issue.

Part 3: 0003-Fix-hotplug-issue-and-add-vsync2.4-callback.patch
Fix hotplug issue and add vsync2.4 callback

1. Once unplug event comes, display.ClearDisplay() will be invoked.
   Then DrmDisplayCompositor::active_composition_ will be set to
   nullptr, so in function DrmDisplayCompositor::IsFlatteningNeeded(),
   should check active_composition_ is not nullptr.
2. For android can't delete primary display, so when unplug event comes
   and belongs to primary display, don't invoke hotplug callback to
   notify upper.
3. Add vsync2.4 callback.
4. Set connector dpms property with DRM_MODE_DPMS_OFF if unpluging,
   DRM_MODE_DPMS_ON if pluging,to enable irq,fix type-c hotplug issue.
5. Set DrmDevice::mode_id_ with 0 at beginning of
   DrmConnector::UpdateModes().
Part 4: 0004-Set-the-primary-display-as-internal-display.patch
Set the primary display as internal display

Celadon connect monitor with HDMI/DP/Type-C port, which is
regarded as external display, but android by default assume
there is one internal display, so need to set the primary
display as internal display.

Tracked-On: OAM-99705
Signed-off-by: Li, HaihongX <[email protected]>
  • Loading branch information
HaihongxLi authored and sysopenci committed Oct 18, 2021
1 parent 3f5f00f commit 219951b
Show file tree
Hide file tree
Showing 5 changed files with 10,472 additions and 4,994 deletions.
Loading

0 comments on commit 219951b

Please sign in to comment.