[PR #1] [CLOSED] Drop master on /dev/dri/card0 by default #1

Closed
opened 2025-12-21 15:28:01 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nyanmisaka/mpp/pull/1
Author: @benhoff
Created: 11/6/2024
Status: Closed

Base: jellyfin-mppHead: fix


📝 Commits (1)

  • 24977f1 drop master on /dev/dri/card0 by default to avoid becoming the drm master

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 osal/allocator/allocator_drm.c (+5 -0)

📄 Description

This is a really odd edge case, but if you initialize ffmpeg rockchip first and then later try to get the drm master to draw a user interface using another part of your program, you'll be unable to modeset.

This is because drm automatically sets the first file to open as the drm master.

Most people won't run into this issue (or I assume they won't) because they are already likely using a desktop environment (which will already claim the drm master), they are completely running as headless process, and/or they aren't initializing ffmpeg before their UI.

I was lucky enough to have none of those as my setup, so ran head first into this problem.

The other way around this is to open a temporary file to /dev/dri/card0 before calling av_hwframe_ctx_init in your user code. In my experience, you can close the file after the av_hwframe_ctx_init


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nyanmisaka/mpp/pull/1 **Author:** [@benhoff](https://github.com/benhoff) **Created:** 11/6/2024 **Status:** ❌ Closed **Base:** `jellyfin-mpp` ← **Head:** `fix` --- ### 📝 Commits (1) - [`24977f1`](https://github.com/nyanmisaka/mpp/commit/24977f137e6857ef774f89137d05d4ba66b6c2c5) drop master on /dev/dri/card0 by default to avoid becoming the drm master ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `osal/allocator/allocator_drm.c` (+5 -0) </details> ### 📄 Description This is a really odd edge case, but if you initialize ffmpeg rockchip first and then later try to get the drm master to draw a user interface using another part of your program, you'll be unable to modeset. This is because drm automatically sets the first file to open as the drm master. Most people won't run into this issue (or I assume they won't) because they are already likely using a desktop environment (which will already claim the drm master), they are completely running as headless process, and/or they aren't initializing ffmpeg before their UI. I was lucky enough to have none of those as my setup, so ran head first into this problem. The other way around this is to open a temporary file to `/dev/dri/card0` before calling `av_hwframe_ctx_init` in your user code. In my experience, you can close the file after the `av_hwframe_ctx_init` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-21 15:28:01 +01:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/archived-mpp#1
No description provided.