amshafer / nvidia-driver

Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
43 stars 5 forks source link

README: add the November 2022 CFT and the April 2023 post about PRIME #11

Closed grahamperrin closed 10 months ago

amshafer commented 1 year ago

The way this repo works is that all driver versions are populated on top of the baseline branch (See UPDATING.md for details). It looks like I can change the target branch of this MR to baseline, but you'll have to rebase your commit on top of it to get rid of the populated driver commits so your change is the only one in the MR. Can you please do so?

grahamperrin commented 1 year ago

Sorry for overlooking https://github.com/amshafer/nvidia-driver/blob/525.78.01/UPDATING.md!

I often struggle with Git at the command line, and so we might simply abandon this PR (I can create another, properly based), however I'd quite like to learn how to dig myself out of this hole, if you don't mind steering me.

% gh repo clone grahamperrin/nvidia-driver
Cloning into 'nvidia-driver'...
remote: Enumerating objects: 969, done.
remote: Counting objects: 100% (583/583), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 969 (delta 339), reused 510 (delta 313), pack-reused 386
Receiving objects: 100% (969/969), 367.37 MiB | 6.52 MiB/s, done.
Resolving deltas: 100% (458/458), done.
Updating files: 100% (305/305), done.
% cd nvidia-driver
% git config user.name "Graham Perrin"
% git config user.email "grahamperrin@gmail.com"
% git log --oneline -2
9d55a5f (HEAD -> 525.78.01, upstream/525.78.01, origin/HEAD, origin/525.78.01) Add missing conftest check
5a88b3e Rename drm-fence to drm-prime-fence
% git pull --rebase upstream baseline
From https://github.com/amshafer/nvidia-driver
 * branch            baseline   -> FETCH_HEAD
Successfully rebased and updated refs/heads/525.78.01.
% git log --oneline -2
3bd9e0d (HEAD -> 525.78.01) Add missing conftest check
4dbfa45 Rename drm-fence to drm-prime-fence
% git log --oneline -16
3bd9e0d (HEAD -> 525.78.01) Add missing conftest check
4dbfa45 Rename drm-fence to drm-prime-fence
8c14e62 Update version
0e7027a nvidia-drm: Add support for FreeBSD
c4b03f8 conftest: Add old test_kernel_headers back
746e516 nvidia-drm: Add build logic for FreeBSD
72b08f0 FreeBSD: implement nv_get_phys_pages/nv_get_num_phys_pages
42266e1 Remove warning for CURRENT
62e274c Don't enable nv modules in loader.conf
0d6622a nvkms: Implement kapi on FreeBSD
147016c FreeBSD: switch to MTX_SPIN for nvkms_timers.lock
36d11dc FreeBSD: check if DRIVER_MODULE takes a devclass argument
8c1390c FreeBSD: pass address to kmem_free/pmap_unmapdev on 14.0 and higher
bbb979c Populate driver 525.78.01
8f7fc7f (origin/baseline) Add missing conftest check to patches
822856b Add note about duplicating effort
% git status
On branch 525.78.01
Your branch and 'origin/525.78.01' have diverged,
and have 15 and 14 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean
% git config --list | sort
branch.525.78.01.merge=refs/heads/525.78.01
branch.525.78.01.remote=origin
core.bare=false
core.filemode=true
core.logallrefupdates=true
core.repositoryformatversion=0
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://github.com/grahamperrin/nvidia-driver.git
remote.upstream.fetch=+refs/heads/525.78.01:refs/remotes/upstream/525.78.01
remote.upstream.url=https://github.com/amshafer/nvidia-driver.git
safe.directory=/usr/doc
user.email=grahamperrin@gmail.com
user.name=Graham Perrin
% 

What next? Should I undo any of what's above?

TIA

amshafer commented 1 year ago

I think that way over complicates it, I would just do something like:

git checkout patch-1
git rebase -i origin/basline
# in the interactive view set all of the commits except yours to "drop"
git log #should now show your lone commit on top of baseline

I'm sure you can find a better explanation of git rebase online if that gives you problems.

grahamperrin commented 10 months ago

Output from git-show(1) might be OK:

checkout, rebase, show ```text % git checkout patch-1 branch 'patch-1' set up to track 'origin/patch-1'. Switched to a new branch 'patch-1' % git rebase -i origin/baseline Successfully rebased and updated refs/heads/patch-1. % git show commit 91a20ba81a4ff588c0ee7fa109e028504190abba (HEAD -> patch-1) Author: Graham Perrin Date: Sat Mar 4 08:29:37 2023 +0000 README: add the November 2022 announcement and CFT diff --git a/README.md b/README.md index 33d47ae..e916148 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,10 @@ known issues that are currently not supported: I have no plans to fix this for now. ## Other Relevant Links -* https://badland.io/nvidia-drm.md -* https://badland.io/nvidia.md + +* [Porting nvidia-drm.ko to FreeBSD](https://badland.io/nvidia-drm.md) (2019-08-01) +* [Anatomy of the FreeBSD NVIDIA driver](https://badland.io/nvidia.md) (2019-08-01) +* [Announcing nvidia-drm port and Call for Testing](https://badland.io/announcing_nvidia_drm.md) (2022-11-13) ## How to update this port % ```

git log #should now show your lone commit on top of baseline

Is it normal for git-log(1) to show my commit atop baseline twice?

image


https://github.com/amshafer/nvidia-driver/pull/11#issuecomment-1474924723

… we might simply abandon this PR (I can create another, properly based), …

Let's do that, yes?

Then I can roll in a link to your PRIME in 2023 post …

amshafer commented 10 months ago

I think you are missing git rebase -i, where the interactive stage lets you drop all the extra commits here like my previous comment mentioned. So basically in the interactive section you'd only be left with your one commit. Your screenshot seems rendered wrong, maybe you scrolled up after paging down or something.

grahamperrin commented 10 months ago

… maybe you scrolled up after paging down or something.

Oh, thanks for the hint! This type of thing bugged me in the past, I completely forgot.

https://github.com/amshafer/nvidia-driver/pull/11#issuecomment-1690896646

The expanded view of checkout, rebase, show does include:

% git rebase -i origin/baseline

– and I dropped everything except my commit.

grahamperrin commented 10 months ago

Dry runs:

% git push --dry-run
Username for 'https://github.com': 
Password for 'https://grahamperrin@github.com': 
To https://github.com/grahamperrin/nvidia-driver.git
 ! [rejected]        patch-1 -> patch-1 (non-fast-forward)
error: failed to push some refs to 'https://github.com/grahamperrin/nvidia-driver.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
% git push --force --dry-run
Username for 'https://github.com': 
Password for 'https://grahamperrin@github.com': 
To https://github.com/grahamperrin/nvidia-driver.git
 + e42750f...99c1108 patch-1 -> patch-1 (forced update)
% 

Is the --force option appropriate in this situation?

amshafer commented 10 months ago

Yes you need force since you're overwriting the old branch head

grahamperrin commented 10 months ago

Thanks for the guidance!