Remove YUV blitting functions and LCD modes

None of this is needed now that mpegplayer is gone.

Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
This commit is contained in:
Aidan MacDonald 2022-10-03 10:17:41 +01:00
parent b371ff1f47
commit fe6aa21e9e
54 changed files with 3 additions and 9638 deletions

View file

@ -158,65 +158,3 @@ void lcd_update(void)
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
}
/* (Mis)use LCD framebuffer as a temporary buffer */
void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
unsigned char const * yuv_src[3];
register off_t z;
if(!lcd_is_on)
return;
z = stride * src_y;
yuv_src[0] = src[0] + z + src_x;
yuv_src[1] = src[1] + (z >> 2) + (src_x >> 1);
yuv_src[2] = src[2] + (yuv_src[1] - src[1]);
commit_discard_dcache(); // XXX range
__cpm_start_ipu();
IPU_STOP_IPU();
IPU_RESET_IPU();
IPU_CLEAR_END_FLAG();
IPU_DISABLE_RSIZE();
IPU_DISABLE_IRQ();
IPU_SET_INFMT(INFMT_YUV420);
IPU_SET_OUTFMT(OUTFMT_RGB565);
IPU_SET_IN_FM(width, height);
IPU_SET_Y_STRIDE(stride);
IPU_SET_UV_STRIDE(stride, stride);
IPU_SET_Y_ADDR(PHYSADDR((unsigned long)yuv_src[0]));
IPU_SET_U_ADDR(PHYSADDR((unsigned long)yuv_src[1]));
IPU_SET_V_ADDR(PHYSADDR((unsigned long)yuv_src[2]));
IPU_SET_OUT_ADDR(PHYSADDR((unsigned long)FBADDR(y,x)));
IPU_SET_OUT_FM(height, width);
IPU_SET_OUT_STRIDE(height);
IPU_SET_CSC_C0_COEF(YUV_CSC_C0);
IPU_SET_CSC_C1_COEF(YUV_CSC_C1);
IPU_SET_CSC_C2_COEF(YUV_CSC_C2);
IPU_SET_CSC_C3_COEF(YUV_CSC_C3);
IPU_SET_CSC_C4_COEF(YUV_CSC_C4);
IPU_RUN_IPU();
while(!(IPU_POLLING_END_FLAG()) && IPU_IS_ENABLED());
IPU_CLEAR_END_FLAG();
IPU_STOP_IPU();
IPU_RESET_IPU();
__cpm_stop_ipu();
/* YUV speed is limited by LCD speed */
lcd_update_rect(y, x, height, width);
}