Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23976 - media-video/nvidia-kernel-1.0.4363-r3.ebuild - includes Suspend-Patch
Summary: media-video/nvidia-kernel-1.0.4363-r3.ebuild - includes Suspend-Patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-05 16:00 UTC by Jan Schubert
Modified: 2003-08-02 09:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nvidia-kernel-1.0.4363-r3.ebuild (nvidia-kernel-1.0.4363-r3.ebuild,4.17 KB, text/plain)
2003-07-05 16:01 UTC, Jan Schubert
Details
suspend-patch: files/nvidia-4363-suspendhack.diff (nvidia-4363-suspendhack.diff,407 bytes, patch)
2003-07-05 16:02 UTC, Jan Schubert
Details | Diff
files/digest-nvidia-kernel-1.0.4363-r3 (digest-nvidia-kernel-1.0.4363-r3,74 bytes, text/plain)
2003-07-05 16:02 UTC, Jan Schubert
Details
ChangeLog (ChangeLog,7.50 KB, text/plain)
2003-07-05 16:03 UTC, Jan Schubert
Details
Manifest (Manifest,230 bytes, text/plain)
2003-07-05 16:03 UTC, Jan Schubert
Details
Fix for for Kernels 2.5.74-mm2+ (01-NVIDIA_kernel-1.0-4363-highpmd.diff,1.35 KB, patch)
2003-07-08 02:57 UTC, Benjamin Weber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schubert 2003-07-05 16:00:44 UTC
I've attached a simple Patch to support Suspend-Mode (for Laptops). This is not officially 
supported by nvidia, but there are similar working patches for older releases. Note: You've 
to disable AGP-Support (especialy in /etc/X11/XF86Config) in order to able to use 
Suspend. Works fine on my Dell i8200 for Suspend to RAM.
Comment 1 Jan Schubert 2003-07-05 16:01:25 UTC
Created attachment 14180 [details]
nvidia-kernel-1.0.4363-r3.ebuild
Comment 2 Jan Schubert 2003-07-05 16:02:26 UTC
Created attachment 14181 [details, diff]
suspend-patch: files/nvidia-4363-suspendhack.diff
Comment 3 Jan Schubert 2003-07-05 16:02:59 UTC
Created attachment 14182 [details]
files/digest-nvidia-kernel-1.0.4363-r3
Comment 4 Jan Schubert 2003-07-05 16:03:27 UTC
Created attachment 14183 [details]
ChangeLog
Comment 5 Jan Schubert 2003-07-05 16:03:49 UTC
Created attachment 14184 [details]
Manifest
Comment 6 Benjamin Weber 2003-07-08 02:55:51 UTC
Please also apply the append patch that was taken directly from the kernel mailing list:

http://www.ussg.iu.edu/hypermail/linux/kernel/0307.0/att-1349/01-NVIDIA_kernel-1.0-4363-highpmd.diff

This patches nv-linux.h and nv.c to work with the highpmd patch in 2.5.74-mm2 and will most likely be needed for future kernel releases as well.
Comment 7 Benjamin Weber 2003-07-08 02:57:45 UTC
Created attachment 14267 [details, diff]
Fix for for Kernels 2.5.74-mm2+
Comment 8 Benjamin Weber 2003-07-08 08:40:17 UTC
The following was written as a followup to the above-mentioned patch by Andrew Morton:
(Again taken directly from the LKML http://www.ussg.iu.edu/hypermail/linux/kernel/0307.0/1405.html )
---------------------------------------------

Thomas Schlichter <schlicht@uni-mannheim.de> wrote:
>
> +#if defined(pmd_offset_map)
> +#define NV_PMD_OFFSET(address, pg_dir, pg_mid_dir) \
> + { \
> + pmd_t *pg_mid_dir__ = pmd_offset_map(pg_dir, address); \
> + pg_mid_dir = *pg_mid_dir__; \
> + pmd_unmap(pg_mid_dir__); \
> + }
> +#else
> +#define NV_PMD_OFFSET(address, pg_dir, pg_mid_dir) \
> + pg_mid_dir = *pmd_offset(pg_dir, address)
> +#endif
> +

Well that will explode if someone enables highpmd and has highmem.
This would be better:

--- nv.c.orig 2003-07-05 22:55:10.000000000 -0700
+++ nv.c 2003-07-05 22:55:58.000000000 -0700
@@ -2105,11 +2105,14 @@
     if (pgd_none(*pg_dir))
         goto failed;
 
- pg_mid_dir = pmd_offset(pg_dir, address);
- if (pmd_none(*pg_mid_dir))
+ pg_mid_dir = pmd_offset_map(pg_dir, address);
+ if (pmd_none(*pg_mid_dir)) {
+ pmd_unmap(pg_mid_dir);
         goto failed;
+ }
 
     NV_PTE_OFFSET(address, pg_mid_dir, pte);
+ pmd_unmap(pg_mid_dir);
 
     if (!pte_present(pte))
         goto failed;

------------------------------------------------------------------------

I was not able to apply it though.
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-02 08:55:32 UTC
Latest version do have PM support - please reopen if this still is valid.
Comment 10 Jan Schubert 2003-08-02 09:27:55 UTC
Yes, this might be true but i'm still not able to use the new version. 
I'm the only person having problems getting the new version running?