view src/cs/drivers/drv_app/r2d/r2d_refresh.c @ 223:740a8e8fc9d7

startup sync logic rework for the new PWON button boot scheme Previously we added logic to the MMI task to hold off PEI init until R2D is running, and then extended that condition to wait for FCHG init too. However, the dependencies of MMI upon R2D and FCHG don't start until mmiInit(), and that call is driven by Switch_ON() code, hence the wait for R2D and FCHG init can be made in that code path instead of the MMI task. Furthermore, with our new way of signaling PWON button boot to MMI, we need a new wait to ensure that the MMI task is up - previously this assurance was provided by the wait for Kp pointers to be set. Solution: revert our previous PEI init hold-off additions to MMI, add a new flag indicating MMI task init done, and put the combined wait for all needed conditions into our new PWON button boot code in power.c.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 27 Apr 2021 06:24:52 +0000
parents 502a0a3f6a49
children
line wrap: on
line source

/**
                                                                          
	@file:	r2d_refresh.c
	
	@author Christophe Favergeon                              
                                                                          
    @version 0.5	

    Purpose: Includes LCDs depend definitions for the refresh task
	         (Second part of LCD APIs)
	
*/

/*
																			
 	Date       	Modification												
  ------------------------------------									
    06/02/2001	Create		
	10/18/2001  Version 0.5 for first integration with Riviera database
																											    
																			
 (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved
*/




#include "rv/general.h"
#include "rvf/rvf_api.h"
#include "r2d/r2d_messages.h"
#include "r2d/r2d_env.h"
#include "r2d/lcd_messages_ti.h"
#include "r2d/lcd_messages.h"
#include "r2d/r2d_config.h"
#include "r2d/r2d.h"
#include "r2d/r2d_i.h"
#ifdef _WINDOWS
#include <Windows.h>
#endif
#include "r2d/uwire.h"


extern T_RVF_MB_ID r2d_mb_id;

INT16 r2d_update_ul_x,r2d_update_ul_y,r2d_update_br_x,r2d_update_br_y;


#if (R2D_REFRESH == R2D_VERTICAL)
  UINT32 r2d_lcd_memory_words[(((R2D_WIDTH*R2D_MWHEIGHT)+1))];
#else
  UINT32 r2d_lcd_memory_words[(((R2D_MWWIDTH*R2D_HEIGHT)+1))];
#endif

void r2d_reinit_update_region(void)
{
	rvf_lock_mutex(r2d_g_global_mutex);
	//r2d_update_ul_x=0;
	//r2d_update_ul_y=0;
	//r2d_update_br_x=R2D_WIDTH-1;
	//r2d_update_br_y=R2D_HEIGHT-1;
	r2d_update_ul_x=R2D_WIDTH;
	r2d_update_ul_y=R2D_HEIGHT;
	r2d_update_br_x=-1;
	r2d_update_br_y=-1;
	rvf_unlock_mutex(r2d_g_global_mutex);
}

/* FreeCalypso Tourmaline: totally new approach */

#if defined(CONFIG_TARGET_LUNA) && (R2D_EMBEDDED_LCD == R2D_BOARD_DSAMPLE)
  #include "lcds/luna/r2d_task_i.c"
#elif defined(CONFIG_TARGET_LUNA) && (R2D_EMBEDDED_LCD == R2D_BOARD_BW_DSAMPLE)
  #include "lcds/luna/r2d_task_i_bw.c"
#elif defined(CONFIG_TARGET_LUNA) && (R2D_EMBEDDED_LCD == R2D_FB_96x64_BW)
  #include "lcds/luna/r2d_task_i_96x64.c"
#elif defined(CONFIG_TARGET_C139) && (R2D_EMBEDDED_LCD == R2D_FB_96x64_BW)
  #include "lcds/c139/r2d_task_i.c"
#else
  #error "R2D refresh selection: unsupported combination"
#endif