From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Xen-devel <xen-devel@lists.xensource.com>
Cc: George Coker <gscoker@tycho.nsa.gov>
Subject: Fbdev graphics broken in xen/next dom0
Date: Fri, 12 Mar 2010 15:24:33 -0500 [thread overview]
Message-ID: <4B9AA301.6090303@tycho.nsa.gov> (raw)
[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]
Hello:
I work in the same group as Dave Quigley and George Coker. I'm working
on a graphical switcher application for Xen which uses the DirectFB
library on top of Linux VESA fbdev. This runs in dom0 at the moment.
I'm using the latest xen/next pvops dom0 and xen-unstable hypervisor
compiled from source, with vga=ask so I can boot dom0 in a graphical mode.
The problem I'm having is illustrated by the attached test program that
displays a green background with a white square for 10 seconds when run
as root. It doesn't work on the xen/next / xen-unstable combo. The
program runs and exits normally but all I see is a black screen.
The program *does* work on xen/next running on the bare metal. It also
works using the xen-unstable hypervisor with an older dom0, the 2.6.31.4
kernel with Novell patches. So I think the issue is in the xen/next
kernel. I've run the test program on different machines and observed
the same behavior.
The xen-unstable / 2.6.31.4 dom0 combination works and I'm using that
for the moment but I'd like to be using pvops. I would be happy to run
more tests / provide more data if needed.
--
Eamon Walsh
National Security Agency
[-- Attachment #2: dfbtest.c --]
[-- Type: text/plain, Size: 2689 bytes --]
/* Requires the directfb-devel package, compile with
* gcc -I/usr/include/direcfb -o dfbtest dfbtest.c -ldirectfb
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <directfb.h>
#define DFBCHECK(x...) \
{ \
int ret = x; \
if (ret != DFB_OK) { \
fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
DirectFBErrorFatal( #x, ret ); \
} \
}
int
main(int argc, char **argv)
{
IDirectFB *dfb;
IDirectFBDisplayLayer *dl;
DFBWindowDescription wdesc;
IDirectFBScreen *scr;
IDirectFBWindow *window;
IDirectFBSurface *surf;
int screen_width, screen_height;
// Create the frame buffer interface
DFBCHECK(DirectFBInit(&argc, &argv))
DFBCHECK(DirectFBCreate(&dfb));
DFBCHECK(dfb->SetCooperativeLevel(dfb, DFSCL_EXCLUSIVE));
// Grab the interface to the screen primary display layer
DFBCHECK(dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &dl));
DFBCHECK(dl->SetCooperativeLevel(dl, DLSCL_EXCLUSIVE));
DFBCHECK(dfb->GetScreen(dfb, 0, &scr));
DFBCHECK(scr->GetSize(scr, &screen_width, &screen_height));
DFBCHECK(dl->SetBackgroundColor(dl, 0, 0xff, 0, 0xff));
DFBCHECK(dl->SetBackgroundMode(dl, DLBM_COLOR));
/* Create a window */
memset(&wdesc, 0, sizeof(wdesc));
wdesc.flags = DWDESC_CAPS | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_PIXELFORMAT | DWDESC_SURFACE_CAPS | DWDESC_OPTIONS | DWDESC_STACKING;
wdesc.caps = DWCAPS_DOUBLEBUFFER | DWCAPS_NODECORATION | DWCAPS_NOFOCUS;
wdesc.width = 100;
wdesc.height = 100;
wdesc.posx = screen_width / 2 - 50;
wdesc.posy = screen_height / 2 - 50;
wdesc.surface_caps = DSCAPS_FLIPPING;
wdesc.pixelformat = DSPF_RGB32;
wdesc.options = DWOP_SCALE | DWOP_INDESTRUCTIBLE | DWOP_GHOST;
wdesc.stacking = DWSC_UPPER;
DFBCHECK(dl->CreateWindow(dl, &wdesc, &window))
window->SetOpacity(window, 0xff);
window->GetSurface(window, &surf);
surf->Clear(surf, 0xff, 0xff, 0xff, 0xff);
surf->Flip(surf, NULL, DSFLIP_ONSYNC);
window->SetOpacity(window, 0xff);
sleep(10);
surf->Release(surf);
window->Destroy(window);
window->Release(window);
dl->Release(dl);
dfb->Release (dfb);
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2010-03-12 20:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 20:24 Eamon Walsh [this message]
2010-03-12 21:42 ` Fbdev graphics broken in xen/next dom0 Jeremy Fitzhardinge
2010-03-13 0:44 ` Eamon Walsh
2010-03-13 0:51 ` Jeremy Fitzhardinge
2010-03-16 0:46 ` Konrad Rzeszutek Wilk
2010-03-16 21:52 ` Eamon Walsh
2010-03-16 22:19 ` Konrad Rzeszutek Wilk
2010-03-25 23:55 ` Eamon Walsh
2010-03-27 9:14 ` Arvind R
2010-03-27 21:52 ` Jeremy Fitzhardinge
2010-03-28 9:33 ` Arvind R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B9AA301.6090303@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=gscoker@tycho.nsa.gov \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.