Refactor: Improve UEFI GOP Mode Selection Logic and Configuration
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- computer-graphics, operating-systems
Hướng nghiên cứu
Bắt đầu tại uefi/src/main.rs ở init_logger và theo dõi việc lọc chế độ GOP hiện tại cùng các đầu vào cấu hình. Làm rõ preset, tỷ lệ khung hình, giá trị tối thiểu, giá trị tối đa và hành vi EDID mong muốn trước khi thay đổi chiến lược lựa chọn; công việc được hoàn tất khi bao gồm hành vi best-fit đã thống nhất và phạm vi bao phủ cho các trường hợp fallback được chỉ định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Current Behavior
In the current implementation within uefi/src/main.rs -> init_logger, the GOP (Graphics Output Protocol) mode selection relies on a simple filter-and-last strategy:
modes.filter(|m| resolution_meets_minimum).last()
This approach leads to inconsistent experiences across different environments:
- Default/Fallback Issue: When no minimum requirements are set, QEMU defaults to a reasonable 1280x800, but my real hardware often falls back to a legacy 800x600 (SVGA), which is insufficient for modern logging.
- "Last Fit" Bias: When minimum requirements are specified (e.g., 1080p), the code picks the last mode in the list. On high-end displays, this often results in the maximum supported resolution (e.g., 2560x1600 or 3840x2160), which might not be the intended "best" resolution for a bootloader or kernel log.
Proposed Improvement
I suggest introducing a more robust selection mechanism that supports Preferred Resolutions and Aspect Ratio Filtering.
- Predefined Presets: Instead of raw pixel values, allow users to specify common targets like 720p, 1080p, or 2K.
- Aspect Ratio Awareness: Support filtering by ratios such as 16:9, 16:10, or 4:3.
- Optimal Selection Strategy:Find the Closest Match to a target resolution.If no exact match exists, fallback to the highest resolution within a specific aspect ratio.Implement a "Best Fit" instead of "Last Fit" (e.g., preference for (1920\times 1080) over (2560\times 1600) if the user targets FHD).
- Add Maximum Constraint: With only minimum constraints, sometimes it will lead to maximum values. Add maximum constraint to avoid that.
- EDID: I'm not familiar with UEFI EDID. I know this just form some simple lookup. this might be helpful.
Summary
I think adding maximum constraints and using min_by_key abs_diff or thing else to replace last strategy are easy to implement and solve this problem.
Suggested Labels: enhancement, area/uefi
- Ngôn ngữ chính
- Rust
- Star
- 1.7k
- Fork
- 240
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rust-osdev/bootloader
-
help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
rust-osdev/bootloader#581 · 2 bình luận ·
-
No boot on real hardware Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
rust-osdev/bootloader#573 · 5 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
rust-osdev/bootloader#555 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
rust-osdev/bootloader#525 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
rust-osdev/bootloader#514 · 3 bình luận ·
Tất cả issue của rust-osdev/bootloader
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug good first issue package: quic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
`dora trace view` sends a non-canonical full UUID as-is, so a valid trace ID shows "No spans found" Đang mởcli coordinator rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area: tasks enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Jason-jo17/Polybench#15 · 1 bình luận ·