DM368에서 Colorkey 값을 설정하여 OSD0 에 설정된 키값에 Tranparency 값을 적용하는 방법은 다음과 같다.
1. bootargs 수정
video=davincifb:vid0=OFF:vid1=OFF:osd1=0x0x8 |
2. /drivers/media/video/davinci/davinci_osd.c 수정
static void _davinci_disp_enable_color_key(enum davinci_osd_layer osdwin, unsigned colorkey, enum davinci_pix_format pixfmt) { switch (pixfmt) { case PIXFMT_1BPP: case PIXFMT_2BPP: case PIXFMT_4BPP: case PIXFMT_8BPP: if (cpu_is_davinci_dm355() || cpu_is_davinci_dm365()) { printk("$[%s] (%s) PIXFMT_1~8, colorkey = 0x%x \r\n", __FILE__, __func__, colorkey); switch (osdwin) { case OSDWIN_OSD0: osd_merge(OSD_TRANSPBMPIDX_BMP0, colorkey << OSD_TRANSPBMPIDX_BMP0_SHIFT, OSD_TRANSPBMPIDX); break; case OSDWIN_OSD1: osd_merge(OSD_TRANSPBMPIDX_BMP1, colorkey << OSD_TRANSPBMPIDX_BMP1_SHIFT, OSD_TRANSPBMPIDX); break; } } break; case PIXFMT_RGB565: if (cpu_is_davinci_dm644x()) { osd_write(colorkey & OSD_TRANSPVAL_RGBTRANS, OSD_TRANSPVAL); } else if (cpu_is_davinci_dm355() || cpu_is_davinci_dm365()) { osd_write(colorkey & OSD_TRANSPVALL_RGBL, OSD_TRANSPVALL); } break; case PIXFMT_YCbCrI: case PIXFMT_YCrCbI: if (cpu_is_davinci_dm355() || cpu_is_davinci_dm365()) osd_merge(OSD_TRANSPVALU_Y, colorkey, OSD_TRANSPVALU); break; case PIXFMT_RGB888: if (cpu_is_davinci_dm355() || cpu_is_davinci_dm365()) { osd_write(colorkey & OSD_TRANSPVALL_RGBL, OSD_TRANSPVALL); osd_merge(OSD_TRANSPVALU_RGBU, colorkey >> 16, OSD_TRANSPVALU); } break; default: break; } switch (osdwin) { case OSDWIN_OSD0: osd_set(OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD); break; case OSDWIN_OSD1: osd_set(OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD); break; } } |
3. 어플리케이션 에서 설정 예제
#include <video/davincifb_ioctl.h> void fb_init(void){ |
'Programming & Tools > TMS320DM368' 카테고리의 다른 글
[DM368] U-Boot 의 bootargs Parameter 항목을 Kernel에서 사용하기 (0) | 2012.06.12 |
---|---|
[DM368] RGB888 to RGB565 (0) | 2012.05.31 |
[DM368] Linux Logo 변경 후 커서 깜빡임 제거 (0) | 2012.05.24 |
[DM368] LCD 화면에 TTY Login 안보이게 하는 방법 (0) | 2012.05.24 |
[DM368] CCS 환경설정 (0) | 2012.04.30 |