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 106
    • Merge requests 106
  • 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
  • !601

xfree86: Fix autoconfig secondary GPU devices

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jacob Cherry requested to merge jcherry/xserver:master into master Feb 04, 2021
  • Overview 5
  • Commits 2
  • Pipelines 3
  • Changes 1

The code path added by commit 69e4b8e6 (xfree86: attempt to autoconfig gpu slave devices (v3)) assumes that it will only be run if the primary device on the screen is the first device in xf86configptr->conf_device_lst. While this is true most of the time, there are two specific cases where this assumption fails.

First, if the first device in conf_device_lst is assigned to a different seat than the running X server, it will be skipped by the previous FIND_SUITABLE macro usage. Second, if the primary device was explicitly assigned to the screen but auto_gpu_device is still set and no secondary devices were explicitly listed, that device may not be the first device in conf_device_lst.

When the first device in conf_device_lst is not the primary device assigned to the screen, two problems emerge. First, the first device in conf_device_lst will never be assigned to the screen as a secondary device. Second, the primary device is additionally assigned to the screen as a secondary device. The combination of these problems causes certain otherwise valid configurations to be invalid. For example, if a primary device is assigned to a screen and a secondary device is listed in the config but not explicitly assigned to the screen, then one order of the device sections results in a usable PRIME or Reverse PRIME setup and the other order does not.

This commit removes the assumption that the primary device is the first device in conf_device_lst by starting the loop from the start of conf_device_lst and skipping the primary device when it is encountered.

Signed-off-by: Jacob Cherry jcherry@nvidia.com

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