All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: hide legacy drivers with CONFIG_DRM_LEGACY
@ 2016-08-04  8:06 David Herrmann
  2016-08-04  8:06 ` [PATCH 2/2] drm: make DRI1 drivers depend on BROKEN David Herrmann
  2016-08-04  8:13 ` [PATCH 1/2] drm: hide legacy drivers with CONFIG_DRM_LEGACY Chris Wilson
  0 siblings, 2 replies; 14+ messages in thread
From: David Herrmann @ 2016-08-04  8:06 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Lets move forward and hide the remaining DRI1 drivers behind a config
option, so we have a central place to disable them all. Furthermore, we
can provide a clear warning to anyone enabling them.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
 drivers/gpu/drm/Kconfig | 135 ++++++++++++++++++++++++++++--------------------
 1 file changed, 78 insertions(+), 57 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index fc35731..d8f6203 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -108,24 +108,8 @@ config DRM_KMS_CMA_HELPER
 
 source "drivers/gpu/drm/i2c/Kconfig"
 
-config DRM_TDFX
-	tristate "3dfx Banshee/Voodoo3+"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
-	  graphics card.  If M is selected, the module will be called tdfx.
-
 source "drivers/gpu/drm/arm/Kconfig"
 
-config DRM_R128
-	tristate "ATI Rage 128"
-	depends on DRM && PCI
-	select FW_LOADER
-	help
-	  Choose this option if you have an ATI Rage 128 graphics card.  If M
-	  is selected, the module will be called r128.  AGP support for
-	  this card is strongly suggested (unless you have a PCI version).
-
 config DRM_RADEON
 	tristate "ATI Radeon"
 	depends on DRM && PCI
@@ -177,49 +161,8 @@ source "drivers/gpu/drm/amd/acp/Kconfig"
 
 source "drivers/gpu/drm/nouveau/Kconfig"
 
-config DRM_I810
-	tristate "Intel I810"
-	# !PREEMPT because of missing ioctl locking
-	depends on DRM && AGP && AGP_INTEL && (!PREEMPT || BROKEN)
-	help
-	  Choose this option if you have an Intel I810 graphics card.  If M is
-	  selected, the module will be called i810.  AGP support is required
-	  for this driver to work.
-
 source "drivers/gpu/drm/i915/Kconfig"
 
-config DRM_MGA
-	tristate "Matrox g200/g400"
-	depends on DRM && PCI
-	select FW_LOADER
-	help
-	  Choose this option if you have a Matrox G200, G400 or G450 graphics
-	  card.  If M is selected, the module will be called mga.  AGP
-	  support is required for this driver to work.
-
-config DRM_SIS
-	tristate "SiS video cards"
-	depends on DRM && AGP
-	depends on FB_SIS || FB_SIS=n
-	help
-	  Choose this option if you have a SiS 630 or compatible video
-          chipset. If M is selected the module will be called sis. AGP
-          support is required for this driver to work.
-
-config DRM_VIA
-	tristate "Via unichrome video cards"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a Via unichrome or compatible video
-	  chipset. If M is selected the module will be called via.
-
-config DRM_SAVAGE
-	tristate "Savage video cards"
-	depends on DRM && PCI
-	help
-	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
-	  chipset. If M is selected the module will be called savage.
-
 config DRM_VGEM
 	tristate "Virtual GEM provider"
 	depends on DRM
@@ -290,3 +233,81 @@ source "drivers/gpu/drm/arc/Kconfig"
 source "drivers/gpu/drm/hisilicon/Kconfig"
 
 source "drivers/gpu/drm/mediatek/Kconfig"
+
+# Keep legacy drivers last
+
+menuconfig DRM_LEGACY
+	bool "Enable legacy drivers (DANGEROUS)"
+	depends on DRM
+	help
+	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
+	  APIs to user-space, which can be used to circumvent access
+	  restrictions and other security measures. For backwards compatibility
+	  those drivers are still available, but their use is highly
+	  inadvisable and might harm your system.
+
+	  You are recommended to use the safe modeset-only drivers instead, and
+	  perform 3D emulation in user-space.
+
+	  Unless you have strong reasons to go rogue, say "N".
+
+if DRM_LEGACY
+
+config DRM_TDFX
+	tristate "3dfx Banshee/Voodoo3+"
+	depends on DRM && PCI
+	help
+	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
+	  graphics card.  If M is selected, the module will be called tdfx.
+
+config DRM_R128
+	tristate "ATI Rage 128"
+	depends on DRM && PCI
+	select FW_LOADER
+	help
+	  Choose this option if you have an ATI Rage 128 graphics card.  If M
+	  is selected, the module will be called r128.  AGP support for
+	  this card is strongly suggested (unless you have a PCI version).
+
+config DRM_I810
+	tristate "Intel I810"
+	# !PREEMPT because of missing ioctl locking
+	depends on DRM && AGP && AGP_INTEL && (!PREEMPT || BROKEN)
+	help
+	  Choose this option if you have an Intel I810 graphics card.  If M is
+	  selected, the module will be called i810.  AGP support is required
+	  for this driver to work.
+
+config DRM_MGA
+	tristate "Matrox g200/g400"
+	depends on DRM && PCI
+	select FW_LOADER
+	help
+	  Choose this option if you have a Matrox G200, G400 or G450 graphics
+	  card.  If M is selected, the module will be called mga.  AGP
+	  support is required for this driver to work.
+
+config DRM_SIS
+	tristate "SiS video cards"
+	depends on DRM && AGP
+	depends on FB_SIS || FB_SIS=n
+	help
+	  Choose this option if you have a SiS 630 or compatible video
+	  chipset. If M is selected the module will be called sis. AGP
+	  support is required for this driver to work.
+
+config DRM_VIA
+	tristate "Via unichrome video cards"
+	depends on DRM && PCI
+	help
+	  Choose this option if you have a Via unichrome or compatible video
+	  chipset. If M is selected the module will be called via.
+
+config DRM_SAVAGE
+	tristate "Savage video cards"
+	depends on DRM && PCI
+	help
+	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
+	  chipset. If M is selected the module will be called savage.
+
+endif # DRM_LEGACY
-- 
2.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] drm: make DRI1 drivers depend on BROKEN
@ 2016-08-26  0:19 Kevin Brace
  2016-08-26  1:23 ` Emil Velikov
  0 siblings, 1 reply; 14+ messages in thread
From: Kevin Brace @ 2016-08-26  0:19 UTC (permalink / raw)
  To: dh.herrmann, dri-devel; +Cc: Connor Behan

Hi David,

> Lets move forward and hide the remaining DRI1 drivers behind a config
> option, so we have a central place to disable them all. Furthermore, we
> can provide a clear warning to anyone enabling them.
> 
> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
> ---
>  drivers/gpu/drm/Kconfig | 135 ++++++++++++++++++++++++++++--------------------
>  1 file changed, 78 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index fc35731..d8f6203 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -108,24 +108,8 @@ config DRM_KMS_CMA_HELPER
>  
>  source "drivers/gpu/drm/i2c/Kconfig"

. . . 

> +
> +config DRM_VIA
> +	tristate "Via unichrome video cards"
> +	depends on DRM && PCI
> +	help
> +	  Choose this option if you have a Via unichrome or compatible video
> +	  chipset. If M is selected the module will be called via.
> +
. . .
> +endif # DRM_LEGACY
> -- 
> 2.9.2 

I am the sole developer of OpenChrome (VIA Technologies IGP), and I do still actively develop OpenChrome DDX every day.

https://cgit.freedesktop.org/openchrome/xf86-video-openchrome

I do not want to be seen as stopping progress, but there are still people who use less than current hardware (myself and countless others) or non Big 3 x86 graphics (NVIDIA, AMD, and Intel) for things like thin clients.
In fact, I just got DVI via (no pun intended) Silicon Image SiI 164 TMDS transmitter working for one thin client user with VIA IGP. (HP T5550 thin client)

https://bugs.freedesktop.org/show_bug.cgi?id=95059#c22
https://bugs.freedesktop.org/attachment.cgi?id=126035

He uses ThinStation OS.

http://thinstation.github.io/thinstation/

Anyway, regarding the move to DRI2 / KMS so that DRI1 can be discontinued, I am not personally against it in the long run, but the work on it has stalled.

https://cgit.freedesktop.org/openchrome/drm-openchrome/

Personally, I have had issues compiling the drm-openchrome code (the newer VIA IGP DRM) with a newer Linux kernel. (tried 4.2 with little success)
If someone knowledgeable about porting the current drm-openchrome code to the latest Linux kernel can assist me in doing it, that will certainly be helpful.
One box I have (HP Pavilion a800n; AMD Athlon XP + VIA Technologies KM400A chipset) has Lubuntu 14.04 installed with drm-openchrome (Linux 3.19-rc6) compiled for it, but due to a bug I have not been able to track down yet (I do not know how to get the Linux kernel to preserve a kernel panic dump.), it will kernel panic if I try to boot Lubuntu with drm-openchrome.
Lubuntu itself will boot fine with the latest OpenChrome DDX as long as I am using the stock Linux 3.13 kernel provided by Lubuntu or drm-openchrome with ATI Technologies RAGE 128 Pro AGP.
I must note that this kernel panic appears to be specific to UniChrome IGP (this is the very early VIA IGP model), and I have personally seen drm-openchrome successfully boot Linux 3.19-rc6 with the newer UniChrome Pro and Chrome9 IGPs.
    OpenChrome DDX itself is developed so that it can be DRI1 / DRI2 and UMS / KMS selectable.
With the current OpenChrome DDX, it will disable EXA and Xv acceleration.
At this point, this is a rather poor trade off for current VIA IGP users since 2D acceleration will go off.
As for myself, I am spending pretty much all of my personal time in fixing the existing DRI1 / UMS OpenChrome DDX code, and do not have the time resources to work on porting OpenChrome to support DRI2 / KMS.
That being said, if someone can assist me in getting drm-openchrome code ported to the latest Linux kernel, then maybe I can start spending more time in getting EXA to work with DRI2, and when that is achieved, DRI1 can be retired for good.

Sincerely,

Kevin Brace
OpenChrome Project Maintainer / Developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-08-26 12:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04  8:06 [PATCH 1/2] drm: hide legacy drivers with CONFIG_DRM_LEGACY David Herrmann
2016-08-04  8:06 ` [PATCH 2/2] drm: make DRI1 drivers depend on BROKEN David Herrmann
2016-08-04  8:15   ` Chris Wilson
2016-08-25 11:14     ` Daniel Vetter
2016-08-25 15:04       ` Emil Velikov
2016-08-25 15:13         ` Alex Deucher
2016-08-25 16:37           ` Connor Behan
2016-08-26  4:52             ` Kevin Brace
2016-08-26  2:18   ` Dave Airlie
2016-08-04  8:13 ` [PATCH 1/2] drm: hide legacy drivers with CONFIG_DRM_LEGACY Chris Wilson
2016-08-26  0:19 [PATCH 2/2] drm: make DRI1 drivers depend on BROKEN Kevin Brace
2016-08-26  1:23 ` Emil Velikov
2016-08-26  3:04   ` Kevin Brace
2016-08-26 12:29     ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.