Skip to content

msm-gbm-backend: rename GBM backend library from msm_gbm to msm-kms_gbm#1679

Open
yashgupta2126 wants to merge 1 commit intoqualcomm-linux:masterfrom
yashgupta2126:msm-backend
Open

msm-gbm-backend: rename GBM backend library from msm_gbm to msm-kms_gbm#1679
yashgupta2126 wants to merge 1 commit intoqualcomm-linux:masterfrom
yashgupta2126:msm-backend

Conversation

@yashgupta2126
Copy link

The DRM driver name was updated from 'msm' to 'msm-kms'. Mesa's GBM backend selection uses the DRM driver name to auto-discover the backend library by looking for '<drm_driver_name>_gbm.so' in GBM_BACKENDS_PATH or the default path (/usr/lib/gbm/).

With the old library name 'msm_gbm.so', Mesa cannot find the backend for driver 'msm-kms' and silently falls back to the generic 'dri' backend

Rename the library to 'msm-kms_gbm.so' so that Mesa's auto-detection picks the correct MSM GBM backend without requiring the GBM_BACKEND environment variable to be set explicitly.

KERNEL Commit ID for reference: - 217ed15bd399980981f90f4332bc7ad4b05baa7e

requiring GBM_BACKEND env var to be set explicitly.

Signed-off-by: Yash Gupta <quic_ygupt@quicinc.com>
Upstream-Status: Pending
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we patching a repository we maintain?

Copy link
Author

@yashgupta2126 yashgupta2126 Mar 4, 2026

Choose a reason for hiding this comment

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

The repository is shared between ubuntu deliverable in 6.8 kernel and mainline deliverable in 6.18+ kernel. The driver's name has changed with 'commit id 217ed15bd399980981f90f4332bc7ad4b05baa7e' in latest kernel version. Thus, raising a patch for mainline

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, NAK from my side, mainline should contain the latest changes as part of the repo (as part of a mainline / master / trunk branch), if we need to use an older rev / branch for ubuntu, then manage that separately.

Copy link
Contributor

Choose a reason for hiding this comment

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

Remember this will also later be used with debian and other distros (@lool fyi).

Copy link
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

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

This is wrong. The driver name wasn't changed. Instead a new driver name has been added. We need to support both.

The MSM DRM subsystem now exposes two driver names:
  - 'msm'     : legacy combined GPU+KMS driver (DRIVER_FEATURES_GPU | KMS)
  - 'msm-kms' : new KMS-only driver used

Mesa's GBM backend auto-detection looks for '<drm_driver_name>_gbm.so'
in the GBM backends path. With only 'msm_gbm.so' installed, platforms
using the 'msm-kms' driver cannot find the backend and fall back to the
generic 'dri' backend, causing GBM surface creation to fail.

Build the library as 'msm-kms_gbm.so' and install a compatibility
symlink 'msm_gbm.so -> msm-kms_gbm.so' so that both driver names
resolve to the same MSM GBM backend:
/usr/lib/gbm/msm-kms_gbm.so      (for 'msm-kms' driver)
/usr/lib/gbm/msm_gbm.so -> msm-kms_gbm.so  (for 'msm' driver)

Signed-off-by: Yash Gupta <quic_ygupt@quicinc.com>
Copy link
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

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

NAK for the pending patch. Get it merged to the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants