Bug#953810: /usr/bin/xmag: [xmag] Doesn't show the pixel RGB value any more.

2022-04-01 Thread Geert Uytterhoeven
I'm having the same problem with xmag in Ubuntu.
In fact this is not limited to xmag.  Xfig (1:3.2.7b-2 in Ubuntu)
suffers from a similar issue: when adding a new color by using
"Lookup and Add", xfig may crash with an X_QueryColors badValue trap.

The problem seems to be related to the type of window you're trying
to query a pixel color of:
  - In "classic" X11 apps (xmag, fig2dev, even the icons in the
GNOME taskbar), xmag and fig2dev can query colors fine,
  - In "modern" composed/anti-aliased apps (gnome-terminal, chromium),
X_QueryColors fails.

I do not know if this is a bug in these applications, or in some
other layer (X libs, X server, compositor, ...).

Thanks!

Gr{oetje,eeting}s,

    Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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



Re: [PATCH 00/18] Xfbdev Atari and Amiga support

2013-04-25 Thread Geert Uytterhoeven
Hi Alan,

On Thu, Apr 25, 2013 at 7:42 AM, Alan Coopersmith
alan.coopersm...@oracle.com wrote:
 On 04/24/13 10:28 PM, Geert Uytterhoeven wrote:
 On Thu, Apr 25, 2013 at 7:23 AM, Alan Coopersmith
 alan.coopersm...@oracle.com wrote:
 On 04/24/13 10:00 PM, Keith Packard wrote:
 Alan Coopersmith alan.coopersm...@oracle.com writes:
 On 04/24/13 06:58 PM, Keith Packard wrote:
 Alan Coopersmith alan.coopersm...@oracle.com writes:
 This broke my build:

 Undefined   first referenced
 symbol in file
 c2p_unsupported
 ../../../miext/shadow/.libs/libshadow.a(shafb4.o)

 Builds fine with GCC; perhaps that figures out that this function can
 never be called?

 If I build with gcc 4.7.2 with -O2 it indeed optimizes it out.
 If I build with gcc 4.7.2 with -g and no -O flags, it fails the same
 way.

 Sorry, I forgot that unlike Linux kernel people, xorg people sometimes
 do compile
 without optimization.

 Or in the case I first hit this, with optimization using compilers that
 aren't gcc.  (Xorg is built on several non-Linux platforms, with compilers
 such as clang or Solaris Studio.)

Right.

 That makes sense at least. We could either make c2p_unsupported call
 FatalError or just be a no-op. Any preference?

 I'd prefer at least a BUG_WARN() over a no-op, to give us a hint why
 stuff isn't working, though FatalError() also works for something that
 should be impossible to hit.


 Or assert(), or insert xorg favorite runtime check method here.

 This should be indeed impossible to hit, as all calls to the c2p functions
 use hardcoded parameters.

 I'm just a bit afraid that adding real error handling will slow down the
 code.
 Can it be dependent on DEBUG or so?

 Does it matter if the compiler optimizes out the call to c2p_unsupported?
 The performance should be the same for you.

Indeed, I forgot about that (just grabbing my morning coffee).

 Or does this code even need to be built for non-68k platforms at all?

No. I don't think Xfbdev already limits some options to certain platforms?

 (I'm still confused why we just took a big chunk of code for a platform
  with no active maintainer, but if Keith's willing to maintain it himself,
  that's his call.   I do hope we can fix the license before release to be
  a standard license, not yet another one-off we all have to add to our
  packages to comply with the terms of.)

I'm open for license changes. What's the recommended one?
But e.g. shiplan2p8.c was based on shpacked.c, so I mimicked its license
on shpacked.c, and refered to that file.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camuhmdvmro4ogxmpvk-arvtl8po8knrymhbf1p+pklbxwax...@mail.gmail.com



Re: [PATCH 00/18] Xfbdev Atari and Amiga support

2013-04-24 Thread Geert Uytterhoeven
On Thu, Apr 25, 2013 at 7:23 AM, Alan Coopersmith
alan.coopersm...@oracle.com wrote:
 On 04/24/13 10:00 PM, Keith Packard wrote:
 Alan Coopersmith alan.coopersm...@oracle.com writes:
 On 04/24/13 06:58 PM, Keith Packard wrote:

 Alan Coopersmith alan.coopersm...@oracle.com writes:

 This broke my build:

 Undefined   first referenced
symbol in file
 c2p_unsupported
 ../../../miext/shadow/.libs/libshadow.a(shafb4.o)


 Builds fine with GCC; perhaps that figures out that this function can
 never be called?


 If I build with gcc 4.7.2 with -O2 it indeed optimizes it out.
 If I build with gcc 4.7.2 with -g and no -O flags, it fails the same
 way.

Sorry, I forgot that unlike Linux kernel people, xorg people sometimes
do compile
without optimization.

 That makes sense at least. We could either make c2p_unsupported call
 FatalError or just be a no-op. Any preference?


 I'd prefer at least a BUG_WARN() over a no-op, to give us a hint why
 stuff isn't working, though FatalError() also works for something that
 should be impossible to hit.

Or assert(), or insert xorg favorite runtime check method here.

This should be indeed impossible to hit, as all calls to the c2p functions
use hardcoded parameters.

I'm just a bit afraid that adding real error handling will slow down the code.
Can it be dependent on DEBUG or so?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMuHMdXvzq=cdm3oubyge4c5npr1vocinwcf6kdcrymo3do...@mail.gmail.com



Re: [PATCH 00/18] Xfbdev Atari and Amiga support

2013-04-18 Thread Geert Uytterhoeven
Hi Keith.

On Mon, Apr 8, 2013 at 8:10 PM, Keith Packard kei...@keithp.com wrote:
 Geert Uytterhoeven ge...@linux-m68k.org writes:
 This patch series revives some of the support for Atari and Amiga that 
 existed
 in XF68_FBDev, but got lost after XFree86 3.x.

 I've reviewed the patches which may affect other machines, and looked
 briefly over the patches which don't. If you want to stick this sequence
 in a repository somewhere after you respond to my review, I'll go ahead
 and pull it into master.

Thanks for your review!

I addressed all comments, added acked/reviewed-by where appropriate, and dropped
the Debian and RFC patches from the series.

The following changes since commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f:
  Dave Airlie (1):
xf86: fix flush input to work with Linux evdev devices.

are available in the git repository at:

  https://github.com/geertu/xorg-xserver.git master

Geert Uytterhoeven (16):
  miext/shadow/shpacked.c: Remove unused PickBit() define
  test/input: Fix double-aligned test in dix_valuator_alloc() on m68k
  KDrive: Bail out if screen initialization failed
  Xfbdev: Make char *fbdevDevicePath const
  Xfbdev: Handle unset fix.line_length
  Xfbdev: Add support for monochrome visuals
  Xfbdev: Treat 1 bpp pseudocolor as monochrome
  Shadow: Add c2p core
  Shadow: Add support for Atari iplan2p4
  Shadow: Add support for Atari iplan2p8
  Shadow: Add support for Amiga afb4
  Shadow: Add support for Amiga afb8
  Xfbdev: Reject unsupported frame buffer types
  Xfbdev: Force shadowfb for frame buffers with non-packed pixels
  Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support
  Xfbdev: Wire up Amiga afb4 and afb8 support

 hw/kdrive/fbdev/fbdev.c   |  157 +++---
 hw/kdrive/fbdev/fbdev.h   |2 +-
 hw/kdrive/src/kdrive.c|3 +-
 miext/shadow/Makefile.am  |4 +
 miext/shadow/c2p_core.h   |  184 +
 miext/shadow/shadow.h |   12 +++
 miext/shadow/shafb4.c |  139 ++
 miext/shadow/shafb8.c |  143 +++
 miext/shadow/shiplan2p4.c |  136 +
 miext/shadow/shiplan2p8.c |  137 +
 miext/shadow/shpacked.c   |1 -
 test/input.c  |2 +-
 12 files changed, 888 insertions(+), 32 deletions(-)
 create mode 100644 miext/shadow/c2p_core.h
 create mode 100644 miext/shadow/shafb4.c
 create mode 100644 miext/shadow/shafb8.c
 create mode 100644 miext/shadow/shiplan2p4.c
 create mode 100644 miext/shadow/shiplan2p8.c

Thanks for pulling!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camuhmdu_+nvwe2lc8dt-z1s5o4sb6--wp2ykmb83twbgpg4...@mail.gmail.com



Re: [PATCH 07/18] Xfbdev: Handle unset var.bits_per_pixel

2013-04-08 Thread Geert Uytterhoeven
On Mon, Apr 8, 2013 at 6:47 PM, Keith Packard kei...@keithp.com wrote:
 Geert Uytterhoeven ge...@linux-m68k.org writes:

 Older frame buffer devices may not fill in var.bits_per_pixel, in which
 case it must be calculated by the application.

 I think you mean 'fix.line_length' here.

Woops, you're right. Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMuHMdUVLWz+Y1_7fWptL-WudY8niOUP=2RBx==b+q_pfmr...@mail.gmail.com



Re: [PATCH 09/18] Xfbdev: Treat 1 bpp pseudocolor as monochrome

2013-04-08 Thread Geert Uytterhoeven
On Mon, Apr 8, 2013 at 6:55 PM, Keith Packard kei...@keithp.com wrote:
 Geert Uytterhoeven ge...@linux-m68k.org writes:
 miCreateDefColormap() only preallocates black and white pixels if
 depth  1.

 I think you should also set pScreen-whitePixel and pScreen-blackPixel to
 match the MONO01 definitions; it seems like you're taking advantage of
 the behavior of miCreateDefColormap without doing that?

Due to the visual override, fbdevCreateColormap() takes care of that since
[PATCH 08/18] Xfbdev: Add support for monochrome visuals.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camuhmdv+tnjtnzjhfs8y+6zhkcbbs0lthtymlgbxyzg+txc...@mail.gmail.com



Bug#646686: [PATCH 01/18] debian/rules: Enable kdrive-mouse and kdrive-evdev on Linux

2013-03-27 Thread Geert Uytterhoeven
It seems the auto-detection for Linux in configure doesn't work anymore.
As a consequence, none of the KDrive input drivers are enabled, and mouse
and keyboard don't work.  build-main/include/kdrive-config.h:

/* #undef KDRIVE_KBD */
/* #undef KDRIVE_MOUSE */
/* #undef KDRIVE_EVDEV */

Explicitly enable kdrive-mouse and kdrive-evdev to fix this.

Notes:
  - I did not enable kdrive-kbd, as it's completely broken.
Since it no longer fills in KdKeyboardInfo.minScanCode and
KdKeyboardInfo.maxScanCode, any keypress causes messages like:

driver Linux console keyboard wanted to post scancode x outside of [0, 0]!

  - kdrive-mouse still works (e.g. -mouse ps2, or -mouse mouse for
protocol probing, which takes some time), but the recommended way
these days is kbd-evdev, using the following (ugly) command line
parameters:

-keybd evdev,,device=/dev/input/event0
-mouse evdev,,device=/dev/input/event1

  - This may be the reason behind
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640699
(keyboard problem with xserver xfbdev: why does it not work?)
  - See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646686
(xserver-xephyr: Xephyr doesn't work with evdev input drivers)

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
Cc: 640...@bugs.debian.org
Cc: 646...@bugs.debian.org
---
 debian/rules |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/debian/rules b/debian/rules
index 3011a78..59f0c4c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -60,6 +60,7 @@ endif
 
 ifeq ($(DEB_HOST_ARCH_OS), linux)
build_xfbdev = --enable-xfbdev
+   build_xfbdev += --enable-kdrive-mouse --enable-kdrive-evdev
selinux = --enable-xselinux
 else
build_xfbdev = --disable-xfbdev
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-2-git-send-email-ge...@linux-m68k.org



[PATCH 00/18] Xfbdev Atari and Amiga support

2013-03-27 Thread Geert Uytterhoeven
This patch series revives some of the support for Atari and Amiga that existed
in XF68_FBDev, but got lost after XFree86 3.x.

Generic:
  - All non-packed frame buffer layouts use shadowfb, and fast c2 for
chunky-to-planar conversion.
  - As the KDrive keyboard driver is broken, you have to use evdev instead.
  - 4 bpp is of limited use with modern clients, as e.g. GdkRgb doesn't support
4 bpp color. gdkRgb does support 4 bpp grayscale, so you may want to force
the visual to grayscale.
  - I haven't benchmarked it yet against XF68_FBDev 3.6, but it's unusable slow
on my Amiga 4000/040, even for just moving the mouse pointer. May be due to
excessive TLS syscalls with recent glibc. It is usable on ARAnyM on Intel
Core 2 Quad.

Status on Atari:
  - 1 bpp, 4 bpp, and 8 bpp now work (16 bpp already worked before, as it's a
packed mode)
  - 2 bpp is not yet supported. It's of limited use anyway due to the low
number of colors.

Status on Amiga:
  - 1 bpp, 4 bpp, and 8 bpp now work.
  - 2, 3, 5, 6, and 7 bpp are not yet supported. 5 and 6 bpp may be useful as
they improve Chip RAM access for the CPU, compared to 8 bpp.
  - The keyboard map is messed up, even with
-keybd evdev,,device=/dev/input/event0,xkbmodel=amiga

Sample invocation:

Xfbdev -keybd evdev,,device=/dev/input/event0 \
   -mouse evdev,,device=/dev/input/event1 [ -cc grayscale ]

List of patches:
  [01/18] debian/rules: Enable kdrive-mouse and kdrive-evdev on Linux
  [02/18] miext/shadow/shpacked.c: Remove unused PickBit() define
  [03/18] [RFC] mi: Avoid division by zero errors in miInitializeColormap()
  [04/18] test/input: Fix double-aligned test in dix_valuator_alloc() on m68k
  [05/18] KDrive: Bail out if screen initialization failed
  [06/18] Xfbdev: Make char *fbdevDevicePath const
  [07/18] Xfbdev: Handle unset var.bits_per_pixel
  [08/18] Xfbdev: Add support for monochrome visuals
  [09/18] Xfbdev: Treat 1 bpp pseudocolor as monochrome
  [10/18] Shadow: Add c2p core
  [11/18] Shadow: Add support for Atari iplan2p4
  [12/18] Shadow: Add support for Atari iplan2p8
  [13/18] Shadow: Add support for Amiga afb4
  [14/18] Shadow: Add support for Amiga afb8
  [15/18] Xfbdev: Reject unsupported frame buffer types
  [16/18] Xfbdev: Force shadowfb for frame buffers with non-packed pixels
  [17/18] Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support
  [18/18] Xfbdev: Wire up Amiga afb4 and afb8 support

All patches are relative to Debian's xorg-server-1.12.4 package.
However, all of them (except for the first one, which is Debian-specific)
apply to current xorg-server.git.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-1-git-send-email-ge...@linux-m68k.org



[PATCH 03/18] [RFC] mi: Avoid division by zero errors in miInitializeColormap()

2013-03-27 Thread Geert Uytterhoeven
If depth  3, one or more of {red,green,blue}Mask and lim[rgb] will be
zero, causing division by zero errors. Add checks to avoid this.

Question: Should we restrict depth  3 to grayscale visuals instead?
For monochrome this is already needed, as miCreateDefColormap() only
preallocates black and white pixels if depth  1.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 mi/micmap.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mi/micmap.c b/mi/micmap.c
index 3ef0c8c..c02596b 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -138,13 +138,13 @@ miInitializeColormap(ColormapPtr pmap)
 limb = pVisual-blueMask  pVisual-offsetBlue;
 for (i = 0; i = maxent; i++) {
 /* rescale to [0..65535] then rgb bits */
-pmap-red[i].co.local.red =
+pmap-red[i].co.local.red = !limr ? 0 :
 ((i  pVisual-redMask)  pVisual-offsetRed)
 * 65535) / limr)  shift) * 65535) / lim;
-pmap-red[i].co.local.green =
+pmap-red[i].co.local.green = !limg ? 0 :
 ((i  pVisual-greenMask)  pVisual-offsetGreen)
 * 65535) / limg)  shift) * 65535) / lim;
-pmap-red[i].co.local.blue =
+pmap-red[i].co.local.blue = !limb ? 0 :
 ((i  pVisual-blueMask)  pVisual-offsetBlue)
 * 65535) / limb)  shift) * 65535) / lim;
 }
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-4-git-send-email-ge...@linux-m68k.org



[PATCH 12/18] Shadow: Add support for Atari iplan2p8

2013-03-27 Thread Geert Uytterhoeven
Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
and 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/Makefile.am  |1 +
 miext/shadow/shadow.h |3 +
 miext/shadow/shiplan2p8.c |  137 +
 3 files changed, 141 insertions(+), 0 deletions(-)
 create mode 100644 miext/shadow/shiplan2p8.c

diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index adb10bf..882463e 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -11,6 +11,7 @@ libshadow_la_SOURCES =\
shadow.h\
shalloc.c   \
shiplan2p4.c\
+   shiplan2p8.c\
shpacked.c  \
shplanar8.c \
shplanar.c  \
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index d62903c..e190cd4 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -99,6 +99,9 @@ extern _X_EXPORT void
  shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
+ shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
  shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
diff --git a/miext/shadow/shiplan2p8.c b/miext/shadow/shiplan2p8.c
new file mode 100644
index 000..55762f6
--- /dev/null
+++ b/miext/shadow/shiplan2p8.c
@@ -0,0 +1,137 @@
+/*
+ *
+ * Copyright © 2013 Geert Uytterhoeven
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Geert Uytterhoeven not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Geert Uytterhoeven makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided as is without express or implied warranty.
+ *
+ * GEERT UYTTERHOEVEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL GEERT UYTTERHOEVEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Based on shpacked.c, which is Copyright © 2000 Keith Packard
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include dix-config.h
+#endif
+
+#include stdlib.h
+
+#includeX11/X.h
+#includescrnintstr.h
+#includewindowstr.h
+#includeX11/fonts/font.h
+#includedixfontstr.h
+#includeX11/fonts/fontstruct.h
+#includemi.h
+#includeregionstr.h
+#includeglobals.h
+#includegcstruct.h
+#includeshadow.h
+#includefb.h
+#includec2p_core.h
+
+
+/*
+ *  Perform a full C2P step on 16 8-bit pixels, stored in 4 32-bit words
+ *  containing
+ *- 16 8-bit chunky pixels on input
+ *- permutated planar data (2 planes per 32-bit word) on output
+ */
+
+static void c2p_16x8(CARD32 d[4])
+{
+transp4(d, 8, 2);
+transp4(d, 1, 2);
+transp4x(d, 16, 2);
+transp4x(d, 2, 2);
+transp4(d, 4, 1);
+}
+
+
+/*
+ *  Store a full block of permutated iplan2p8 data after c2p conversion
+ */
+
+static inline void store_iplan2p8(void *dst, const CARD32 d[4])
+{
+CARD32 *p = dst;
+
+*p++ = d[1];
+*p++ = d[3];
+*p++ = d[0];
+*p++ = d[2];
+}
+
+
+void
+shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+RegionPtr damage = shadowDamage(pBuf);
+PixmapPtr pShadow = pBuf-pPixmap;
+int nbox = RegionNumRects(damage);
+BoxPtr pbox = RegionRects(damage);
+FbBits *shaBase;
+CARD16 *shaLine, *sha;
+FbStride shaStride;
+int scrLine;
+_X_UNUSED int shaBpp, shaXoff, shaYoff;
+int x, y, w, h;
+int i, n;
+CARD16 *win;
+_X_UNUSED CARD32 winSize;
+union {
+CARD8 bytes[16];
+CARD32 words[4];
+} d;
+
+fbGetDrawable(pShadow-drawable, shaBase, shaStride, shaBpp, shaXoff,
+  shaYoff);
+shaStride *= sizeof(FbBits) / sizeof(CARD16);
+
+while (nbox--) {
+x = pbox-x1;
+y = pbox-y1;
+w = pbox-x2 - pbox-x1;
+h = pbox-y2 - pbox-y1;
+
+scrLine = x  -16;
+shaLine = (CARD16 *)shaBase + y * shaStride + scrLine / sizeof(CARD16);
+
+n = ((x  15) + w + 15) / 16;   /* number of c2p units in scanline */
+
+while (h--) {
+sha = shaLine;
+win = (CARD16 *) (*pBuf-window) (pScreen,
+  y

[PATCH 11/18] Shadow: Add support for Atari iplan2p4

2013-03-27 Thread Geert Uytterhoeven
Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
and 4 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/Makefile.am  |1 +
 miext/shadow/shadow.h |3 +
 miext/shadow/shiplan2p4.c |  136 +
 3 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 miext/shadow/shiplan2p4.c

diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 30f7bda..adb10bf 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -10,6 +10,7 @@ libshadow_la_SOURCES =\
shadow.c\
shadow.h\
shalloc.c   \
+   shiplan2p4.c\
shpacked.c  \
shplanar8.c \
shplanar.c  \
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index 83de22c..d62903c 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -96,6 +96,9 @@ shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, 
ShadowWindowProc window);
 extern _X_EXPORT void *shadowAlloc(int width, int height, int bpp);
 
 extern _X_EXPORT void
+ shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
  shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
diff --git a/miext/shadow/shiplan2p4.c b/miext/shadow/shiplan2p4.c
new file mode 100644
index 000..79ada99
--- /dev/null
+++ b/miext/shadow/shiplan2p4.c
@@ -0,0 +1,136 @@
+/*
+ *
+ * Copyright © 2013 Geert Uytterhoeven
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Geert Uytterhoeven not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Geert Uytterhoeven makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided as is without express or implied warranty.
+ *
+ * GEERT UYTTERHOEVEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL GEERT UYTTERHOEVEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Based on shpacked.c, which is Copyright © 2000 Keith Packard
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include dix-config.h
+#endif
+
+#include stdlib.h
+
+#includeX11/X.h
+#includescrnintstr.h
+#includewindowstr.h
+#includeX11/fonts/font.h
+#includedixfontstr.h
+#includeX11/fonts/fontstruct.h
+#includemi.h
+#includeregionstr.h
+#includeglobals.h
+#includegcstruct.h
+#includeshadow.h
+#includefb.h
+#includec2p_core.h
+
+
+/*
+ *  Perform a full C2P step on 16 4-bit pixels, stored in 2 32-bit words
+ *  containing
+ *- 16 4-bit chunky pixels on input
+ *- permutated planar data (2 planes per 32-bit word) on output
+ */
+
+static void c2p_16x4(CARD32 d[2])
+{
+transp2(d, 8);
+transp2(d, 2);
+transp2x(d, 1);
+transp2(d, 16);
+transp2(d, 4);
+transp2(d, 1);
+}
+
+
+/*
+ *  Store a full block of iplan2p4 data after c2p conversion
+ */
+
+static inline void store_iplan2p4(void *dst, const CARD32 d[2])
+{
+CARD32 *p = dst;
+
+*p++ = d[0];
+*p++ = d[1];
+}
+
+
+void
+shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+RegionPtr damage = shadowDamage(pBuf);
+PixmapPtr pShadow = pBuf-pPixmap;
+int nbox = RegionNumRects(damage);
+BoxPtr pbox = RegionRects(damage);
+FbBits *shaBase;
+CARD16 *shaLine, *sha;
+FbStride shaStride;
+int scrLine;
+_X_UNUSED int shaBpp, shaXoff, shaYoff;
+int x, y, w, h;
+int i, n;
+CARD16 *win;
+_X_UNUSED CARD32 winSize;
+union {
+CARD8 bytes[8];
+CARD32 words[2];
+} d;
+
+fbGetDrawable(pShadow-drawable, shaBase, shaStride, shaBpp, shaXoff,
+  shaYoff);
+shaStride *= sizeof(FbBits) / sizeof(CARD16);
+
+while (nbox--) {
+x = pbox-x1;
+y = pbox-y1;
+w = pbox-x2 - pbox-x1;
+h = pbox-y2 - pbox-y1;
+
+scrLine = (x  -16) / 2;
+shaLine = (CARD16 *)shaBase + y * shaStride + scrLine / sizeof(CARD16);
+
+n = ((x  15) + w + 15) / 16;   /* number of c2p units in scanline */
+
+while (h--) {
+sha = shaLine;
+win = (CARD16 *) (*pBuf-window) (pScreen

[PATCH 08/18] Xfbdev: Add support for monochrome visuals

2013-03-27 Thread Geert Uytterhoeven
Monochrome supports StaticGray, with hardcoded black and white pixels.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |   24 
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 7b29f42..0082575 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -211,6 +211,10 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv 
* scrpriv)
 priv-fix.line_length = (priv-var.xres_virtual * depth + 7) / 8;
 
 switch (priv-fix.visual) {
+case FB_VISUAL_MONO01:
+case FB_VISUAL_MONO10:
+screen-fb.visuals = (1  StaticGray);
+break;
 case FB_VISUAL_PSEUDOCOLOR:
 if (gray) {
 screen-fb.visuals = (1  StaticGray);
@@ -577,6 +581,26 @@ fbdevCreateColormap(ColormapPtr pmap)
 xColorItem *pdefs;
 
 switch (priv-fix.visual) {
+case FB_VISUAL_MONO01:
+pScreen-whitePixel = 0;
+pScreen-blackPixel = 1;
+pmap-red[0].co.local.red = 65535;
+pmap-red[0].co.local.green = 65535;
+pmap-red[0].co.local.blue = 65535;
+pmap-red[1].co.local.red = 0;
+pmap-red[1].co.local.green = 0;
+pmap-red[1].co.local.blue = 0;
+return TRUE;
+case FB_VISUAL_MONO10:
+pScreen-blackPixel = 0;
+pScreen-whitePixel = 1;
+pmap-red[0].co.local.red = 0;
+pmap-red[0].co.local.green = 0;
+pmap-red[0].co.local.blue = 0;
+pmap-red[1].co.local.red = 65535;
+pmap-red[1].co.local.green = 65535;
+pmap-red[1].co.local.blue = 65535;
+return TRUE;
 case FB_VISUAL_STATIC_PSEUDOCOLOR:
 pVisual = pmap-pVisual;
 nent = pVisual-ColormapEntries;
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-9-git-send-email-ge...@linux-m68k.org



[PATCH 09/18] Xfbdev: Treat 1 bpp pseudocolor as monochrome

2013-03-27 Thread Geert Uytterhoeven
miCreateDefColormap() only preallocates black and white pixels if
depth  1.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 0082575..ebbfeb9 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -216,11 +216,13 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv 
* scrpriv)
 screen-fb.visuals = (1  StaticGray);
 break;
 case FB_VISUAL_PSEUDOCOLOR:
-if (gray) {
-screen-fb.visuals = (1  StaticGray);
+screen-fb.visuals = (1  StaticGray);
+if (priv-var.bits_per_pixel == 1) {
+/* Override to monochrome, to have preallocated black/white */
+priv-fix.visual = FB_VISUAL_MONO01;
+} else if (gray) {
 /* could also support GrayScale, but what's the point? */
-}
-else {
+} else {
 screen-fb.visuals = ((1  StaticGray) |
   (1  GrayScale) |
   (1  StaticColor) |
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-10-git-send-email-ge...@linux-m68k.org



[PATCH 07/18] Xfbdev: Handle unset var.bits_per_pixel

2013-03-27 Thread Geert Uytterhoeven
Older frame buffer devices may not fill in var.bits_per_pixel, in which
case it must be calculated by the application.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index a8d36c6..7b29f42 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -206,6 +206,10 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv 
* scrpriv)
 depth = priv-var.bits_per_pixel;
 gray = priv-var.grayscale;
 
+/* Calculate fix.line_length if it's zero */
+if (!priv-fix.line_length)
+priv-fix.line_length = (priv-var.xres_virtual * depth + 7) / 8;
+
 switch (priv-fix.visual) {
 case FB_VISUAL_PSEUDOCOLOR:
 if (gray) {
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-8-git-send-email-ge...@linux-m68k.org



[PATCH 05/18] KDrive: Bail out if screen initialization failed

2013-03-27 Thread Geert Uytterhoeven
Else we may get a segmentation fault later.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/src/kdrive.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 716f18e..84d39bb 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -943,7 +943,8 @@ KdInitScreen(ScreenInfo * pScreenInfo,
 {
 KdCardInfo *card = screen-card;
 
-(*card-cfuncs-scrinit) (screen);
+if (!(*card-cfuncs-scrinit) (screen))
+FatalError(Screen initialization failed!\n);
 
 if (!card-cfuncs-initAccel)
 screen-dumb = TRUE;
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-6-git-send-email-ge...@linux-m68k.org



[PATCH 02/18] miext/shadow/shpacked.c: Remove unused PickBit() define

2013-03-27 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/shpacked.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c
index d2b2e5e..5ef18f8 100644
--- a/miext/shadow/shpacked.c
+++ b/miext/shadow/shpacked.c
@@ -98,7 +98,6 @@ shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
 i = width;
 width -= i;
 scr += i;
-#define PickBit(a,i)   (((a)  (i))  1)
 memcpy(win, sha, i * sizeof(FbBits));
 sha += i;
 }
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-3-git-send-email-ge...@linux-m68k.org



[PATCH 10/18] Shadow: Add c2p core

2013-03-27 Thread Geert Uytterhoeven
Add Chunky-to-Planar core functionality, to be used by the Atari and Amiga
(interleaved) bitplanes code.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/c2p_core.h |  184 +++
 1 files changed, 184 insertions(+), 0 deletions(-)
 create mode 100644 miext/shadow/c2p_core.h

diff --git a/miext/shadow/c2p_core.h b/miext/shadow/c2p_core.h
new file mode 100644
index 000..252f93e
--- /dev/null
+++ b/miext/shadow/c2p_core.h
@@ -0,0 +1,184 @@
+/*
+ *  Fast C2P (Chunky-to-Planar) Conversion
+ *
+ *  Copyright (C) 2003-2008 Geert Uytterhoeven
+ *
+ *  NOTES:
+ *- This code was inspired by Scout's C2P tutorial
+ *- It assumes to run on a big endian system
+ *
+ *  Permission to use, copy, modify, distribute, and sell this software and its
+ *  documentation for any purpose is hereby granted without fee, provided that
+ *  the above copyright notice appear in all copies and that both that
+ *  copyright notice and this permission notice appear in supporting
+ *  documentation, and that the name of Geert Uytterhoeven not be used in
+ *  advertising or publicity pertaining to distribution of the software without
+ *  specific, written prior permission.  Geert Uytterhoeven makes no
+ *  representations about the suitability of this software for any purpose.  It
+ *  is provided as is without express or implied warranty.
+ *
+ *  GEERT UYTTERHOEVEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ *  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ *  EVENT SHALL GEERT UYTTERHOEVEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ *  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ *  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ *  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ *  PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+/*
+ *  Basic transpose step
+ */
+
+static inline void _transp(CARD32 d[], unsigned int i1, unsigned int i2,
+   unsigned int shift, CARD32 mask)
+{
+CARD32 t = (d[i1] ^ (d[i2]  shift))  mask;
+
+d[i1] ^= t;
+d[i2] ^= t  shift;
+}
+
+
+extern void c2p_unsupported(void);
+
+static inline CARD32 get_mask(unsigned int n)
+{
+switch (n) {
+case 1:
+return 0x;
+
+case 2:
+return 0x;
+
+case 4:
+return 0x0f0f0f0f;
+
+case 8:
+return 0x00ff00ff;
+
+case 16:
+return 0x;
+}
+
+c2p_unsupported();
+return 0;
+}
+
+
+/*
+ *  Transpose operations on 8 32-bit words
+ */
+
+static inline void transp8(CARD32 d[], unsigned int n, unsigned int m)
+{
+CARD32 mask = get_mask(n);
+
+switch (m) {
+case 1:
+/* First n x 1 block */
+_transp(d, 0, 1, n, mask);
+/* Second n x 1 block */
+_transp(d, 2, 3, n, mask);
+/* Third n x 1 block */
+_transp(d, 4, 5, n, mask);
+/* Fourth n x 1 block */
+_transp(d, 6, 7, n, mask);
+return;
+
+case 2:
+/* First n x 2 block */
+_transp(d, 0, 2, n, mask);
+_transp(d, 1, 3, n, mask);
+/* Second n x 2 block */
+_transp(d, 4, 6, n, mask);
+_transp(d, 5, 7, n, mask);
+return;
+
+case 4:
+/* Single n x 4 block */
+_transp(d, 0, 4, n, mask);
+_transp(d, 1, 5, n, mask);
+_transp(d, 2, 6, n, mask);
+_transp(d, 3, 7, n, mask);
+return;
+}
+
+c2p_unsupported();
+}
+
+
+/*
+ *  Transpose operations on 4 32-bit words
+ */
+
+static inline void transp4(CARD32 d[], unsigned int n, unsigned int m)
+{
+CARD32 mask = get_mask(n);
+
+switch (m) {
+case 1:
+/* First n x 1 block */
+_transp(d, 0, 1, n, mask);
+/* Second n x 1 block */
+_transp(d, 2, 3, n, mask);
+return;
+
+case 2:
+/* Single n x 2 block */
+_transp(d, 0, 2, n, mask);
+_transp(d, 1, 3, n, mask);
+return;
+}
+
+c2p_unsupported();
+}
+
+
+/*
+ *  Transpose operations on 4 32-bit words (reverse order)
+ */
+
+static inline void transp4x(CARD32 d[], unsigned int n, unsigned int m)
+{
+CARD32 mask = get_mask(n);
+
+switch (m) {
+case 2:
+/* Single n x 2 block */
+_transp(d, 2, 0, n, mask);
+_transp(d, 3, 1, n, mask);
+return;
+}
+
+c2p_unsupported();
+}
+
+
+/*
+ *  Transpose operations on 2 32-bit words
+ */
+
+static inline void transp2(CARD32 d[], unsigned int n)
+{
+CARD32 mask = get_mask(n);
+
+/* Single n x 1 block */
+_transp(d, 0, 1, n, mask);
+return;
+}
+
+
+/*
+ *  Transpose operations on 2 32-bit words (reverse order)
+ */
+
+static inline void transp2x(CARD32 d[], unsigned int n)
+{
+CARD32 mask = get_mask(n);
+
+/* Single n x 1 block */
+_transp(d, 1, 0, n, mask);
+return

[PATCH 06/18] Xfbdev: Make char *fbdevDevicePath const

2013-03-27 Thread Geert Uytterhoeven
This fixes:

hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize':
hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier 
from pointer target type [enabled by default]

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |2 +-
 hw/kdrive/fbdev/fbdev.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index d6fcf1a..a8d36c6 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -30,7 +30,7 @@
 
 extern int KdTsPhyScreen;
 
-char *fbdevDevicePath = NULL;
+const char *fbdevDevicePath = NULL;
 
 static Bool
 fbdevInitialize(KdCardInfo * card, FbdevPriv * priv)
diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h
index 0706f4e..f3f7aec 100644
--- a/hw/kdrive/fbdev/fbdev.h
+++ b/hw/kdrive/fbdev/fbdev.h
@@ -49,7 +49,7 @@ typedef struct _fbdevScrPriv {
 } FbdevScrPriv;
 
 extern KdCardFuncs fbdevFuncs;
-extern char *fbdevDevicePath;
+extern const char *fbdevDevicePath;
 
 Bool
  fbdevCardInit(KdCardInfo * card);
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-7-git-send-email-ge...@linux-m68k.org



[PATCH 04/18] test/input: Fix double-aligned test in dix_valuator_alloc() on m68k

2013-03-27 Thread Geert Uytterhoeven
On m68k, doubles are not 64-bit aligned, just like on i386 and sh.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 test/input.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/input.c b/test/input.c
index 90ab9ae..e2c8f4d 100644
--- a/test/input.c
+++ b/test/input.c
@@ -1354,7 +1354,7 @@ dix_valuator_alloc(void)
 
 assert(v);
 assert(v-numAxes == num_axes);
-#if !defined(__i386__)  !defined(__sh__)
+#if !defined(__i386__)  !defined(__mc68000__)  !defined(__sh__)
 /* must be double-aligned on 64 bit */
 assert(((void *) v-axisVal - (void *) v) % sizeof(double) == 0);
 assert(((void *) v-axes - (void *) v) % sizeof(double) == 0);
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-5-git-send-email-ge...@linux-m68k.org



[PATCH 17/18] Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support

2013-03-27 Thread Geert Uytterhoeven
Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
and 4 or 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |   19 ++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 52dfbf5..40747fe 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -439,7 +439,24 @@ fbdevSetShadow(ScreenPtr pScreen)
 break;
 
 case FB_TYPE_INTERLEAVED_PLANES:
-FatalError(Interleaved bitplanes are not yet supported\n);
+if (priv-fix.type_aux == 2) {
+switch (priv-var.bits_per_pixel) {
+case 4:
+update = shadowUpdateIplan2p4;
+break;
+
+case 8:
+update = shadowUpdateIplan2p8;
+break;
+
+default:
+FatalError(Atari interleaved bitplanes with bpp %u are not 
yet supported\n,
+   priv-var.bits_per_pixel);
+}
+} else {
+FatalError(Interleaved bitplanes with interleave %u are not yet 
supported\n,
+   priv-fix.type_aux);
+}
 break;
 
 case FB_TYPE_TEXT:
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-18-git-send-email-ge...@linux-m68k.org



[PATCH 14/18] Shadow: Add support for Amiga afb8

2013-03-27 Thread Geert Uytterhoeven
Add support for Amiga-style bitplanes, with 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/Makefile.am |1 +
 miext/shadow/shadow.h|3 +
 miext/shadow/shafb8.c|  143 ++
 3 files changed, 147 insertions(+), 0 deletions(-)
 create mode 100644 miext/shadow/shafb8.c

diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index d2142ad..1db8a26 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -10,6 +10,7 @@ libshadow_la_SOURCES =\
shadow.c\
shadow.h\
shafb4.c\
+   shafb8.c\
shalloc.c   \
shiplan2p4.c\
shiplan2p8.c\
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index f9ea6c4..421ae96 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -99,6 +99,9 @@ extern _X_EXPORT void
  shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
+ shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
  shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
diff --git a/miext/shadow/shafb8.c b/miext/shadow/shafb8.c
new file mode 100644
index 000..0835e16
--- /dev/null
+++ b/miext/shadow/shafb8.c
@@ -0,0 +1,143 @@
+/*
+ *
+ * Copyright © 2013 Geert Uytterhoeven
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Geert Uytterhoeven not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Geert Uytterhoeven makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided as is without express or implied warranty.
+ *
+ * GEERT UYTTERHOEVEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL GEERT UYTTERHOEVEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Based on shpacked.c, which is Copyright © 2000 Keith Packard
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include dix-config.h
+#endif
+
+#include stdlib.h
+
+#includeX11/X.h
+#includescrnintstr.h
+#includewindowstr.h
+#includeX11/fonts/font.h
+#includedixfontstr.h
+#includeX11/fonts/fontstruct.h
+#includemi.h
+#includeregionstr.h
+#includeglobals.h
+#includegcstruct.h
+#includeshadow.h
+#includefb.h
+#includec2p_core.h
+
+
+/*
+ *  Perform a full C2P step on 32 8-bit pixels, stored in 8 32-bit words
+ *  containing
+ *- 32 8-bit chunky pixels on input
+ *- permutated planar data (1 plane per 32-bit word) on output
+ */
+
+static void c2p_32x8(CARD32 d[8])
+{
+transp8(d, 16, 4);
+transp8(d, 8, 2);
+transp8(d, 4, 1);
+transp8(d, 2, 4);
+transp8(d, 1, 2);
+}
+
+
+/*
+ *  Store a full block of permutated planar data after c2p conversion
+ */
+
+static inline void store_afb8(void *dst, unsigned int stride,
+  const CARD32 d[8])
+{
+CARD8 *p = dst;
+
+*(CARD32 *)p = d[7]; p += stride;
+*(CARD32 *)p = d[5]; p += stride;
+*(CARD32 *)p = d[3]; p += stride;
+*(CARD32 *)p = d[1]; p += stride;
+*(CARD32 *)p = d[6]; p += stride;
+*(CARD32 *)p = d[4]; p += stride;
+*(CARD32 *)p = d[2]; p += stride;
+*(CARD32 *)p = d[0]; p += stride;
+}
+
+
+void
+shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+RegionPtr damage = shadowDamage(pBuf);
+PixmapPtr pShadow = pBuf-pPixmap;
+int nbox = RegionNumRects(damage);
+BoxPtr pbox = RegionRects(damage);
+FbBits *shaBase;
+CARD32 *shaLine, *sha;
+FbStride shaStride;
+int scrLine;
+_X_UNUSED int shaBpp, shaXoff, shaYoff;
+int x, y, w, h;
+int i, n;
+CARD32 *win;
+CARD32 off, winStride;
+union {
+CARD8 bytes[32];
+CARD32 words[8];
+} d;
+
+fbGetDrawable(pShadow-drawable, shaBase, shaStride, shaBpp, shaXoff,
+  shaYoff);
+if (sizeof(FbBits) != sizeof(CARD32))
+shaStride = shaStride * sizeof(FbBits) / sizeof(CARD32);
+
+while (nbox--) {
+x = pbox-x1;
+y = pbox-y1;
+w = pbox-x2 - pbox-x1;
+h = pbox-y2 - pbox-y1;
+
+scrLine = x  -32;
+shaLine = (CARD32 *)shaBase + y

[PATCH 18/18] Xfbdev: Wire up Amiga afb4 and afb8 support

2013-03-27 Thread Geert Uytterhoeven
Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |   30 +-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 40747fe..95f64cb 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -319,6 +319,21 @@ fbdevWindowLinear(ScreenPtr pScreen,
 return (CARD8 *) priv-fb + row * priv-fix.line_length + offset;
 }
 
+static void *
+fbdevWindowAfb(ScreenPtr pScreen,
+   CARD32 row,
+   CARD32 offset, int mode, CARD32 *size, void *closure)
+{
+KdScreenPriv(pScreen);
+FbdevPriv *priv = pScreenPriv-card-driver;
+
+if (!pScreenPriv-enabled)
+return 0;
+/* offset to next plane */
+*size = priv-var.yres_virtual * priv-fix.line_length;
+return (CARD8 *) priv-fb + row * priv-fix.line_length + offset;
+}
+
 Bool
 fbdevMapFramebuffer(KdScreenInfo * screen)
 {
@@ -435,7 +450,20 @@ fbdevSetShadow(ScreenPtr pScreen)
 break;
 
 case FB_TYPE_PLANES:
-FatalError(Bitplanes are not yet supported\n);
+window = fbdevWindowAfb;
+switch (priv-var.bits_per_pixel) {
+case 4:
+update = shadowUpdateAfb4;
+break;
+
+case 8:
+update = shadowUpdateAfb8;
+break;
+
+default:
+FatalError(Bitplanes with bpp %u are not yet supported\n,
+   priv-var.bits_per_pixel);
+}
 break;
 
 case FB_TYPE_INTERLEAVED_PLANES:
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-19-git-send-email-ge...@linux-m68k.org



[PATCH 13/18] Shadow: Add support for Amiga afb4

2013-03-27 Thread Geert Uytterhoeven
Add support for Amiga-style bitplanes, with 4 bits per pixel.

Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 miext/shadow/Makefile.am |1 +
 miext/shadow/shadow.h|3 +
 miext/shadow/shafb4.c|  139 ++
 3 files changed, 143 insertions(+), 0 deletions(-)
 create mode 100644 miext/shadow/shafb4.c

diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 882463e..d2142ad 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -9,6 +9,7 @@ endif
 libshadow_la_SOURCES = \
shadow.c\
shadow.h\
+   shafb4.c\
shalloc.c   \
shiplan2p4.c\
shiplan2p8.c\
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index e190cd4..f9ea6c4 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -96,6 +96,9 @@ shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, 
ShadowWindowProc window);
 extern _X_EXPORT void *shadowAlloc(int width, int height, int bpp);
 
 extern _X_EXPORT void
+ shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
  shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
 
 extern _X_EXPORT void
diff --git a/miext/shadow/shafb4.c b/miext/shadow/shafb4.c
new file mode 100644
index 000..0724932
--- /dev/null
+++ b/miext/shadow/shafb4.c
@@ -0,0 +1,139 @@
+/*
+ *
+ * Copyright © 2013 Geert Uytterhoeven
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Geert Uytterhoeven not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Geert Uytterhoeven makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided as is without express or implied warranty.
+ *
+ * GEERT UYTTERHOEVEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL GEERT UYTTERHOEVEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Based on shpacked.c, which is Copyright © 2000 Keith Packard
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include dix-config.h
+#endif
+
+#include stdlib.h
+
+#includeX11/X.h
+#includescrnintstr.h
+#includewindowstr.h
+#includeX11/fonts/font.h
+#includedixfontstr.h
+#includeX11/fonts/fontstruct.h
+#includemi.h
+#includeregionstr.h
+#includeglobals.h
+#includegcstruct.h
+#includeshadow.h
+#includefb.h
+#includec2p_core.h
+
+
+/*
+ *  Perform a full C2P step on 32 4-bit pixels, stored in 4 32-bit words
+ *  containing
+ *- 32 4-bit chunky pixels on input
+ *- permutated planar data (1 plane per 32-bit word) on output
+ */
+
+static void c2p_32x4(CARD32 d[4])
+{
+transp4(d, 16, 2);
+transp4(d, 8, 1);
+transp4(d, 4, 2);
+transp4(d, 2, 1);
+transp4(d, 1, 2);
+}
+
+
+/*
+ *  Store a full block of permutated planar data after c2p conversion
+ */
+
+static inline void store_afb4(void *dst, unsigned int stride,
+  const CARD32 d[4])
+{
+CARD8 *p = dst;
+
+*(CARD32 *)p = d[3]; p += stride;
+*(CARD32 *)p = d[1]; p += stride;
+*(CARD32 *)p = d[2]; p += stride;
+*(CARD32 *)p = d[0]; p += stride;
+}
+
+
+void
+shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+RegionPtr damage = shadowDamage(pBuf);
+PixmapPtr pShadow = pBuf-pPixmap;
+int nbox = RegionNumRects(damage);
+BoxPtr pbox = RegionRects(damage);
+FbBits *shaBase;
+CARD32 *shaLine, *sha;
+FbStride shaStride;
+int scrLine;
+_X_UNUSED int shaBpp, shaXoff, shaYoff;
+int x, y, w, h;
+int i, n;
+CARD32 *win;
+CARD32 off, winStride;
+union {
+CARD8 bytes[16];
+CARD32 words[4];
+} d;
+
+fbGetDrawable(pShadow-drawable, shaBase, shaStride, shaBpp, shaXoff,
+  shaYoff);
+if (sizeof(FbBits) != sizeof(CARD32))
+shaStride = shaStride * sizeof(FbBits) / sizeof(CARD32);
+
+while (nbox--) {
+x = pbox-x1;
+y = pbox-y1;
+w = pbox-x2 - pbox-x1;
+h = pbox-y2 - pbox-y1;
+
+scrLine = (x  -32) / 2;
+shaLine = (CARD32 *)shaBase + y * shaStride + scrLine / sizeof(CARD32);
+
+off = scrLine / 4;  /* byte offset in bitplane scanline

[PATCH 15/18] Xfbdev: Reject unsupported frame buffer types

2013-03-27 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |   75 +++---
 1 files changed, 50 insertions(+), 25 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index ebbfeb9..f31635d 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -402,33 +402,58 @@ fbdevSetShadow(ScreenPtr pScreen)
 
 window = fbdevWindowLinear;
 update = 0;
-if (scrpriv-randr)
-if (priv-var.bits_per_pixel == 16) {
-switch (scrpriv-randr) {
-case RR_Rotate_90:
-if (useYX)
-update = shadowUpdateRotate16_90YX;
-else
-update = shadowUpdateRotate16_90;
-break;
-case RR_Rotate_180:
-update = shadowUpdateRotate16_180;
-break;
-case RR_Rotate_270:
-if (useYX)
-update = shadowUpdateRotate16_270YX;
-else
-update = shadowUpdateRotate16_270;
-break;
-default:
-update = shadowUpdateRotate16;
-break;
+switch (priv-fix.type) {
+case FB_TYPE_PACKED_PIXELS:
+if (scrpriv-randr)
+if (priv-var.bits_per_pixel == 16) {
+switch (scrpriv-randr) {
+case RR_Rotate_90:
+if (useYX)
+update = shadowUpdateRotate16_90YX;
+else
+update = shadowUpdateRotate16_90;
+break;
+case RR_Rotate_180:
+update = shadowUpdateRotate16_180;
+break;
+case RR_Rotate_270:
+if (useYX)
+update = shadowUpdateRotate16_270YX;
+else
+update = shadowUpdateRotate16_270;
+break;
+default:
+update = shadowUpdateRotate16;
+break;
+}
 }
-}
+else
+update = shadowUpdateRotatePacked;
 else
-update = shadowUpdateRotatePacked;
-else
-update = shadowUpdatePacked;
+update = shadowUpdatePacked;
+break;
+
+case FB_TYPE_PLANES:
+FatalError(Bitplanes are not yet supported\n);
+break;
+
+case FB_TYPE_INTERLEAVED_PLANES:
+FatalError(Interleaved bitplanes are not yet supported\n);
+break;
+
+case FB_TYPE_TEXT:
+FatalError(Text frame buffers are not yet supported\n);
+break;
+
+case FB_TYPE_VGA_PLANES:
+FatalError(VGA planes are not yet supported\n);
+break;
+
+default:
+FatalError(Unsupported frame buffer type %u\n, priv-fix.type);
+break;
+}
+
 return KdShadowSet(pScreen, scrpriv-randr, update, window);
 }
 
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-16-git-send-email-ge...@linux-m68k.org



[PATCH 16/18] Xfbdev: Force shadowfb for frame buffers with non-packed pixels

2013-03-27 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org
---
 hw/kdrive/fbdev/fbdev.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index f31635d..52dfbf5 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -326,7 +326,8 @@ fbdevMapFramebuffer(KdScreenInfo * screen)
 KdPointerMatrix m;
 FbdevPriv *priv = screen-card-driver;
 
-if (scrpriv-randr != RR_Rotate_0)
+if (scrpriv-randr != RR_Rotate_0 ||
+priv-fix.type != FB_TYPE_PACKED_PIXELS)
 scrpriv-shadow = TRUE;
 else
 scrpriv-shadow = FALSE;
-- 
1.7.0.4


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1364390451-9656-17-git-send-email-ge...@linux-m68k.org



Re: [PATCH 04/18] test/input: Fix double-aligned test in dix_valuator_alloc() on m68k

2013-03-27 Thread Geert Uytterhoeven
On Wed, Mar 27, 2013 at 2:55 PM, Mark Kettenis mark.kette...@xs4all.nl wrote:
 -#if !defined(__i386__)  !defined(__sh__)
 +#if !defined(__i386__)  !defined(__mc68000__)  !defined(__sh__)

 Any reason not to use __m68k__?  That's what we tend to use in BSD land.

__m68k__ is fine for me, too.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMuHMdUL8tb+k9Q=7vzyrcE8oopmoU819L4g8CBHc07p=a3...@mail.gmail.com



Bug#654630: Please review this diff for atomic ops in mesa on m68k

2012-01-10 Thread Geert Uytterhoeven
On Tue, Jan 10, 2012 at 09:56, Thorsten Glaser t...@mirbsd.de wrote:
 mesa FTBFS on m68k due to lack of GCC atomic intrinsics. (Why are
 they (still) missing, anyway?) I’ve had a look at other patches

Perhaps Andreas knows?

 floating around on this mailing list and drafted the attached diff
 which makes it at least compile again. My knowledge is not enough
 to validate that this DTRT, especially where multi-threaded pro‐
 gramming is involved, so please look it over.

CAS is a read-modify-write instruction, which is not guaranteed to work
on all m68k platforms (hence the existence of CONFIG_RMW_INSNS in
the kernel).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camuhmdunlpqgg7k4mutoyx6gtginqkqj1f2xdjhcnajg+i5...@mail.gmail.com



Bug#654630: Please review this diff for atomic ops in mesa on m68k

2012-01-10 Thread Geert Uytterhoeven
On Tue, Jan 10, 2012 at 13:55, Andreas Schwab sch...@linux-m68k.org wrote:
 Geert Uytterhoeven ge...@linux-m68k.org writes:

 On Tue, Jan 10, 2012 at 09:56, Thorsten Glaser t...@mirbsd.de wrote:
 mesa FTBFS on m68k due to lack of GCC atomic intrinsics. (Why are
 they (still) missing, anyway?) I’ve had a look at other patches

 Perhaps Andreas knows?

 They are now implemented in 4.7.

Can they easily be backported to Debian's gcc 4.x (x = 6?)?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camuhmdwskgeop4mwcq31j-q09jidf758cz9zjuodh8abv_5...@mail.gmail.com



Bug#654630: Please review this diff for atomic ops in mesa on m68k

2012-01-10 Thread Geert Uytterhoeven
On Tue, Jan 10, 2012 at 20:09, Thorsten Glaser t...@mirbsd.de wrote:
CAS is a read-modify-write instruction, which is not guaranteed to work
on all m68k platforms (hence the existence of CONFIG_RMW_INSNS in
the kernel).

 All platforms currently supported by Debian (that is, not Coldfire and
 with MMU) should have it, right? I think otherwise the cmpxchg syscall
 can be used, but, as I haven’t seen an example of it in use, I’ve not
 felt like experimenting.

It's not a CPU issue, but a bus/platform issue.

That's why we have the syscall, which is always safe to use.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMuHMdVqTX5x_ZiPUj=ra2sw-x1jkghyvwmfanscgyhqn6h...@mail.gmail.com



Bug#480656: Second run of xawtv fails with XF86DGANoDirectVideoMode

2008-05-11 Thread Geert Uytterhoeven
Package: xserver-xorg
Version: 1:7.3+10

After upgrading all xserver-xorg* packages (they all seem to have
different version numbers, so I reported the version from the xserver-xorg
package) in testing today, a first run of xawtv runs fine.

After quitting and starting a subsequent time, it fails with:

$ xawtv
This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.24-1-686)
xinerama 0: 1680x1050+0+0
xinerama 1: 1680x1050+0+0
X Error of failed request:  XF86DGANoDirectVideoMode
  Major opcode of failed request:  137 (XFree86-DGA)
  Minor opcode of failed request:  1 (XF86DGAGetVideoLL)
  Serial number of failed request:  67
  Current serial number in output stream:  67
$

Xawtv continues to work with -nodga.

There are no message reported in /var/log/Xorg.log.0 when this happens.

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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#387922: m68k syscalls for xserver-xorg-input-evdev

2006-09-19 Thread Geert Uytterhoeven
On Tue, 19 Sep 2006, Drew Parsons wrote:
 On Mon, 2006-09-18 at 16:49 +0200, Frans Pop wrote:
  On Monday 18 September 2006 14:48, Drew Parsons wrote:
   Could you tell me what the m68k flag is defined as, in the #if
   defined( )  sense as in
  
  Surprise, surprise. It is (taken from kbd-chooser in d-i):
  #if defined(__m68k__)
  
 but Geert wrote:
  __mc68000__
 
 OK, now  you guys are giving me two different values!
 Fight over it among yourselves and then let me know your confirmed value
 later :)

Both my 2.95.2 and 3.2 cross compilers define __mc68000__, but not __m68k__.

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: m68k syscalls for xserver-xorg-input-evdev

2006-09-18 Thread Geert Uytterhoeven
On Mon, 18 Sep 2006, Drew Parsons wrote:
 xserver-xorg-input-evdev 1.1.2 currently fails to build on m68k (cf.
 http://buildd.debian.org/fetch.php?pkg=xserver-xorg-input-evdevver=1%
 3A1.1.2-1arch=m68kstamp=1151064364file=logas=raw)
 
 This is because a new file inotify-syscalls.h has been added which
 defines syscalls for each specific architecture used for inotify, and
 rejects any unknown architecture, see
 http://necrotic.deadbeast.net/svn/xorg-x11/trunk/driver/xserver-xorg-input-evdev/src/inotify-syscalls.h
 
 The required syscalls are __NR_inotify_init, __NR_inotify_add_watch and
 __NR_inotify_rm_watch.
 
 If you can provide the relevant 3 numbers then we can patch evdev
 support back for m68k, and we can push the patch upstream to X.org.

According to
http://linux-m68k-cvs.ubb.ca/c/cvsweb/linux/include/asm-m68k/unistd.h:

| #define __NR_inotify_init 284
| #define __NR_inotify_add_watch285
| #define __NR_inotify_rm_watch 286

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#387922: m68k syscalls for xserver-xorg-input-evdev

2006-09-18 Thread Geert Uytterhoeven
On Mon, 18 Sep 2006, Drew Parsons wrote:
 On Mon, 2006-09-18 at 10:35 +0200, Geert Uytterhoeven wrote:
 
  According to
  http://linux-m68k-cvs.ubb.ca/c/cvsweb/linux/include/asm-m68k/unistd.h:
  
  | #define __NR_inotify_init 284
  | #define __NR_inotify_add_watch285
  | #define __NR_inotify_rm_watch 286
  
 
 Could you tell me what the m68k flag is defined as, in the #if
 defined( )  sense as in 

__mc68000__

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mouse for x

2004-09-22 Thread Geert Uytterhoeven
On Wed, 22 Sep 2004, Branden Robinson wrote:
 On Sun, Aug 22, 2004 at 02:46:31PM +0200, Christian T. Steigies wrote:
  On Sun, Aug 22, 2004 at 02:26:46PM +0200, Wouter Verhelst wrote:
   Better use /proc/hardware
   
   [EMAIL PROTECTED]:~$ cat /proc/hardware
   Model:  Motorola MVME167
   [...]
   
   [EMAIL PROTECTED]:~$ cat /proc/hardware
   Model:  Macintosh Quadra 840AV
   [...]
  
  cat /proc/hardware 
  Model:  Amiga A2000
 [...]
We have Q40 kernels since 2.4.26 IIRC,
   
   Oh, we do?
   
they should run on Q40 and Q60. Roman Zippel should be able to say how
/proc/hardware looks like for those machines.
   
   Reading the kernel source, I think that'll always be Q40, even on Q60.
  
  That's what I'm using for debian-installer archdetect.
 
 Okay.  Please comment on the following.
 
 m68k)
   # A good default for m68k depends on which sub-architecure this is.
   if [ -r /proc/hardware ]; then
 subarch=$(grep -w Model: | sed 's/Model:[[:space:]]+//')
 case $subarch in
   Amiga*)
 mouse_port_choices=/dev/amigamouse, /dev/gpmdata
 default_port=/dev/amigamouse
 ;;
   Atari*)
 mouse_port_choices=/dev/atarimouse, /dev/gpmdata
 default_port=/dev/atarimouse
 ;;
   Macintosh*)
 mouse_port_choices=/dev/adbmouse, /dev/gpmdata
 default_port=/dev/adbmouse
 ;;
   Motorola*) # BVME/MVME
 trace $func(): no good defaults known for VME mouse
   configuration
 ;;
   Q40*) # Q40/Q60
 trace $func(): no good defaults known for Q40/Q60 mouse
   configuration
 ;;
 esac
 
 I'd appreciate knowing:
 
 1) If the available and default choices for Amiga, Atari, and Mac are sane;

I think they are.

Except that Mac uses the new input layer in 2.4 and later.
This is also valid for other subarchs in 2.6.

 2) If anyone has anything to regarding VME or Q40/Q60 machines.

Q40/Q60 has PS/2 keyboard, so I guess it has a PS/2 mouse as well. Richard?

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



Bug#226973: [Linux-fbdev-devel] Re: Bug#226973: xserver-xfree86: [glint] second card at wrong resolution

2004-03-31 Thread Geert Uytterhoeven
On Wed, 31 Mar 2004, Sven Luther wrote:
 On Tue, Mar 30, 2004 at 06:02:03PM -0500, Clint Adams wrote:
   I believe that the cloack is different for 8bpp and 16 or 24 bpp, don't
   remember exactly. At 8bpp, the max clock range is 230Mhz in the driver i
   think. You looked at it, you have the hardware, you just have become the
   resident expert on this issue :).
 
  Ahh.  I tried increasing the 32bpp number to 150MHz, and was successfully
  able to use a mode at 135MHz.  I am confused as to why the Pixmap setting
  affects the ramdac frequency.  Is this a mistake or am I misunderstanding
  something?  Would it be okay to set the maximum based on depth instead
  of bitsPerPixel, or is bitsPerPixel wrong if it's set to 32 at a plain
  24-bit depth?

 I would have to look in the specs, but i believe the ramdac is only able
 to push less pixels if those are of 16 or 32 bpp. This is the case for
 all 3Dlabs chips prior to the permedia3. Look at the part in glint_driver.c
 where these values are set. I have no explanation also, since my
 involvement was with the permedia3, so maybe ask Alan Hourihane about
 it.

If your graphics controller is limited by memory bandwidth, the maximum pixel
clock depends on the number of bits per pixels, since larger pixels mean more
memory bandwidth.

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



Re: XFree86's HasLinuxInput symbol and m68k

2003-06-12 Thread Geert Uytterhoeven
On Thu, 12 Jun 2003, Wouter Verhelst wrote:
 On Thu, Jun 12, 2003 at 08:01:24AM +0200, Christoph Hellwig wrote:
  On Wed, Jun 11, 2003 at 10:55:24AM -0400, Christian T. Steigies wrote:
   No USB on m68k as far as I know (I can hear already the shouts but there
   is this cool USB Adapter for Amiga), so this should never be executed on
   m68k. Maybe not even compiled (I did not read the code too thoroughly).
  
  Can't you just plug an pci usb card into a hades?
 
 Sure, although that's more of an exception than a rule.

Assumed someone fixes the Hades support. Currently it doesn't even compile...

 Not sure whether the uhci- or ohci-drivers would work on m68k, though.

I see no reason why they won't, once Hades PCI support is running again.

So probably it's OK to assume that m68k has input support, from the XFree86
point of view.

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: XFree86's HasLinuxInput symbol and m68k

2003-06-12 Thread Geert Uytterhoeven
On Thu, 12 Jun 2003, Wouter Verhelst wrote:
 On Thu, Jun 12, 2003 at 08:01:24AM +0200, Christoph Hellwig wrote:
  On Wed, Jun 11, 2003 at 10:55:24AM -0400, Christian T. Steigies wrote:
   No USB on m68k as far as I know (I can hear already the shouts but there
   is this cool USB Adapter for Amiga), so this should never be executed on
   m68k. Maybe not even compiled (I did not read the code too thoroughly).
  
  Can't you just plug an pci usb card into a hades?
 
 Sure, although that's more of an exception than a rule.

Assumed someone fixes the Hades support. Currently it doesn't even compile...

 Not sure whether the uhci- or ohci-drivers would work on m68k, though.

I see no reason why they won't, once Hades PCI support is running again.

So probably it's OK to assume that m68k has input support, from the XFree86
point of view.

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



Re: XFree86's HasLinuxInput symbol and m68k

2003-06-11 Thread Geert Uytterhoeven
On Wed, 11 Jun 2003, Christian T. Steigies wrote:
 On Tue, Jun 10, 2003 at 10:54:36PM -0500, Branden Robinson wrote:
#ifdef LINUX_INPUT
if (xf86SetBoolOption(local-options, USB, (common-wcmOpen == 
  xf86WcmUSBOpen))) {
local-read_input=xf86WcmReadUSBInput;
common-wcmOpen=xf86WcmUSBOpen;
xf86Msg(X_CONFIG, %s: reading USB link\n, dev-identifier);
#else
if (xf86SetBoolOption(local-options, USB, 0)) {
ErrorF(The USB version of the driver isn't available for your 
  platform\n);
#endif
  
  Will it kill anyone to have this code in the XFree86 packages for m68k?
 
 No USB on m68k as far as I know (I can hear already the shouts but there
 is this cool USB Adapter for Amiga), so this should never be executed on
 m68k. Maybe not even compiled (I did not read the code too thoroughly).

The input core does compile on m68k if you really want to, but no devices use
it (for now).  So as soon as we get this USB support, the input core will be
ready ;-)

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: XFree86's HasLinuxInput symbol and m68k

2003-06-11 Thread Geert Uytterhoeven
On Wed, 11 Jun 2003, Christian T. Steigies wrote:
 On Tue, Jun 10, 2003 at 10:54:36PM -0500, Branden Robinson wrote:
#ifdef LINUX_INPUT
if (xf86SetBoolOption(local-options, USB, (common-wcmOpen == 
  xf86WcmUSBOpen))) {
local-read_input=xf86WcmReadUSBInput;
common-wcmOpen=xf86WcmUSBOpen;
xf86Msg(X_CONFIG, %s: reading USB link\n, dev-identifier);
#else
if (xf86SetBoolOption(local-options, USB, 0)) {
ErrorF(The USB version of the driver isn't available for your 
  platform\n);
#endif
  
  Will it kill anyone to have this code in the XFree86 packages for m68k?
 
 No USB on m68k as far as I know (I can hear already the shouts but there
 is this cool USB Adapter for Amiga), so this should never be executed on
 m68k. Maybe not even compiled (I did not read the code too thoroughly).

The input core does compile on m68k if you really want to, but no devices use
it (for now).  So as soon as we get this USB support, the input core will be
ready ;-)

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



Re: review wanted of new Debian X FAQ entry

2003-03-06 Thread Geert Uytterhoeven
On 5 Mar 2003, Wouter Verhelst wrote:
 Op di 04-03-2003, om 22:24 schreef Geert Uytterhoeven:
 [added [EMAIL PROTECTED] to the Cc list; -x and -powerpc should
 probably be removed, so setting reply-to]
   There are actually some 2.4 kernels available for m68k, but due to an
   issue related to glibc[1] that started somewhere in the glibc-2.2 area,
   they don't boot.
   
   There used to be a bug report on glibc regarding that issue, which was
   rather quickly reassigned to the kernel-patch-2.4.7-m68k package. Since,
   to date, nobody ever solved the issue, the latter package has now been
   removed from the archive.
  
  What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my Amiga,
  with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?
 
 No, it is not; according to the bug report, problems started with glibc
 2.2.4.
 
 I must admit that I personally never tried running a 2.4 kernel on my
 m68k box, since I did not find the time back then to try it out, and did
 not hear any success reports from people running 2.4 on m68k (not on
 [EMAIL PROTECTED], on [EMAIL PROTECTED], or in
 comp.os.linux.m68k). In fact, yours is the first success report I ever

Ah, I no longer read those mailing lists and newsgroups...

 heard. Also, I vaguely remember something about this bug being
 Mac-specific, but I might have been dreaming about that part.

That's possible...

 Are you running Debian on that particular box? If not, the problems
 could be Debian-specific...

What else would I be running? ;-) For m68k, there's really not much choice...

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: review wanted of new Debian X FAQ entry

2003-03-06 Thread Geert Uytterhoeven
On 5 Mar 2003, Wouter Verhelst wrote:
 Op di 04-03-2003, om 22:24 schreef Geert Uytterhoeven:
 [added [EMAIL PROTECTED] to the Cc list; -x and -powerpc should
 probably be removed, so setting reply-to]
   There are actually some 2.4 kernels available for m68k, but due to an
   issue related to glibc[1] that started somewhere in the glibc-2.2 area,
   they don't boot.
   
   There used to be a bug report on glibc regarding that issue, which was
   rather quickly reassigned to the kernel-patch-2.4.7-m68k package. Since,
   to date, nobody ever solved the issue, the latter package has now been
   removed from the archive.
  
  What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my 
  Amiga,
  with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?
 
 No, it is not; according to the bug report, problems started with glibc
 2.2.4.
 
 I must admit that I personally never tried running a 2.4 kernel on my
 m68k box, since I did not find the time back then to try it out, and did
 not hear any success reports from people running 2.4 on m68k (not on
 [EMAIL PROTECTED], on [EMAIL PROTECTED], or in
 comp.os.linux.m68k). In fact, yours is the first success report I ever

Ah, I no longer read those mailing lists and newsgroups...

 heard. Also, I vaguely remember something about this bug being
 Mac-specific, but I might have been dreaming about that part.

That's possible...

 Are you running Debian on that particular box? If not, the problems
 could be Debian-specific...

What else would I be running? ;-) For m68k, there's really not much choice...

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



Re: review wanted of new Debian X FAQ entry

2003-03-05 Thread Geert Uytterhoeven
On Wed, 5 Mar 2003, Christian T. Steigies wrote:
 On Tue, Mar 04, 2003 at 10:24:45PM +0100, Geert Uytterhoeven wrote:
  What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my Amiga,
  with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?
 
 I am trying to build some 2.4.20 packages. The last version I tried was
 2.4.18, which was mostly stable, but it still froze from time to time. And I
 think it did not work together with xdm. I have one built for my Amiga, but
 I cannot test it until I return home. I will try to build generic
 kernel-images for all subarches, so more people can test them, its not
 enough to have 2.4 kernel-images, they better work at least as good as the
 2.2.20 we are using now.

So you have a fairly recent 2.2.x as well? I've been thinking about upgrading
m68k to the latest 2.2.x (and even 2.0.x :-) tree myself, but due to a lack of
time that didn't happen yet.

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: review wanted of new Debian X FAQ entry

2003-03-05 Thread Geert Uytterhoeven
On Wed, 5 Mar 2003, Christian T. Steigies wrote:
 On Tue, Mar 04, 2003 at 10:24:45PM +0100, Geert Uytterhoeven wrote:
  What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my 
  Amiga,
  with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?
 
 I am trying to build some 2.4.20 packages. The last version I tried was
 2.4.18, which was mostly stable, but it still froze from time to time. And I
 think it did not work together with xdm. I have one built for my Amiga, but
 I cannot test it until I return home. I will try to build generic
 kernel-images for all subarches, so more people can test them, its not
 enough to have 2.4 kernel-images, they better work at least as good as the
 2.2.20 we are using now.

So you have a fairly recent 2.2.x as well? I've been thinking about upgrading
m68k to the latest 2.2.x (and even 2.0.x :-) tree myself, but due to a lack of
time that didn't happen yet.

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



Re: review wanted of new Debian X FAQ entry

2003-03-04 Thread Geert Uytterhoeven
On 4 Mar 2003, Wouter Verhelst wrote:
 Op ma 03-03-2003, om 23:45 schreef Branden Robinson:
  On Mon, Mar 03, 2003 at 11:15:03AM +0100, Xavier Bestel wrote:
   Le lun 03/03/2003 ? 01:36, Branden Robinson a ?crit :
   
   To date, no kernels with the feature of sending Linux keycodes exist for
   m68k-based Macintoshes.
   
   You should perhaps indicate the date and kernel version this refers to.
  
  If someone could clarify the situation with kernel 2.4 on m68k, I'd
  appreciate it.
 
 There are actually some 2.4 kernels available for m68k, but due to an
 issue related to glibc[1] that started somewhere in the glibc-2.2 area,
 they don't boot.
 
 There used to be a bug report on glibc regarding that issue, which was
 rather quickly reassigned to the kernel-patch-2.4.7-m68k package. Since,
 to date, nobody ever solved the issue, the latter package has now been
 removed from the archive.

What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my Amiga,
with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: review wanted of new Debian X FAQ entry

2003-03-04 Thread Geert Uytterhoeven
On 4 Mar 2003, Wouter Verhelst wrote:
 Op ma 03-03-2003, om 23:45 schreef Branden Robinson:
  On Mon, Mar 03, 2003 at 11:15:03AM +0100, Xavier Bestel wrote:
   Le lun 03/03/2003 ? 01:36, Branden Robinson a ?crit :
   
   To date, no kernels with the feature of sending Linux keycodes exist 
for
   m68k-based Macintoshes.
   
   You should perhaps indicate the date and kernel version this refers to.
  
  If someone could clarify the situation with kernel 2.4 on m68k, I'd
  appreciate it.
 
 There are actually some 2.4 kernels available for m68k, but due to an
 issue related to glibc[1] that started somewhere in the glibc-2.2 area,
 they don't boot.
 
 There used to be a bug report on glibc regarding that issue, which was
 rather quickly reassigned to the kernel-patch-2.4.7-m68k package. Since,
 to date, nobody ever solved the issue, the latter package has now been
 removed from the archive.

What's the real problem? I'm running 2.4.20 (from Linux/m68k CVS) on my Amiga,
with glibc-2.2.5-3? Or is this version glibc too old to exhibit the problem?

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



Re: review wanted of new Debian X FAQ entry

2003-03-03 Thread Geert Uytterhoeven
On 3 Mar 2003, Wouter Verhelst wrote:
 However, I'd like to suggest adding another entry, regarding the fact
 that on (at least) m68k-macs, it is *impossible* to switch the color
 depth or screen resolution of the display under Linux; one has to choose
 the display depth which is chosen under MacOS, and use a line such as
 
 Mode Default
 
 in the correct SubSection for the display.
 
 If a question such as this one is not already in your FAQ, that is...

But that's not true for _all_ m68k Macs, right? At least valkyriefb can do mode
switching.

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



Re: xserver-xfree8 4.0.1-8 on powerpc

2000-12-09 Thread Geert Uytterhoeven
On Wed, 6 Dec 2000, Frederic Seraphine wrote:
it still present some annoying glitch: the color of the whole display 
is
wrong, it has a general pink hue.
  
  Do you mean it is actually pink, or are you simply saying that some
  gray colours have a slightly pinkish shade?
 
 As a matter of fact, yes it's only the gray collors that are pink, but a lot
 more than just slightly
 
  Depth 16 (not 16 bpp!) is a weird mode indeed.  In depth 16, the
 
 thought it was the same thing. I still must be computer graphic illiterate 
 :-).o

Bpp (bits per pixel) is the number of bits occupied by each pixel, usually 8,
16, 24 or 32.
Depth is the actual number of bits that's used for color information. Common
values are 8, 15, 16, 24 and 30.

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



Re: XFree86 4 phase2v5 available for powerpc

2000-09-14 Thread Geert Uytterhoeven

On Wed, 13 Sep 2000, Daniel Jacobowitz wrote:
 On Wed, Sep 13, 2000 at 10:41:38AM -0400, Josh Huber wrote:
  Attached is my log output and XF86Config file.
  
  Of note, is the error that gets displayed to the console (which isn't
  in the log file):
  FBIOPUT_VSCREENINFO: Invalid argument
  
  I suspect something got broken FB related?
  
  Other than that, the packages installed fine :)
 
 The ATI Mach64 driver is known broken in these packages.  We're working
 on a viable solution to it.  Sorry.
 
  (II) ATI: ATI driver (version 6.0.4) for chipsets: ati
  (--) Chipset ATI Mach64 3D Rage LT Pro (PCI) found
  (II) resource ranges after xf86ClaimFixedResources() call:
  [0] -1  0x8080 - 0x8087 (0x8) MX[B]E
  [1] -1  0x80882000 - 0x80883fff (0x2000) MX[B]E
  [2] -1  0x80881000 - 0x80881fff (0x1000) MX[B](B)
  [3] -1  0x8100 - 0x81ff (0x100) MX[B](B)
  [4] -1  0x0c00 - 0x0cff (0x100) IX[B]E
  [5] -1  0x0c00 - 0x0cff (0x100) IX[B](B)
  Found a Mach64 on a PowerPC
  (WW) INVALID IO ALLOCATION b: 0xc00 e: 0xcff correcting
  (II) window:
  [0] -1  0x - 0x (0x1) IX[B]
 
 Hmm, that's wierd, not seen that one before.  I'm not inclined to pay
 any attention to it until we finish fixing the driver, though.

Does it work better with the new PPC PCI code in the latest 2.4.0-testX?

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


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: XFree86 4 phase2v5 available for powerpc

2000-09-14 Thread Geert Uytterhoeven
On Wed, 13 Sep 2000, Daniel Jacobowitz wrote:
 On Wed, Sep 13, 2000 at 10:41:38AM -0400, Josh Huber wrote:
  Attached is my log output and XF86Config file.
  
  Of note, is the error that gets displayed to the console (which isn't
  in the log file):
  FBIOPUT_VSCREENINFO: Invalid argument
  
  I suspect something got broken FB related?
  
  Other than that, the packages installed fine :)
 
 The ATI Mach64 driver is known broken in these packages.  We're working
 on a viable solution to it.  Sorry.
 
  (II) ATI: ATI driver (version 6.0.4) for chipsets: ati
  (--) Chipset ATI Mach64 3D Rage LT Pro (PCI) found
  (II) resource ranges after xf86ClaimFixedResources() call:
  [0] -1  0x8080 - 0x8087 (0x8) MX[B]E
  [1] -1  0x80882000 - 0x80883fff (0x2000) MX[B]E
  [2] -1  0x80881000 - 0x80881fff (0x1000) MX[B](B)
  [3] -1  0x8100 - 0x81ff (0x100) MX[B](B)
  [4] -1  0x0c00 - 0x0cff (0x100) IX[B]E
  [5] -1  0x0c00 - 0x0cff (0x100) IX[B](B)
  Found a Mach64 on a PowerPC
  (WW) INVALID IO ALLOCATION b: 0xc00 e: 0xcff correcting
  (II) window:
  [0] -1  0x - 0x (0x1) IX[B]
 
 Hmm, that's wierd, not seen that one before.  I'm not inclined to pay
 any attention to it until we finish fixing the driver, though.

Does it work better with the new PPC PCI code in the latest 2.4.0-testX?

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



Re: /etc/X11/Xmodmap re-revisited

2000-03-02 Thread Geert Uytterhoeven
On Wed, 1 Mar 2000, Tom Rini wrote:
 On Wed, Mar 01, 2000 at 06:00:16PM -0500, Branden Robinson wrote:
  [debian-x: I'm following up a thread on -powerpc]
  
  Actually, I've decided to do the sensible (?) thing and identify the
  keycodes by keyboard model rather than the machine architecture.  One way
  or another you can probably manage to plug a PC keyboard into just about
  anything, so it doesn't make much sense to refer to it as an i386
  keyboard.
 
 Right, but the important question is will it still be a PC keyboard?

It's a PS/2 keyboard (or PC/AT).

 If the PC keyboard goes in via USB, it's either a PC keyboard on x86,
 an ADB keyboard on PPC, or Non-existant on other arches (tho I suspect
 a similar translation-style to other arches).  As for the few models of PPC

Yuk.

 hardware which can take a PS/2 style keyboard directly, I _think_ they do
 stay the same, keycode wise.
 
 So, my point, and I think there was one in there, is to be careful how you
 label 'em.  It's only the type of keyboard it says, if it's not being adapted
 somehow.

PReP takes a PS/2 keyboard
PowerMac takes an ADB keyboard
CHRP takes a PS/2 or ADB keyboard
APUS takes an Amiga keyboard

and USB is something special...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [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


Re: /etc/X11/Xmodmap re-revisited

2000-03-02 Thread Geert Uytterhoeven
On Thu, 2 Mar 2000, BenH wrote:
 On Wed, Mar 1, 2000, Branden Robinson [EMAIL PROTECTED] wrote:
 Actually, I've decided to do the sensible (?) thing and identify the
 keycodes by keyboard model rather than the machine architecture.  One way
 or another you can probably manage to plug a PC keyboard into just about
 anything, so it doesn't make much sense to refer to it as an i386
 keyboard.
 
 Comments?  Suggestions?
 
 The last time I looked at the USB keyboard driver, it was broken enough
 to prevent you from doing that.
 
 basically, it will either convert the keycodes to PC keycodes if you are
 compiling for i386, or to ADB keycodes if CONFIG_MAC_KEYBOARD is defined,
 or will just not compile if neither of them is defined.
 
 I'll see with the maintainer if this can be changed to simply use PC
 keycodes all the time on all archs _except_ when we are running on a
 PowerMac (and this will be checked at runtime and not compile time).

No!!! Been there, done that (for Amiga keyboards). Keycode conversion is evil.
I can dig up this 1995-discussion on linux-m68k if you're interested.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [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


Re: /etc/X11/Xmodmap re-revisited

2000-03-02 Thread Geert Uytterhoeven
On Thu, 2 Mar 2000, Benjamin Herrenschmidt wrote:
 On Thu, Mar 2, 2000, Geert Uytterhoeven [EMAIL PROTECTED] wrote:
  I'll see with the maintainer if this can be changed to simply use PC
  keycodes all the time on all archs _except_ when we are running on a
  PowerMac (and this will be checked at runtime and not compile time).
 
 No!!! Been there, done that (for Amiga keyboards). Keycode conversion is
 evil.
 I can dig up this 1995-discussion on linux-m68k if you're interested.
 
 The keycode conversion is already there and too many things rely on macs
 having ADB keycodes already.
 
 Also, the current USB driver is bogus because it simply won't compile if
 you are not on a i386 or you don't have the CONFIG_MAC_KEYBOARD defined.
 The ADB keycode conversion is currently always done when it's defined.
 
 So we need to have this fixed in a way or another. My idea is basically
 to extend the mecanism used for x86 to all archs instead of just failing
 compile, and leave the exceptional conversion to ADB keycodes for
 powermacs, but instead of making it a compile time option, make it a
 _runtime_ option so that the common CHRP/PREP/PMAC kernel won't try to do
 ADB keycodes on non-pmac machines.

So what are you gonna do on my box when I install a PCI USB adapter? Then I
can have PS/2, ADB and USB keyboards.

If you use XF68_FBDev with XKB disabled, it will ask the kernel for the mapping
keycode/keysym, and it'll work automagically with whatever type of keyboard you
have. So user space programs do not have to know about a specific keycode
mapping.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven - Sony Software Development Center Europe (SDCE)
[EMAIL PROTECTED] --- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248638 Fax +32-2-7262686  B-1130 Brussels, Belgium


Re: /etc/X11/Xmodmap re-revisited

2000-03-02 Thread Geert Uytterhoeven
On Thu, 2 Mar 2000, Sven LUTHER wrote:
 On Wed, Mar 01, 2000 at 06:00:16PM -0500, Branden Robinson wrote:
  [debian-x: I'm following up a thread on -powerpc]
  
  Actually, I've decided to do the sensible (?) thing and identify the
  keycodes by keyboard model rather than the machine architecture.  One way
  or another you can probably manage to plug a PC keyboard into just about
  anything, so it doesn't make much sense to refer to it as an i386
  keyboard.
 
 If i remmeber well, you can buy a PC keyboard to amiga keyboard connecter,
 that will let you use any PC keyboard as if it were an amiga keyboard,
 transparently.

But it behaves like an Amiga keyboard!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [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


Re: xfree86-1 3.3.6-3; 3 down, 3 to go

2000-01-27 Thread Geert Uytterhoeven
On Thu, 27 Jan 2000, Sven LUTHER wrote:
 On Wed, Jan 26, 2000 at 02:29:30PM -0500, Branden Robinson wrote:
  On Wed, Jan 26, 2000 at 04:44:36PM +0100, Sven LUTHER wrote:
   Ok thanks, ...
   
   i managed to build it in ~600MBs, being root and all so it will use the 
   extra
   space also, and removing stuff as it goes, specially the upstream source. 
   But
   it never passed the build stage even so.
   
   Does the packages contain the fbdev-dpms.patch and kbdrate.patch i was 
   sent
   when 3.3.6-1 was out ?
  
  I'm not familiar with these, what are they?
 
 i got a message from someone telling me about this two patches. Apparently
 kbdrate.patch is needed on some macs since the kbdrate changes in Xfree. I
 have no macs, and lost my mail archive, so i don't know if this is still true
 with 3.3.6-3, please someone from the debian-powerpc list test it.

They mess directly with the (assumed PC-style) keyboard hardware, which breaks
horribly on machines that don't have such hardware. This patch definitely has
to go in.

 The second patch fbdev-dpms.patch contains a patch to have dpms aware fbdev
 Xserver. Since i cannot compile, i couldn't test it.

I never tried that patch, but it's needed to make use of the power save ioctl
in frame buffer devices.

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [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