<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/powerpc, branch upstream/10.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-09-18T14:38:18Z</updated>
<entry>
<title>vt(4): Merge several bug fixes and improvements</title>
<updated>2014-09-18T14:38:18Z</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2014-09-18T14:38:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=add17774535083b84ad8dce251872b7d5836ff5f'/>
<id>urn:sha1:add17774535083b84ad8dce251872b7d5836ff5f</id>
<content type='text'>
SVN revisions in this MFC:
  269779 270705 270706 271180 271250 271253 271682 271684

Detailed commit list:

r269779:
  fbd: Fix a bug where vt_fb_attach() success would be considered a failure

  vt_fb_attach() currently always returns 0, but it could return a code
  defined in errno.h. However, it doesn't return a CN_* code. So checking
  its return value against CN_DEAD (which is 0) is incorrect, and in this
  case, a success becomes a failure.

  The consequence was unimportant, because the caller (drm_fb_helper.c)
  would only log an error message in this case. The console would still
  work.

  Approved by:	nwhitehorn

r270705:
  vt(4): Add cngrab() and cnungrab() callbacks

  They are used when a panic occurs or when entering a DDB session for
  instance.

  cngrab() forces a vt-switch to the console window, no matter if the
  original window is another terminal or an X session. However, cnungrab()
  doesn't vt-switch back to the original window currently.

r270706:
  drm: Don't "taskqueue" vt-switch if under DDB/panic situation

  If DDB is active, we can't use a taskqueue thread to switch away from
  the X window, because this thread can't run.

  Reviewed by:	ray@
  Approved by:	ray@

r271180:
  vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

r271250:
  vt(4): Change the terminal and buffer sizes, even without a font

  This fixes a bug where scroll lock would not work for tty #0 when using
  vt_vga's textmode. The reason was that this window is created with a
  static 256x100 buffer, larger than the real size of 80x25.

  Now, in vt_change_font() and vt_compute_drawable_area(), we still
  perform operations even of the window has no font loaded (this is the
  case in textmode here vw-&gt;vw_font == NULL). One of these operation
  resizes the buffer accordingly.

  In vt_compute_drawable_area(), we take the terminal size as is (ie.
  80x25) for the drawable area.

  The font argument to vt_set_border() is removed (it was never used) and
  the code now uses the computed drawable area instead of re-doing its own
  calculation.

  Reported by:	Harald Schmalzbauer &lt;h.schmalzbauer_omnilan.de&gt;
  Tested by:	Harald Schmalzbauer &lt;h.schmalzbauer_omnilan.de&gt;

r271253:
  pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

  This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
  under vt(4).

  PR:		193269
  Reported by:	emaste@
  Submitted by:	avg@

r271682:
  vt(4): Fix a LOR which occurs during a call to vt_upgrade()

  Reported by:	kib@
  Review:		https://reviews.freebsd.org/D785
  Reviewed by:	ray@
  Approved by:	ray@

r271684:
  vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

  Review:		https://reviews.freebsd.org/D789
  Reviewed by:	nwhitehorn
  Approved by:	nwhitehorn

Approved by:	re (gjb)
</content>
</entry>
<entry>
<title>MFC r269701:</title>
<updated>2014-09-06T22:37:47Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2014-09-06T22:37:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8d4cb0eee4d0e09f3ede1d04b1bd35ccca52c229'/>
<id>urn:sha1:8d4cb0eee4d0e09f3ede1d04b1bd35ccca52c229</id>
<content type='text'>
Set the si_code appropriately for exception-caused signals.

LLDB checks the si_code, and aborts if a code isn't known.

Approved by:	re (gjb)
Relnotes:	yes
</content>
</entry>
<entry>
<title>MFC r259657,r264205,r264207:</title>
<updated>2014-09-06T19:38:40Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2014-09-06T19:38:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50f765b7e736f209a6d3b77ee56b7d22301598c4'/>
<id>urn:sha1:50f765b7e736f209a6d3b77ee56b7d22301598c4</id>
<content type='text'>
r259657:

Add suspend/resume capabilities to the ATI backlight ppc driver.

With this, also shut off the display (DPMS-style) and disable the
clocking when the backlight level is set to 0.  This is taken from the
radeonkms driver (radeon_legacy_encoders.c) which doesn't yet support
PowerPC.

r264205,r264207:

Fix the ATI backlight driver off/on handling.  Now this driver works
correctly with the ATI Radeon 9700 in the PowerBook G4 1.67GHz.

Code shamelessly taken in spirit from the radeonkms driver, which I
hope will make this driver redundant in the future.

Approved by:	re (marius)
Relnotes:	yes (not suspend/resume, but the rest)
</content>
</entry>
<entry>
<title>MFC r261095,r263464,r263752,r264189</title>
<updated>2014-09-05T15:13:41Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2014-09-05T15:13:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=83501b0ccca905ad0f3a9b709ba0fb52e49bca5e'/>
<id>urn:sha1:83501b0ccca905ad0f3a9b709ba0fb52e49bca5e</id>
<content type='text'>
r263464,r263752,r275189:

Mask out SRR1 bits that aren't exported to the MSR.

This appears to fix a strange condition with X on 32-bit PowerBooks I
observed, caused by one of these bits getting set in the mcontext, but
not set in the thread, which is a symptom of another problem, more
difficult to diagnose.  Since these bits aren't exported anyway, this
change makes it more explicit that the bits aren't MSR-related in SRR1.

r261095:

Fix 32-bit signal handling on ppc64.  This was broken when the
PSL_USERSTATIC macro was changed.  Since copying 64-bit srr1 into
32-bit srr1 drops the upper 32 bits, any bits set in the context were
dropped, meaning the context check fails.  Since 32-bit set_context()
can't change those bits anyway, copy the ones from the current context
(td-&gt;td_frame) before calling set_context().

Approved by:	re
Relnotes:	yes (Affects 10-stable, but not 10.0-release)
</content>
</entry>
<entry>
<title>MFC r258078,258079</title>
<updated>2014-09-05T05:07:38Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2014-09-05T05:07:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=11d6c7629f34d5e90a34773d99947d6ea6d632c0'/>
<id>urn:sha1:11d6c7629f34d5e90a34773d99947d6ea6d632c0</id>
<content type='text'>
Increase the stack size for ppc64 from 4 pages to 8.

I found a stack overflow when a coredump was taken onto a ZFS volume with
heavy network activity.  2 DSI traps, plus one DECR trap, along with several
function calls in the stack, overflowed the 4 pages.  8 page stack fixes this.

Discussed with: nwhitehorn
Approved by:	re
Relnotes:	yes
</content>
</entry>
<entry>
<title>MFC vt(4) improvements / sync with HEAD</title>
<updated>2014-09-04T20:18:08Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2014-09-04T20:18:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e0ecad970546253420c9157faa51aee9627fb594'/>
<id>urn:sha1:e0ecad970546253420c9157faa51aee9627fb594</id>
<content type='text'>
These are largely dumbbell@'s changes.  Most significantly they address
the extreme performance degradation with VGA hardware.

SVN revisions in this MFC:
  269471 270290 270293 270322 270324 270329 270331 270336 270338 270340
  270341 270342 270343 270388 270390 270404 270411 270412 270413 270431
  270446 270448 270485 270587 270589 270613 270618 270620 270667 270702
  270707 270708 270720 270721 270785 270786

Detailed commit list:

r270290: Test if the cursor is shown only once

  Later, we just see if the "struct mouse_cursor" pointer is set. This
  avoids the need to mess with all the conditions several times; this
  has been error prone.

  While here, rename the variable "m" to a more meaningful "cursor",
  like it's done elsewhere in the code.

r270293: Rename the "mouse_cursor" structure to "vt_mouse_cursor"

  At the same time, "w" and "h" members are now called "width" and
  "height". The goal is to have a more "public" structure, because it
  will soon be passed as argument to a new callback, replacing
  vd_bitbltchr_t.

r269471 (ray):

  Fix vt_vga driver to draw not-8-bit-aligned fonts correctly.
  Still one bug here: mouse left some gaps on track when moving left.

r270322:

  Add new vd_bitblt_text_t callback, and implement it for vt_vga

  Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t
  receives:
    o  the whole text buffer
    o  the dirty area
    o  the mouse cursor (map, position, colors)

  This allows the backend to perform optimization on how to draw things.
  The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver
  are converted (only vt_vga is included in this commit).

  In vt_vga, this allows to draw the text and the cursor in one pass,
  without ever reading from video memory (because it has all the context).
  The main benefit is the speed improvement: no more slideshow during
  boot!

  Other bugs fixed in vt_vga are:
    o  left-most characters are drawn properly (the left-most pixels were
       missing with bold characters and some wide letters such as 'm')
    o  no more black square around the cursor
    o  no cursor flickering when the text is scrolling

  There are still many problems to fix: the known issues are marked with
  "FIXME" inside the code.

r270411:

  vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives

r270412:

  creator_fb: Implement vd_bitblt_text_t

r270413: ofwfb: Implement vd_bitblt_text_t

r270324: vt_vga: Clip the draw area to never draw offscreen

  This fixes a bug when two windows use different fonts, but a longer-
  term solution is required. The dirty area should be stored as pixels,
  not character cells, because such coordinates don't have the same
  meaning in all windows, when using different fonts.

r270329: Mark new mouse position as dirty only when it's actually displayed

r270331: Store cursor bitmap &amp; colors in struct vt_device

  This removes the need to specify them to each call to vd_bitblt_text_t
  and, therefore, simplifies the API.

r270336: Give the window to vd_bitblt_text_t callback

  ... instead of both the buffer and the font. Again, this simplifies
  the API.

r270338: The offset to center the text area is per-window now

  The previous global offset, based on the last loaded font, had no
  meaning for other windows. This caused a shifted text area, often
  partly out-of-screen.

r270341:  vt_vga: Remove a "FIXME" comment; the issue was solved in r270338

r270340: Don't run vt_set_border() and vt_flush() concurrently

  In the case of vt_vga, the two concurrent calls were writing to the
  same VGA registers, causing incorrect refresh of the screen.

r270342: Use the actual size of the mouse when marking its position as dirty

  This fixes a bug where part of the cursor was not erased.

r270343: Remove "FIXME" about multiple locking of vt_buf in vt_flush()

  After some testing, it appears that acquiring the lock once and keeping
  it longer is slower than taking it multiple times.

  While here, fix a typo in another comment.

r270388: vt_vga: Give only the character part of term_char_t to vga_get_cp437()

  This fixes a bug where vga_get_cp437() was called with an invalid
  argument. The screen was then filled with '?' instead of the actual
  character.

r270390: Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode

  In textmode, no font is loaded, thus the page fault in
  vt_mark_mouse_position_as_dirty() when it wants the font width/height.

  For now, create a fake area for the textmode. This needs to be
  modified if vt_vga gains mouse support in textmode.

  While here, fix a build failure when SC_NO_CUTPASTE is defined:
  vt_mark_mouse_position_as_dirty() must not be included in this case.

r270404: Fix cursor handling in vt_flush()

  There were situations where the cursor was not erased/redrawn or its
  position was marked as dirty even though it's not displayed. The code
  is now more straightforward.

  At the same, add a function to determine if the cursor covers a given
  area. This is used by backends to know if they need to draw the
  cursor.

  This new function should be paired with a new state in struct
  vt_device, called vd_mshown, which indicates if the cursor should be
  displayed.  This again simplifies vd_bitblt_text_t callback's API.

r270431: vt(4): Add vd_bitblt_bmp_t callback

  The code was already there in all backends, we just expose it. This is
  used to display the splash screen.

r270446: Remove vd_bitbltchr_t

  It's replaced by vd_bitblt_text_t, which gives more context to the
  backend and allows it to perform more efficiently when redrawing a
  given area.

r270448: Fix order of arguments (x &lt;-&gt; y) when showing the splash screen

r270485: vt_vga: Fix the display of the splash screen

r270587: Take font offset into account in vt_is_cursor_in_area()

  This fixes a "General protection fault" in vt_vga, where
  vt_is_cursor_in_area() erroneously reported that the cursor was over
  the text. This led to negative integers stored in "unsigned int" and
  chaos.

r270589: The cursor coordinates are relative to the drawn area

  ... not the whole screen. Don't use font offsets in
  vt_mark_mouse_position_as_dirty().

  This fixes a bug where the mouse position wasn't marked as dirty when
  approaching the borders of the drawn area.

r270613: Store a rectangle for the drawable area, not just the top-left corner

  This allows backends to verify they do not draw outside of this area.
  This fixes a bug in vt_vga where the text was happily drawn over the
  right and bottom margins, when using the Gallant font.

r270618: Intialize drawable area rectangle each time a font is loaded

  This also fixes a problem where early in boot, the area was zero,
  leading to nothing displayed for a few seconds.

r270620: vt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors

  This replaces the method based on Write Mode 3, which required reads
  from the video memory to load the latches.

r270667: When creating a window buffer, fill it entirely

  ... not just the visible part.

  This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie.
  the resolution goes up), the originally hidden, uninitialized area of
  the buffer is displayed on the screen. This leads to a missing text
  cursor when it's over an unitialized area.

  This was also visible when selecting text: the uninitialized area was
  not highlighted.

  Internally, this area was zeroed: characters were all 0x00000000,
  meaning the foreground and background color was black. Now, everything
  is filled with a space with a gray foreground color, like the visible
  area.

  While here, remove the check for the mute flag and always use
  TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
  black background).

r270702: Implement basic support for KDSETMODE ioctl

  With the current implementation, this allows an X11 server to tell
  the console it switches a particular window in "graphics mode". This
  information is used by the mouse handling code to ignore sysmouse events
  in the window taken by the X server: only him should receive those
  events.

r270707: Pause the vt_flush() timer when the screen is up-to-date

  The timer is restarted whenever a window buffer is marked as dirty or
  the mouse cursor moves.

  There's still room for improvement. For instance, we should not mark a
  window buffer as dirty when this window isn't displayed.

r270708: vt(4): Recompute the drawable area when the resolution changes

  This was only done when the font changed.

r270720: vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb

  There were two issues:
    1. The area given to vt_is_cursor_in_area() was adding the drawable
       area offset, something already handled by this function.
    2. The cursor was shifted on the screen by the offset of this area
       and thus was misplaced or not erased. Furthermore, when reaching
       the bottom or right borders, the cursor was either totally
       removed or not erased correctly.

r270721: vt(4): If the terminal shrinks, make sure the mouse is inside
   the new area

r270785: vt(4): Change vb_history_size from "int" to "unsigned int"

  CID:		1230002, 1230003

r270786: Indicate that KDSETRAD case falls through the next case

  CID:		1229953

Relnotes:	Yes
</content>
</entry>
<entry>
<title>MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr.</title>
<updated>2014-09-04T19:13:07Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2014-09-04T19:13:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c3990859e001c90e6a45dcb473e0710759a2db66'/>
<id>urn:sha1:c3990859e001c90e6a45dcb473e0710759a2db66</id>
<content type='text'>
  The same functionality can be obtained by testing for mask != NULL in
  vd_bitbltchr, which all implementations of vd_bitbltchr() were doing
  anyway.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFC fbd(4) and vt_fb disentanglement:</title>
<updated>2014-09-04T18:43:40Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2014-09-04T18:43:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2fad39a6f8ef7346ce4c4d00455f7ca275776885'/>
<id>urn:sha1:2fad39a6f8ef7346ce4c4d00455f7ca275776885</id>
<content type='text'>
r268472 (ray):

  Should check fb_read method presence instead of double check for fb_write.

r269620 (nwhitehorn):

  Retire various intertwined bits of fbd(4) and vt_fb, in particular the
  pixel modification indirection. No actual drivers use it and those
  that might (e.g. creatorfb) use custom implementations of
  vd_bitbltchr().

Relnotes:	No
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFC r265883,268898:</title>
<updated>2014-09-04T18:28:30Z</updated>
<author>
<name>Nathan Whitehorn</name>
<email>nwhitehorn@FreeBSD.org</email>
</author>
<published>2014-09-04T18:28:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ead9a07bb9d7abcd89325fc93e6bd7f53ede8575'/>
<id>urn:sha1:ead9a07bb9d7abcd89325fc93e6bd7f53ede8575</id>
<content type='text'>
Repair bitrot in PS3 memory and interrupt allocation.
</content>
</entry>
<entry>
<title>MFC r268880:</title>
<updated>2014-09-04T18:24:47Z</updated>
<author>
<name>Nathan Whitehorn</name>
<email>nwhitehorn@FreeBSD.org</email>
</author>
<published>2014-09-04T18:24:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f89b5f25546b0e564253b237607302b0644b467'/>
<id>urn:sha1:8f89b5f25546b0e564253b237607302b0644b467</id>
<content type='text'>
Allow mappings of memory not previously direct-mapped by the kernel when
calling mmap on /dev/mem and add a handler for the possible userland
machine checks that may result. Remove some pointless and wrong copy/paste
that has been in here for a decade as well.

This results in a /dev/mem with identical semantics to the x86 version.
</content>
</entry>
</feed>
