[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#338241: marked as done (Wrong colours with the fbdev driver on framebuffer devices with unusual RGB ordering)



Your message dated Sun, 06 May 2007 23:30:38 +0200
with message-id <463E48FE.6000903@ens-lyon.org>
and subject line Bug#338241: Wrong colours with the fbdev driver on framebuffer devices with unusual RGB ordering
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xserver-xorg
Version: 6.8.2.dfsg.1-7
Severity: important
Tags: patch

When setting a video mode, the framebuffer driver chooses also an order
of the RGB bits inside the pixel data and a number of bits per pixel
for truecolour video modi (15, 16 and 24 bpp). But these values can not
be chosen, they depend on the present hardware. If the hardware differs
from the framebuffers choice, wrong colours are the result, or even
total rubbish if it is a wrong number of bits per pixel. Both problems
happen for instance on some ARM-based machines, so that only 8bpp modi
have been usable up to now.

So, the framebuffer driver should fixup these values after setting the
video mode of the framebuffer device. A patch is include below. On my
ARM hardware (Castle Iyonix, Acorn RiscPC) it works fine.

Peter Teichmann


diff -urd xc.orig/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c
--- xc.orig/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c	2005-10-25 23:02:07.000000000 +0200
+++ xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c	2005-10-25 22:35:49.000000000 +0200
@@ -693,6 +693,26 @@
 			   "FBIOGET_VSCREENINFO: %s\n", strerror(errno));
 		return FALSE;
 	}
+
+	/* fixup desired values that can not be chosen
+	   but depend on the given framebuffer device */	
+	pScrn->offset.red   = fPtr->var.red.offset;
+	pScrn->offset.green = fPtr->var.green.offset;
+	pScrn->offset.blue  = fPtr->var.blue.offset;
+	pScrn->mask.red     = ((1 << fPtr->var.red.length) - 1) << fPtr->var.red.offset;
+	pScrn->mask.green   = ((1 << fPtr->var.green.length) - 1) << fPtr->var.green.offset;
+	pScrn->mask.blue    = ((1 << fPtr->var.blue.length) - 1) << fPtr->var.blue.offset;
+	pScrn->bitsPerPixel = fPtr->var.bits_per_pixel;
+	
+	xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+		   "Setting screen mode:\n");
+	xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+		   "  Resolution: %dx%d, Depth %d, BPP %d\n",
+		   fPtr->var.xres, fPtr->var.yres, pScrn->depth, pScrn->bitsPerPixel);
+	xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+		   "  RGB masks: %08x %08x %08x\n",
+		   pScrn->mask.red, pScrn->mask.green, pScrn->mask.blue);
+		   
 	return TRUE;
 }
 


--- End Message ---
--- Begin Message ---
Version: 2:1.3.0.0.dfsg-3

Marked as fixed-upstream a while, should be fixed in xserver 1.3 (and
maybe even if 1.2), closing.

Brice


--- End Message ---

Reply to: