Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 112
    • Merge requests 112
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Merge requests
  • !481

xfree86: Detect the primary device by checking outputs

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Jian-Hong Pan requested to merge starnight/xserver:master into master Jul 22, 2020
  • Overview 20
  • Commits 1
  • Pipelines 6
  • Changes 4

Before this patch, X server detects/sets the primary device by:

  1. The "PrimaryGPU" option in extra X configuration
  2. pci_device_is_boot_vga() for PCI devices
  3. Set the first (0 index) device as the primary device, if it is not found yet.

However, the other display controllers like Amlogic's meson cannot be detected as the primary device by pci_device_is_boot_vga(). Thus, it has to set the extra X configuration for the "PrimaryGPU" option. Otherwise, X server will set the first (0 index) device as the primary device. But it may not be the correct one, because it has no output. For example, Amlogic puts the GPU and display controller as different devices:

(II) xfree86: Adding drm device (/dev/dri/card0) (II) Platform probe for /sys/devices/platform/soc/d0000000.apb/d00c0000.gpu/drm/card0 (II) xfree86: Adding drm device (/dev/dri/card1) (II) Platform probe for /sys/devices/platform/soc/d0100000.vpu/drm/card1

This patch adds a new way to set the primary device by detecting the output of devices. It refers to the probe_hw() and related functions in modesetting driver.

Buglink: #1023 Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master