-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Linux 6.7 drivers #332
base: master
Are you sure you want to change the base?
Conversation
Does this mean I can use Intel external GPU? Thank you, as always, for improving the DRM stack. |
I have no idea :-) Do you have a unit to test with? I only test with an Intel 12th gen iGPU and a Radeon RX 6700 XT dGPU. |
@dumbbell Yes, I've ordered an A310 and a DG1 card. They should arrive in a few days. I'll test them and give you some feedback then. |
@wulf7 Would these updates add GUC/HUC support for DG2 cards? |
Intel MEI and PXP drivers are still not ported |
Maybe we (still) need this? We have it in 6.6, but not in this PR. |
We don’t have this patch in the master branch (which is at 6.6). Where does this patch come from? |
Yes that fixes it |
It is probably not the real fix to the problem, but the removal of:
in intel_color_prepare_commit (737e4a7) is where I landed when I bisected (my attempt) to update to 6.7. So it seems the fix for Linux alone does not fix it for FreeBSD. |
Panic on Framework Ultra 1 https://termbin.com/snmo
(For me the 6.6 port did not work on this machine, so no info on whether this is a regression.) |
Isn´t this the same as #324? |
It looks like it, yes - will test shortly. |
Ok, I see. I was looking for a FreeBSD-specific change and missed the fact that it was an upstream change. Thanks! |
Yes, it is the same issue; I've left a comment there. We need to implement some more functionality for Meteor Lake (MTL); I wonder if it would be possible to use the upstream routines more directly (other than drm-kmod being in ports). |
I resolved any diff with Linux 6.7, all committed in a single commit at the end of the branch. The associated freebsd-src branch was updated as the same time. I will continue to use the branch as my daily driver with the I will take some time to test the i915 driver too, it’s just that it is impractical: wifi does not work for me (Framework 13, Intel 12th gen) and with the laptop plugged into the dock, I break my neck to see the laptop’s screen :-) |
Yes the patch in #324 avoids that panic, at the cost of display corruption while in the console (as mentioned there). When trying to start X I get another panic:
|
This PR works for me as well on meteorlake, although I need the intel_color fix and the fix from #324 to do so. Unfortunately it seems nothing can actually use the GPU because mesa can't query some device info bit from i915. I was hoping commit ada29e8 would improve things but it doesn't seem to. The error I get is:
I've been seeing this on the current master 6.6 update as well, so this isn't introduced by this PR but still figured I would mention it. Not sure if others see this working. This prevents me from testing anything real, sway, vkcube, etc all fail. It's something to do with Mesa's |
0692ede
to
9f6a07b
Compare
So, before updating drm-kmod more we should probably create a 6.6-lts branch, and for that we have to check if someone have the time to finish porting part of the i915 driver that's missing (don't remember which component are missing currently but @wulf7 knows). |
Last night, I pushed two changes:
Please give the latest commits a shot and report back :-)
Oh, I wasn’t aware part of the driver was missing compared to earlier drm-kmod versions. |
@evadot I don't see why there's a dependency as you imply -- we can create a 6.6 branch from master now, and any further work that's required can happen on the branch. 6.7 work can continue on master. FWIW I have been running 6.6 on my daily driver Framework 11th gen Intel laptop for quite some time. @dumbbell I brought the two changes into my branch and tried on two machines. Looks fine on 13-th gen Intel i5-1335U. On the Framework Core Ultra 5 125H the panic is addressed but the video corruption in vt remains (as with #324): |
Because if we don't introduce IME and PXP in master before branching 6.6-lts I'm 100% sure that we will not have it in it. So the question is do we want to move forward now and introduce IME and PXP later or not. |
IMO we cannot afford to wait on moving forward on support for contemporary hardware. Nothing fundamentally prevents us from working on IME and PXP in master and merging work to 6.6-lts later on, does it? |
Unfortunately both of these new commits seem to have issues for me. With the FB fix my machine seems to hang with a black screen now, reverting that and using my change from #324 resolves that. Unfortunately because it hangs I can't get a panic and see where it is actually going wrong. I'll keep playing with it and see if I can get any hints. If I had to guess I would guess that it does not fail during register_fictitious_range but fails after that due to something about the framebuffer, since the entire screen turns black. The GuC enablement seems to fail:
Here's the full log with DRM debugging fully enabled: It continued on a little more after this trying to reset the GPU since it saw bcs was hung as well.
I am using the latest |
Thank you @amshafer for the report! I will try to process that tonight. Meanwhile, I worked last night on a fix for the following incorrect log messages in i915:
Now it displays the correct messages:
This a change in freebsd-src but it’s not committed and pushed yet. |
Currently we get bigjoiner config after the dsc get config, during HW readout. Since dsc_get_config now uses bigjoiner flags/pipes to compute DSC PPS parameter pic_width, this results in a state mismatch when Bigjoiner and DSC are used together. So call get bigjoiner config before calling dsc get config function. Fixes: 8b70b5691704 ("drm/i915/vdsc: Fill the intel_dsc_get_pps_config function") Cc: Suraj Kandpal <[email protected]> Cc: Ankit Nautiyal <[email protected]> Cc: Animesh Manna <[email protected]> Cc: Jani Nikula <[email protected]> Signed-off-by: Ankit Nautiyal <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit baf31a20fa7f3538d68ffa5262a715eb1d699cdd) Signed-off-by: Jani Nikula <[email protected]>
Updated i915 hwmon with fixes for issues reported by static analysis tool. Fixed integer overflow with upcasting. v2: - Added Fixes tag (Badal). - Updated commit message as per review comments (Anshuman). Fixes: 4c2572fe0ae7 ("drm/i915/hwmon: Expose power1_max_interval") Reviewed-by: Badal Nilawar <[email protected]> Reviewed-by: Anshuman Gupta <[email protected]> Signed-off-by: Karthik Poosa <[email protected]> Signed-off-by: Anshuman Gupta <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit ac3420d3d428443a08b923f9118121c170192b62) Signed-off-by: Jani Nikula <[email protected]>
Currently async flips are busted when bigjoiner is in use. As a short term fix simply reject async flips in that case. Cc: [email protected] Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9769 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Stanislav Lisovskiy <[email protected]> (cherry picked from commit e93bffc2ac0a833b42841f31fff955549d38ce98) Signed-off-by: Jani Nikula <[email protected]>
Select the HDMI specific PLL clock only for HDMI outputs. Fixes: 62618c7f117e ("drm/i915/mtl: C20 PLL programming") Cc: Mika Kahola <[email protected]> Cc: Radhakrishna Sripada <[email protected]> Reviewed-by: Radhakrishna Sripada <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 937d02cc79c6828fef28a4d80d8d0ad2f7bf2b62) Signed-off-by: Jani Nikula <[email protected]>
The pipe DMC seems to be making a mess of things in ADL. Various weird symptoms have been observed such as missing vblank irqs, typicalle happening when using multiple displays. Keep all pipe DMC event handlers disabled until needed (which is never atm). This is also what Windows does on ADL+. We can also drop DG2 from disable_all_flip_queue_events() since on DG2 the pipe DMC is the one that handles the flip queue events. Cc: [email protected] Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8685 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Imre Deak <[email protected]> (cherry picked from commit 648d7be8ecf47b0556e32550145c70db153b16fb) Signed-off-by: Jani Nikula <[email protected]>
…vram table 3.0" [Description] Revert commit fec05adc40c2 ("drm/amd/display: Use channel_width = 2 for vram table 3.0") Because the issue is being fixed from VBIOS side. Reviewed-by: Samson Tam <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
There have recently been changes that break backwards compatibility, that were introduced into DMUB firmware (for DCN32x) concerning FPO and SubVP. So, since those are just power optimization features, we can just disable them unless the user is using a new enough version of DMUB firmware. Cc: [email protected] Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2870 Fixes: ed6e2782e974 ("drm/amd/display: For cursor P-State allow for SubVP") Reported-by: Mikhail Gavrilov <[email protected]> Closes: https://lore.kernel.org/r/CABXGCsNRb0QbF2pKLJMDhVOKxyGD6-E+8p-4QO6FOWa6zp22_A@mail.gmail.com/ Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
[Why & how] Refactor dc_is_dmub_outbox_supported() a bit and add case for dcn35 to register dmub outbox notification irq to handle usb4 relevant hpd event. Reviewed-by: Roman Li <[email protected]> Reviewed-by: Jun Lei <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
[why & how] we have two SSC_En: we get ssc_info from dce_info for MPLL_SSC_EN. we used to call VBIOS cmdtbl's smu_info's SS persentage for DPRECLK SS info, is used for DP AUDIO and VBIOS' smu_info table was from systemIntegrationInfoTable. since dcn35 VBIOS removed smu_info, driver need to use integrationInfotable directly. Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: Charlene Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
[Why] Driver incorrectly checks if pointer variable OutBpp is null instead of if the value being pointed to is zero. [How] Dereference OutBpp before checking for a value of zero. Reviewed-by: Chaitanya Dhere <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: Josip Pavic <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Idle bo's PTE needs to be re-created when resetting VM state machine. Set idle bo's vm_bo as moved to mark it as invalid. Fixes: 55bf196f60df ("drm/amdgpu: reset VM when an error is detected") Signed-off-by: ZhenGuo Yin <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
…_pattern Using link_status to get DPCD_REV fails when disabling/defaulting phy pattern. Use intel_dp->dpcd to access DPCD_REV correctly. Fixes: 8cdf72711928 ("drm/i915/dp: Program vswing, pre-emphasis, test-pattern") Cc: Jani Nikula <[email protected]> Cc: Imre Deak <[email protected]> Cc: Lee Shawn C <[email protected]> Signed-off-by: Khaled Almahallawy <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 3ee302ec22d6e1d7d1e6d381b0d507ee80f2135c)
On XEHP platforms user is not able to find MMIO triggered reports in the OA buffer since i915 squashes the context ID fields. These context ID fields hold the MMIO trigger markers. Update logic to not squash the context ID fields of MMIO triggered reports. Fixes: cba94bbcff08 ("drm/i915/perf: Determine context valid in OA reports") Signed-off-by: Umesh Nerlige Ramappa <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 0c68132df6e66244acec1bb5b9e19b0751414389) Signed-off-by: Jani Nikula <[email protected]>
link_rate sometime will be changed when DP MST connector hotplug, so pbn_div also need be updated; otherwise, it will mismatch with link_rate, causes no output in external monitor. This is a backport to 6.7 and older. Cc: [email protected] Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Jerry Zuo <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Wade Wang <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Use separate metric table for APU and Non APU systems for smu_v_13_0_6 to get metric data Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Update pmfw metric table to include vcn & jpeg activity for smu_v_13_0_6 Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
This was included in gpu_info firmware, move it into the driver for consistency with other nv1x parts. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
It's no longer required. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
…isplays without PSR The check for sending the vsc infopacket to the display was gated behind PSR (Panel Self Refresh) being enabled. The vsc infopacket also contains the colorimetry (specifically the container color gamut) information for the stream on modern DP. PSR is typically only supported on mobile phone eDP displays, thus this was not getting sent for typical desktop monitors or TV screens. This functionality is needed for proper HDR10 functionality on DP as it wants BT2020 RGB/YCbCr for the container color space. Cc: [email protected] Cc: Harry Wentland <[email protected]> Cc: Xaver Hugl <[email protected]> Cc: Melissa Wen <[email protected]> Fixes: 15f9dfd545a1 ("drm/amd/display: Register Colorspace property for DP and HDMI") Tested-by: Simon Berz <[email protected]> Tested-by: Xaver Hugl <[email protected]> Signed-off-by: Joshua Ashton <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Expose sysfs entry mem_busy_percent for GC version 9.4.3 APU system Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Add new gpu_metrics_v1_5 to acquire vcn/jpeg activity & pcie nak error counters Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Use gpu_metrics_v1_5 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Use managed memory allocation for this. That allows us to not keep track of all the files any more. v2: keep drm_debugfs_cleanup(), but rename to drm_debugfs_unregister(), we still need to cleanup the symlink Signed-off-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Andi Shyti <[email protected]>
Remove a few hidden compound_head() calls by converting the returned page to a folio once and using the folio APIs. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
If the shared memory object is larger than the DRM object that it backs, we can overrun the page array. Limit the number of pages we install from each folio to prevent this. Signed-off-by: "Matthew Wilcox (Oracle)" <[email protected]> Reported-by: Oleksandr Natalenko <[email protected]> Tested-by: Oleksandr Natalenko <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Fixes: 3291e09a4638 ("drm: convert drm_gem_put_pages() to use a folio_batch") Cc: [email protected] # 6.5.x Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Remove one of the last remaining users of pagevec. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Differences were reviewed using e.g.: diff -Nau -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/ \ linux/drivers/gpu/drm/ diff -Naur -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/amd/amdgpu/ \ linux/drivers/gpu/drm/amd/amdgpu/ diff -Naur -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/i915/ \ linux/drivers/gpu/drm/i915/ diff -Naur -pX scripts/diffignore \ drm-kmod/include/drm/ \ linux/include/drm/
[Why] This now possible after the following fix in FreeBSD src's linuxkpi: linuxkpi: Don't destroy the mutex in `xa_destroy()`
… range [Why] When the code was adapted to use the new vt_drmfb integration, the i915 driver continued to use the values that used to be stored in `info->apertures->ranges[0]`. However they might be incorrect and in fact zero. [How] Instead, use the `info->fix.smem_*` values to register the fictitious range. These are the values by vt_drmfb later.
9f6a07b
to
a0088f2
Compare
This is the backport of the DRM drivers from Linux 6.7.
Progress:
![](https://camo.githubusercontent.com/2f8a9dc112e69d20f5f0039073e766f1c4791af5b7000779400977e009d2653a/68747470733a2f2f676570732e6465762f70726f67726573732f313030)
Changes in Linux 6.7
You can read this Phoronix article to learn about the changes in the DRM drivers in Linux 6.7:
https://www.phoronix.com/news/Linux-6.7-DRM-Graphics-Drivers
Patches to linuxkpi
This update depends on the following patches to linuxkpi in FreeBSD. They have not been submitted to Phabricator for review yet.
These patches are maintained in the following repository and branch:
https://github.com/dumbbell/freebsd-src/tree/drm-related-linuxkpi-changes
Patches were submitted for review:
https://reviews.freebsd.org/D48740https://reviews.freebsd.org/D48741https://reviews.freebsd.org/D48742https://reviews.freebsd.org/D48744https://reviews.freebsd.org/D48745https://reviews.freebsd.org/D48746https://reviews.freebsd.org/D48748https://reviews.freebsd.org/D48749https://reviews.freebsd.org/D48750https://reviews.freebsd.org/D48751https://reviews.freebsd.org/D48752https://reviews.freebsd.org/D48753https://reviews.freebsd.org/D48754https://reviews.freebsd.org/D48756https://reviews.freebsd.org/D48757https://reviews.freebsd.org/D48758https://reviews.freebsd.org/D48759https://reviews.freebsd.org/D48760https://reviews.freebsd.org/D48761https://reviews.freebsd.org/D48762Firmware updates
There is an associated firmware update:
How to test
You need to run a recent FreeBSD 15-CURRENT to test it.
Here are some instructions:
You need to checkout the FreeBSD src branch I mentionned,
linuxkpi-updates-for-drm
, and compile a kernel from that branch:You need to checkout the branch referenced in this pull request and compile it:
Load the relevant driver(s) as you usually do.