# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/mips64/package/*/4004_all-add-impact-driver.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 591a13a59787..0f28a5604867 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -721,6 +721,12 @@ config FB_GBE_MEM This is the amount of memory reserved for the framebuffer, which can be any value between 1MB and 8MB. +config FB_IMPACT + tristate "SGI Impact graphics support" + depends on FB && (SGI_IP22 || SGI_IP26 || SGI_IP27 || SGI_IP28 || SGI_IP30) + help + SGI Impact (MardiGras/MGRAS) graphics card support. + config FB_SBUS bool "SBUS and UPA framebuffers" depends on (FB = y) && SPARC diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile index 13c900320c2c..25e16a8be5aa 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -125,6 +125,7 @@ obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o obj-$(CONFIG_FB_HYPERV) += hyperv_fb.o obj-$(CONFIG_FB_OPENCORES) += ocfb.o obj-$(CONFIG_FB_SM712) += sm712fb.o +obj-$(CONFIG_FB_IMPACT) += impact.o # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA) += uvesafb.o diff --git a/drivers/video/fbdev/impact.c b/drivers/video/fbdev/impact.c new file mode 100644 index 000000000000..caaa6fb400cc --- /dev/null +++ b/drivers/video/fbdev/impact.c @@ -0,0 +1,1297 @@ +/* + * drivers/video/fbdev/impact.c + * SGI Octane MardiGras (IMPACTSR) graphics + * SGI Indigo2 MardiGras (IMPACT) graphics + * + * Copyright (c) + * 2004-2006 by Stanislaw Skowronek (author) + * 2005 by Peter Fuerst (Indigo2 adaptation) + * 2007-2009 by Johannes Dickgreber (platform_driver) + * 2014 by Thomas Bogendoerfer (gio_driver) + * 2011-2015 by Joshua Kinard (upkeeping/maintenance) + * 2018-2024 René Rebe + * + * Based on linux/drivers/video/skeletonfb.c + * + * This driver, as most of the IP30 (SGI Octane) port, is a result of massive + * amounts of reverse engineering and trial-and-error. If anyone is interested + * in helping with it, please contact me: . + * + * The basic functions of this driver are filling and blitting rectangles. + * To achieve the latter, two DMA operations are used on Impact. It is unclear + * to me, why is it so, but even Xsgi (the IRIX X11 server) does it this way. + * It seems that fb->fb operations are not operational on these cards. + * + * For this purpose, a kernel DMA pool is allocated (pool number 0). This pool + * is (by default) 64kB in size. An ioctl could be used to set the value at + * run-time. Applications can use this pool, however proper locking has to be + * guaranteed. Kernel should be locked out from this pool by an ioctl. + * + * The IMPACT is quite well worked-out currently, except for the Geometry + * Engines (GE11). Any information about use of those devices would be very + * useful. It would enable a Linux OpenGL driver, as most of OpenGL calls are + * supported directly by the hardware. So far, I can't initialize the GE11. + * Verification of microcode crashes the graphics. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive for + * more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include