* If the VESA driver remaps the frame buffer on init, it will now also make
sure that the kernel's frame buffer console points to the right data. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34835 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -31,6 +31,8 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool frame_buffer_console_available(void);
|
bool frame_buffer_console_available(void);
|
||||||
|
status_t frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
|
||||||
|
int32 depth, int32 bytesPerRow);
|
||||||
status_t frame_buffer_console_init(struct kernel_args* args);
|
status_t frame_buffer_console_init(struct kernel_args* args);
|
||||||
status_t frame_buffer_console_init_post_modules(struct kernel_args* args);
|
status_t frame_buffer_console_init_post_modules(struct kernel_args* args);
|
||||||
|
|
||||||
|
|||||||
@@ -238,8 +238,8 @@ vbe_set_bits_per_gun(vesa_info& info, uint8 bits)
|
|||||||
frame buffer, there is no need to map it again.
|
frame buffer, there is no need to map it again.
|
||||||
*/
|
*/
|
||||||
static status_t
|
static status_t
|
||||||
remap_frame_buffer(vesa_info& info, addr_t physicalBase,
|
remap_frame_buffer(vesa_info& info, addr_t physicalBase, uint32 width,
|
||||||
uint32 bytesPerRow, uint32 height, bool initializing)
|
uint32 height, int8 depth, uint32 bytesPerRow, bool initializing)
|
||||||
{
|
{
|
||||||
vesa_shared_info& sharedInfo = *info.shared_info;
|
vesa_shared_info& sharedInfo = *info.shared_info;
|
||||||
addr_t frameBuffer;
|
addr_t frameBuffer;
|
||||||
@@ -263,6 +263,14 @@ remap_frame_buffer(vesa_info& info, addr_t physicalBase,
|
|||||||
if (area < 0)
|
if (area < 0)
|
||||||
return area;
|
return area;
|
||||||
|
|
||||||
|
if (initializing) {
|
||||||
|
// We need to manually update the kernel's frame buffer address,
|
||||||
|
// since this frame buffer remapping has not been issued by the
|
||||||
|
// app_server (which would otherwise take care of this)
|
||||||
|
frame_buffer_update(frameBuffer, width, height, depth,
|
||||||
|
bytesPerRow);
|
||||||
|
}
|
||||||
|
|
||||||
delete_area(info.shared_info->frame_buffer_area);
|
delete_area(info.shared_info->frame_buffer_area);
|
||||||
|
|
||||||
info.frame_buffer = frameBuffer;
|
info.frame_buffer = frameBuffer;
|
||||||
@@ -336,7 +344,8 @@ vesa_init(vesa_info& info)
|
|||||||
sharedInfo.frame_buffer_area = bufferInfo->area;
|
sharedInfo.frame_buffer_area = bufferInfo->area;
|
||||||
|
|
||||||
remap_frame_buffer(info, bufferInfo->physical_frame_buffer,
|
remap_frame_buffer(info, bufferInfo->physical_frame_buffer,
|
||||||
bufferInfo->bytes_per_row, bufferInfo->height, true);
|
bufferInfo->width, bufferInfo->height, bufferInfo->bytes_per_row,
|
||||||
|
bufferInfo->depth, true);
|
||||||
// Does not matter if this fails - the frame buffer was already mapped
|
// Does not matter if this fails - the frame buffer was already mapped
|
||||||
// before.
|
// before.
|
||||||
|
|
||||||
@@ -406,8 +415,9 @@ vesa_set_display_mode(vesa_info& info, uint32 mode)
|
|||||||
|
|
||||||
// Map new frame buffer if necessary
|
// Map new frame buffer if necessary
|
||||||
|
|
||||||
status = remap_frame_buffer(info, modeInfo.physical_base,
|
status = remap_frame_buffer(info, modeInfo.width, modeInfo.height,
|
||||||
modeInfo.bytes_per_row, modeInfo.height, false);
|
modeInfo.physical_base, modeInfo.bytes_per_row, modeInfo.bits_per_pixel,
|
||||||
|
false);
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
// Update shared frame buffer information
|
// Update shared frame buffer information
|
||||||
info.shared_info->current_mode.virtual_width = modeInfo.width;
|
info.shared_info->current_mode.virtual_width = modeInfo.width;
|
||||||
|
|||||||
@@ -363,7 +363,17 @@ console_module_info gFrameBufferConsoleModule = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
frame_buffer_console_available(void)
|
||||||
|
{
|
||||||
|
return sConsole.frame_buffer != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth,
|
frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth,
|
||||||
int32 bytesPerRow)
|
int32 bytesPerRow)
|
||||||
{
|
{
|
||||||
@@ -394,16 +404,6 @@ frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
frame_buffer_console_available(void)
|
|
||||||
{
|
|
||||||
return sConsole.frame_buffer != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
frame_buffer_console_init(kernel_args* args)
|
frame_buffer_console_init(kernel_args* args)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user