cust_display.c 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*****************************************************************************
  2. * Copyright Statement:
  3. * --------------------
  4. * This software is protected by Copyright and the information contained
  5. * herein is confidential. The software may not be copied and the information
  6. * contained herein may not be used or disclosed except with the written
  7. * permission of MediaTek Inc. (C) 2008
  8. *
  9. * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  27. *
  28. * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. //#include <common.h>
  36. //#include <stdarg.h>
  37. //#include <linux/types.h>
  38. //#include <asm/arch/mt65xx.h>
  39. //#include <asm/arch/mt65xx_typedefs.h>
  40. //#include <asm/arch/mt65xx_disp_drv.h>
  41. //#include <asm/arch/mt65xx_logo.h>
  42. #include <string.h>
  43. #include <platform/mt_typedefs.h>
  44. #include <platform/mt_disp_drv.h>
  45. #include <platform/mt_logo.h>
  46. #include <target/board.h>
  47. extern UINT32 DISP_GetScreenHeight(void);
  48. extern UINT32 DISP_GetScreenWidth(void);
  49. // this is a sample code for how to draw the logo by yourself.
  50. void cust_show_boot_logo(void)
  51. {
  52. void *fb_addr = mt_get_fb_addr();
  53. UINT32 fb_size = mt_get_fb_size();
  54. void *db_addr = mt_get_logo_db_addr();
  55. memcpy(fb_addr, (void *)((UINT32)db_addr + fb_size * 0), fb_size);
  56. mt_disp_update(0, 0, CFG_DISPLAY_WIDTH, CFG_DISPLAY_HEIGHT);
  57. }
  58. const LOGO_CUST_IF *LOGO_GetCustomIF(void)
  59. {
  60. static LOGO_CUST_IF CUST_IF;
  61. memset(&CUST_IF, 0, sizeof(LOGO_CUST_IF));
  62. // the CUST_IF is null by default.
  63. // if you want to use your routine, please replace the callback like the code below shows:
  64. //CUST_IF.show_boot_logo = cust_show_boot_logo;
  65. return &CUST_IF;
  66. }