The NetBSD Project

CVS log for src/sys/dev/sbus/mgx.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / sbus

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Wed Jul 19 10:22:15 2023 UTC (7 months, 1 week ago) by macallan
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.23: +30 -4 lines
Diff to previous 1.23 (colored)

- make colour depth in fb mode configurable, default to 8bit
- support ioctl(FBIO*CMAP)

Revision 1.20.4.1 / (download) - annotate - [select for diffs], Wed Jul 5 16:09:50 2023 UTC (7 months, 3 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.20: +33 -13 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Pull up following revision(s) (requested by abs in ticket #224):

	sys/dev/wscons/wsdisplay_vconsvar.h: revision 1.34
	sys/dev/wscons/wsdisplay_glyphcachevar.h: revision 1.6
	sys/arch/sparc/dev/cgfourteen.c: revision 1.94
	sys/arch/sparc/dev/cgfourteen.c: revision 1.95
	sys/dev/sbus/mgx.c: revision 1.21
	sys/dev/sbus/mgx.c: revision 1.22
	sys/dev/sbus/mgx.c: revision 1.23
	sys/dev/wscons/wsdisplay_vcons.c: revision 1.65
	sys/dev/wscons/wsdisplay_vcons.c: revision 1.66
	sys/dev/wscons/wsdisplay_glyphcache.c: revision 1.12
	sys/arch/sparc/dev/sxvar.h: revision 1.5
	sys/arch/sparc/dev/sx.c: revision 1.6
	sys/arch/sparc/dev/sx.c: revision 1.7

make vcons_putchar_buffer() return a flag indicating if anything actually
changed, skip the actual drawing op if nothing did

add flags for drivers to requesr R2L bit/byte-ordered fonts, default to
L2R, chack them in vcons_load_font() instead of just trusting that we'd get
what we need

initialize the diagnostic register with the value suggested by the SunOS
header. This sets a bunch of undocumented bits and yields a 10% speed increase
when rendering antialiased text.

use macros compatible with xf86-video-suncg14 to issue SX instructions
much more readable, alignment weirdness is handled automatically and code is
interchangable

allow drivers to specify horizontal alignment of glyph cache cells
for things like SX which have alignment restrictions

add counter to periodically drain the instruction queue in order to avoid
stalling the MBus during long SX operations

adapted from xf86-video-suncg14
- use sx_wait() to avoid stalling the MBus
- request 32bit alignment for glyphcache cells

wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs

following a hunch...
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 28 11:08:47 2023 UTC (7 months, 4 weeks ago) by macallan
Branch: MAIN
Changes since 1.22: +32 -13 lines
Diff to previous 1.22 (colored)

following a hunch...
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 28 08:53:43 2023 UTC (7 months, 4 weeks ago) by macallan
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jun 28 08:11:52 2023 UTC (7 months, 4 weeks ago) by macallan
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

fix tpyo - now the glyph cache can actually work...

Revision 1.20 / (download) - annotate - [select for diffs], Thu Nov 11 19:37:30 2021 UTC (2 years, 3 months ago) by macallan
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.19: +20 -4 lines
Diff to previous 1.19 (colored)

provide an endian-flipped view of the framebuffer via mmap() if we know how
for now this is sparc64 only

Revision 1.19 / (download) - annotate - [select for diffs], Sun Oct 31 05:31:12 2021 UTC (2 years, 3 months ago) by macallan
Branch: MAIN
Changes since 1.18: +2 -6 lines
Diff to previous 1.18 (colored)

remove accidentially committed debug goop
thanks ryo@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Oct 30 05:37:39 2021 UTC (2 years, 3 months ago) by macallan
Branch: MAIN
Changes since 1.17: +12 -8 lines
Diff to previous 1.17 (colored)

actually mmap() the blitter registers when asked to, while there do some
magic number reduction

Revision 1.17 / (download) - annotate - [select for diffs], Fri Oct 22 19:21:12 2021 UTC (2 years, 4 months ago) by macallan
Branch: MAIN
Changes since 1.16: +94 -93 lines
Diff to previous 1.16 (colored)

return 0 in mgx_ioctl()::FBIOG*
now Xorg can find us

Revision 1.16 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:15 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Merge thorpej-cfargs2.

Revision 1.15.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 21:35:17 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

Adapt to CFARGS().

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:58 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.14.14.1 / (download) - annotate - [select for diffs], Sun Mar 21 21:09:14 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Give config_found() the same variadic arguments treatment as
config_search().  This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls.  Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:32 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:03 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.12.4.1: +3 -3 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:33 2018 UTC (5 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: thorpej-cfargs
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Fri Mar 30 06:20:15 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

Resolve conflicts between branch and HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 28 15:33:44 2018 UTC (5 years, 11 months ago) by macallan
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

set WSSCREEN_RESIZE

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:32 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.12.2.1: +1333 -0 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

update from HEAD

Revision 1.4.2.5 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:26 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.4: +130 -45 lines
Diff to previous 1.4.2.4 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD

Revision 1.12.2.1, Fri Aug 4 23:54:46 2017 UTC (6 years, 6 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.12: +0 -1333 lines
FILE REMOVED

file mgx.c was added on branch tls-maxphys on 2017-12-03 11:37:32 +0000

Revision 1.12 / (download) - annotate - [select for diffs], Fri Aug 4 23:54:46 2017 UTC (6 years, 6 months ago) by macallan
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0322, pgoyette-compat-0315, nick-nhusb-base-20170825
Branch point for: tls-maxphys, pgoyette-compat
Changes since 1.11: +63 -66 lines
Diff to previous 1.11 (colored)

- store bitmap fonts in vram
- don't try to force buffer flushes
- avoid 64bit writes to vram
-> no more corruption of font bitmaps

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jul 29 03:32:00 2017 UTC (6 years, 7 months ago) by macallan
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

make comment match code...

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 29 03:29:49 2017 UTC (6 years, 7 months ago) by macallan
Branch: MAIN
Changes since 1.9: +97 -9 lines
Diff to previous 1.9 (colored)

- use hardware to draw bitmap fonts
- while there enable font loading etc.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Sun May 29 08:44:30 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.3: +152 -2 lines
Diff to previous 1.4.2.3 (colored) to branchpoint 1.4 (colored)

Sync with HEAD

Revision 1.9 / (download) - annotate - [select for diffs], Sat May 7 15:32:08 2016 UTC (7 years, 9 months ago) by macallan
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.8: +152 -2 lines
Diff to previous 1.8 (colored)

add Sun /dev/fb* style goop

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:19 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.2: +392 -63 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Fri Mar 4 22:08:09 2016 UTC (7 years, 11 months ago) by macallan
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.7: +42 -13 lines
Diff to previous 1.7 (colored)

allow mmap()ing blitter registers

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 25 17:09:39 2016 UTC (8 years ago) by joerg
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Mark mgx_wait_host explicitly as unused.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 11 20:53:06 2016 UTC (8 years ago) by macallan
Branch: MAIN
Changes since 1.5: +181 -4 lines
Diff to previous 1.5 (colored)

support screen blanking and hw cursor

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 11 02:23:44 2016 UTC (8 years ago) by macallan
Branch: MAIN
Changes since 1.4: +183 -60 lines
Diff to previous 1.4 (colored)

switch to 32bit colour in WSDISPLAYIO_MODE_MAPPED, now X with wsfb will work
Not optimal though - for some reason the framebuffer's endianness in 32bit
colour is wrong and I have no idea (yet) how to change that, so many apps
using xrender will crash.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:13 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.4.2.1: +769 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored)

Sync with HEAD

Revision 1.4.2.1, Tue Jan 6 17:41:30 2015 UTC (9 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.4: +0 -769 lines
FILE REMOVED

file mgx.c was added on branch nick-nhusb on 2015-04-06 15:18:13 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 6 17:41:30 2015 UTC (9 years, 1 month ago) by macallan
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Branch point for: nick-nhusb
Changes since 1.3: +85 -3 lines
Diff to previous 1.3 (colored)

implement WSDISPLAYIO_*CMAP and WSDISPLAYIO_GET_FBINFO ioctl()s
now X with wsfb works properly

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 6 13:54:18 2015 UTC (9 years, 1 month ago) by macallan
Branch: MAIN
Changes since 1.2: +13 -21 lines
Diff to previous 1.2 (colored)

- enable alpha fonts now that we have acceleration and glyphcache
- fix drawing of underlined characters
- try to flush framebuffer writes before reading them with the blitter

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jan 4 18:18:20 2015 UTC (9 years, 1 month ago) by macallan
Branch: MAIN
Changes since 1.1: +336 -9 lines
Diff to previous 1.1 (colored)

support hardware acceleration, adapted from OpenBSD
TODO: figure out how to do host blits so we can get away without mapping the
      framebuffer

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 16 21:01:34 2014 UTC (9 years, 2 months ago) by macallan
Branch: MAIN

first draft of a driver for SMSI,mgx
More or less an Alliance Semiconductors ProMotion AT24 with some PCI-SBus
glue and 4MB framebuffer. No acceleration yet, just enough wsdisplay/vcons
setup and DAC programming to be functional.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>