DRM depends on ???
PATCH 1/1 DRM depends on ???
DRM depending on `AGP=n' is driving me crazy! How to make CONFIG_DRM not eligible for selection on platforms that do not have AGP?
Since many of the core DRM files depend on PCI, add a dependency on PCI, to minimize the damage.
drivers/char/drm/Kconfig +1 -1
@@ -6,7 +6,7 @@ # config DRM tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" - depends on AGP || AGP=n + depends on (AGP || AGP=n) && PCI help Kernel-level support for the Direct Rendering Infrastructure (DRI) introduced in XFree86 4.0. If you say Y here, you need to select
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 12 lines · Geert Uytterhoeven
DRM depending on `AGP=n' is driving me crazy! How to make
CONFIG_DRMnot eligible for selection on platforms that do not have AGP?Since many of the core DRM files depend on PCI, add a dependency on PCI, to minimize the damage.
Signed-off-by Geert Uytterhoeven <[email protected]>
drivers/char/drm/Kconfig line 9
Quoted 5 lines
drivers/char/drm/Kconfig +1
-1@@ -6,7 +6,7 @@ # config DRM tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" - depends on AGP || AGP=n + depends on (AGP || AGP=n) && PCI
The whole dependancy seems like nonsense to me.
I think
depends on PCI
is a lot more sensible.
Dave
Quoted 8 lines · Dave Jones
drivers/char/drm/Kconfig line 9
Quoted 6 lines · Geert Uytterhoeven
config DRM
tristate "Direct Rendering Manager (XFree86 4.1.0 and higher
DRI support)"drivers/char/drm/Kconfig +1
-1- depends on AGP || AGP=n + depends on (AGP || AGP=n) && PCI
Quoted 6 lines
The whole dependancy seems like nonsense to me.
I thinkdepends on PCI
is a lot more sensible.
I think the original reasoning was something like this:
If DRM is built-in, then AGP _must_ be built-in or not included at all, modular won't work. If DRM is modular or not built, then AGP may be built-in, modular, or not built at all.
The "depends on AGP || AGP=n" means that if DRM=y, then AGP=y or AGP=n, and if DRM=m or DRM=n, then AGP=y or AGP=m or AGP=n.
Yes it's unclear and yes it should probably be documented in a comment somewhere.
Cheers,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$ L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+ PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-) ------END GEEK CODE BLOCK------
Quoted 17 lines
Quoted 8 lines
Quoted 1 line
The whole dependancy seems like nonsense to me.
I thinkdepends on PCI
is a lot more sensible.
I think the original reasoning was something like this:
If DRM is built-in, then AGP _must_ be built-in or not included at all, modular
won't work. If DRM is modular or not built, then AGP may be built-in, modular,
or not built at all.
Quoted 5 lines
The "depends on AGP || AGP=n" means that if DRM=y, then AGP=y or AGP=n, and if DRM=m or DRM=n, then AGP=y or AGP=m or AGP=n.
Yes it's unclear and yes it should probably be documented in a comment somewhere.
What Kyle said is the correct answer... we either keep this lovely construct (I'll add a comment for 2.6.13) or we go back to the old intermodule or module_get stuff... DRM built-in with modular AGP is always wrong... or at least I'll get a hundred e-mails less every month if I say it is ..
Dave.
Signature · 3 lines
David Airlie, Software Engineer http://www.skynet.ie/~airlied / airlied at skynet.ie Linux kernel - DRI, VAX / pam_smb / ILUG
Quoted 18 lines · Dave Airlie
Quoted 18 lines
Quoted 6 lines
The whole dependancy seems like nonsense to me.
I thinkdepends on PCI
is a lot more sensible.
I think the original reasoning was something like this:
If DRM is built-in, then AGP _must_ be built-in or not included at all, modular
won't work. If DRM is modular or not built, then AGP may be built-in, modular,
or not built at all.The "depends on AGP || AGP=n" means that if DRM=y, then AGP=y or AGP=n, and if DRM=m or DRM=n, then AGP=y or AGP=m or AGP=n.
Quoted 8 lines
Quoted 2 lines
Yes it's unclear and yes it should probably be documented in a comment somewhere.
What Kyle said is the correct answer... we either keep this lovely construct (I'll add a comment for 2.6.13) or we go back to the old intermodule or
module_getstuff... DRM built-in with modular AGP is always wrong... or at least I'll get a hundred e-mails less every month if I say it is ..
And what if we don't have AGP at all? Or no PCI?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines
What Kyle said is the correct answer... we either keep this lovely construct (I'll add a comment for 2.6.13) or we go back to the old intermodule or
module_getstuff... DRM built-in with modular AGP is always wrong... or at least I'll get a hundred e-mails less every month if I say it is ..And what if we don't have AGP at all? Or no PCI?
Then DRM detects that at configure time and excludes the code that requires AGP. Basically, the following are valid configurations:
DRM=y AGP=y # DRM will use AGP
DRM=y AGP=n # DRM will not use AGP
DRM=m AGP=y # DRM will use AGP DRM=m AGP=m # DRM will use AGP (DRM module depends on AGP module) DRM=m AGP=n # DRM will not use AGP
DRM=n AGP=* # DRM isn't compiled and therefore doesn't care about AGP
The only invalid configuration is DRM=y AGP=m, which seems silly, although theoretically in that case DRM should exclude AGP support.
Cheers,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$ L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+ PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-) ------END GEEK CODE BLOCK------
Quoted 11 lines · Kyle Moffett
Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines
What Kyle said is the correct answer... we either keep this lovely construct (I'll add a comment for 2.6.13) or we go back to the old intermodule or
module_getstuff... DRM built-in with modular AGP is always wrong... or at least I'll get a hundred e-mails less every month if I say it is ..And what if we don't have AGP at all? Or no PCI?
Then DRM detects that at configure time and excludes the code that requires AGP. Basically, the following are valid configurations:
OK. So we still need the dependency on PCI.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 2 lines
OK. So we still need the dependency on PCI.
at the moment yes but I'm think we will have to remove this as soon as we get the Sparc ffb stuff up and running again, the ffb driver doesn't do any PCI stuff, we have some code around but we haven't had any testing done on it and I'm sure its rotting away, if a maintainer turns up for sparc ffb, then the PCI requirement is gone..
If Christoph is correct I'll clean it up to use the construct he suggests, no-one came up with that solution when this was asked originally a few kernels back..
I can add the PCI dependency for now...
Dave.
Quoted 7 lines · Dave Airlie
Quoted 1 line
OK. So we still need the dependency on PCI.
at the moment yes but I'm think we will have to remove this as soon as we get the Sparc ffb stuff up and running again, the ffb driver doesn't do any PCI stuff, we have some code around but we haven't had any testing done on it and I'm sure its rotting away, if a maintainer turns up for sparc ffb, then the PCI requirement is gone..
So you will have to change it to 'PCI || (FB_SBUS && SPARC64)', right? Simply dropping the PCI requirement is wrong.
Quoted 1 line
I can add the PCI dependency for now...
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 18 lines · Kyle Moffett
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines
What Kyle said is the correct answer... we either keep this lovely construct (I'll add a comment for 2.6.13) or we go back to the old intermodule or
module_getstuff... DRM built-in with modular AGP is always wrong... or at least I'll get a hundred e-mails less every month if I say it is ..And what if we don't have AGP at all? Or no PCI?
Then DRM detects that at configure time and excludes the code that requires AGP. Basically, the following are valid configurations:
DRM=y AGP=y # DRM will use AGP
DRM=y AGP=n # DRM will not use AGP
Quoted 8 lines
DRM=m AGP=y # DRM will use AGP DRM=m AGP=m # DRM will use AGP (DRM module depends on AGP module) DRM=m AGP=n # DRM will not use AGPDRM=n AGP=* # DRM isn't compiled and therefore doesn't care about AGP
The only invalid configuration is DRM=y AGP=m, which seems silly, although theoretically in that case DRM should exclude AGP support.
Why is that case invalid? I may have DRM=y so I get DRM on my PCI graphichs card. Then I might load an agp module in order to use agp on *some other* agp card.
I have no problem with DRM=y,AGP=m being invalid for the common single-card setup, but there are multi-card setups too. Not that I need this special case personally - I have two cards but don't use modules.
Helge Hafting
Quoted 7 lines
Why is that case invalid? I may have DRM=y so I get DRM on my PCI graphichs card. Then I might load an agp module in order
to use agp on *some other* agp card. I have no problem with DRM=y,AGP=m being invalid for the common
single-card setup, but there are multi-card setups too. Not that I need this special case personally - I have two cards but don't use modules.
Yes but the support costs for me of allowing that second case aren't worth it, if people have a special case they don't lose anything by having AGP supported DRM in the kernel or AGP in the kernel all the time.. whereas I don't have to answer a load of questions from people whose AGP cards stop working because they build DRM into the kernel and AGP as a module...
Dave.
Signature · 3 lines
David Airlie, Software Engineer http://www.skynet.ie/~airlied / airlied at skynet.ie Linux kernel - DRI, VAX / pam_smb / ILUG
Quoted 6 lines · Kyle Moffett
If DRM is built-in, then AGP _must_ be built-in or not included at all, modular
won't work. If DRM is modular or not built, then AGP may be built- in, modular,
or not built at all.
Quoted 6 lines
The "depends on AGP || AGP=n" means that if DRM=y, then AGP=y or AGP=n, and if
DRM=m or DRM=n, then AGP=y or AGP=m or AGP=n.Yes it's unclear and yes it should probably be documented in a comment somewhere.
could be written easier as depends on AGP if AGP