Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2014 → Rev 2015

/trunk/uspace/fb/main.c
43,7 → 43,8
{
void *dest;
 
dest = as_get_mappable_page(IPC_GET_ARG2(*call));
dest = as_get_mappable_page(IPC_GET_ARG2(*call),
PAGE_COLOR(IPC_GET_ARG1(*call)));
if (ipc_answer_fast(callid, 0, (sysarg_t)dest, 0) == 0) {
if (*area)
as_area_destroy(*area);
/trunk/uspace/fb/fb.c
704,9 → 704,10
case IPC_M_AS_AREA_SEND:
/* We accept one area for data interchange */
if (IPC_GET_ARG1(*call) == shm_id) {
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call));
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call),
PAGE_COLOR(IPC_GET_ARG1(*call)));
shm_size = IPC_GET_ARG2(*call);
if (!ipc_answer_fast(callid, 0, (sysarg_t)dest, 0))
if (!ipc_answer_fast(callid, 0, (sysarg_t) dest, 0))
shm = dest;
else
shm_id = 0;
716,7 → 717,7
return 1;
} else {
intersize = IPC_GET_ARG2(*call);
receive_comm_area(callid,call,(void *)&interbuffer);
receive_comm_area(callid, call, (void *) &interbuffer);
}
return 1;
case FB_PREPARE_SHM:
1282,12 → 1283,13
fb_invert_colors = sysinfo_value("fb.invert-colors");
 
asz = fb_scanline * fb_height;
fb_addr = as_get_mappable_page(asz);
fb_addr = as_get_mappable_page(asz, (int) sysinfo_value("fb.address.color"));
physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >> PAGE_WIDTH,
AS_AREA_READ | AS_AREA_WRITE);
 
if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual, fb_invert_colors))
if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual,
fb_invert_colors))
return 0;
return -1;
/trunk/uspace/fb/ega.c
34,7 → 34,6
/** @file
*/
 
 
#include <stdlib.h>
#include <unistd.h>
#include <align.h>
62,7 → 61,6
 
saved_screen saved_screens[MAX_SAVED_SCREENS];
 
 
#define EGA_IO_ADDRESS 0x3d4
#define EGA_IO_SIZE 2
 
126,12 → 124,14
{
int i;
if (rows > 0) {
memcpy (scr_addr,((char *)scr_addr) + rows * scr_width * 2, scr_width * scr_height * 2 - rows * scr_width * 2);
memcpy (scr_addr,((char *)scr_addr) + rows * scr_width * 2,
scr_width * scr_height * 2 - rows * scr_width * 2);
for (i = 0; i < rows * scr_width ; i ++)
(((short *)scr_addr) + scr_width * scr_height - rows * scr_width) [i] = ((style << 8) + ' ');
(((short *)scr_addr) + scr_width * scr_height - rows *
scr_width) [i] = ((style << 8) + ' ');
} else if (rows < 0) {
 
memcpy (((char *)scr_addr) - rows * scr_width * 2 ,scr_addr ,scr_width * scr_height * 2 + rows * scr_width * 2);
memcpy (((char *)scr_addr) - rows * scr_width * 2, scr_addr,
scr_width * scr_height * 2 + rows * scr_width * 2);
for (i = 0; i < - rows * scr_width ; i++)
((short *)scr_addr) [i] = ((style << 8 ) + ' ');
}
308,13 → 308,14
ega_ph_addr=(void *)sysinfo_value("fb.address.physical");
scr_width=sysinfo_value("fb.width");
scr_height=sysinfo_value("fb.height");
iospace_enable(task_get_id(),(void *)EGA_IO_ADDRESS,2);
iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2);
 
sz = scr_width*scr_height*2;
scr_addr = as_get_mappable_page(sz);
sz = scr_width * scr_height * 2;
scr_addr = as_get_mappable_page(sz, (int)
sysinfo_value("fb.address.color"));
 
physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >> PAGE_WIDTH,
AS_AREA_READ | AS_AREA_WRITE);
physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >>
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
 
async_set_client_connection(ega_client_connection);