From 7a2d0c5e92cc77ee5a59c924a2d083e0f711a89a Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 7 Aug 2011 03:48:58 +0000 Subject: [PATCH] * lets not make AtomBIOS calls until our semaphore is created :) * delete semaphore on AtomBIOS destroy git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42590 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/radeon_hd/atombios/atom.cpp | 4 +++- src/add-ons/accelerants/radeon_hd/bios.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/atombios/atom.cpp b/src/add-ons/accelerants/radeon_hd/atombios/atom.cpp index 72b3f70e64..3c06cec576 100644 --- a/src/add-ons/accelerants/radeon_hd/atombios/atom.cpp +++ b/src/add-ons/accelerants/radeon_hd/atombios/atom.cpp @@ -1270,8 +1270,10 @@ atom_asic_init(atom_context *ctx) void atom_destroy(atom_context *ctx) { - if (ctx != NULL) + if (ctx != NULL) { free(ctx->iio); + delete_sem(ctx->exec_sem); + } free(ctx); } diff --git a/src/add-ons/accelerants/radeon_hd/bios.cpp b/src/add-ons/accelerants/radeon_hd/bios.cpp index 3dd39afa79..21568d0d90 100644 --- a/src/add-ons/accelerants/radeon_hd/bios.cpp +++ b/src/add-ons/accelerants/radeon_hd/bios.cpp @@ -100,9 +100,6 @@ radeon_init_bios(uint8* bios) return B_ERROR; } - atom_asic_init(gAtomContext); - // Post card - if ((gAtomContext->exec_sem = create_sem(1, "AtomBIOS_exec")) < B_NO_ERROR) { TRACE("%s: couldn't create semaphore for AtomBIOS exec thread!\n", @@ -110,6 +107,9 @@ radeon_init_bios(uint8* bios) return B_ERROR; } + atom_asic_init(gAtomContext); + // Post card + radeon_bios_init_scratch(); return B_OK;