|
@@ -423,7 +423,7 @@ int pxp_reset(void)
|
|
|
PXP_WRITEL(1 << 31, PXP_CTRL);
|
|
PXP_WRITEL(1 << 31, PXP_CTRL);
|
|
|
udelay(10);
|
|
udelay(10);
|
|
|
PXP_WRITEL(0, PXP_CTRL);
|
|
PXP_WRITEL(0, PXP_CTRL);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -537,6 +537,8 @@ int pxp_rotate(uint32_t s0buf, uint32_t s0ubuf, uint32_t s0vbuf,
|
|
|
{
|
|
{
|
|
|
uint32_t ctrl;
|
|
uint32_t ctrl;
|
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
+ int alpha_out_enable = 0;
|
|
|
|
|
+ int crop_enable = 0;
|
|
|
|
|
|
|
|
configASSERT(outangle >= PXP_ROTATE_0 && outangle <= PXP_ROTATE_270);
|
|
configASSERT(outangle >= PXP_ROTATE_0 && outangle <= PXP_ROTATE_270);
|
|
|
|
|
|
|
@@ -551,6 +553,22 @@ int pxp_rotate(uint32_t s0buf, uint32_t s0ubuf, uint32_t s0vbuf,
|
|
|
pxp_set_s0_input_size(0, 0, s0width, s0height);
|
|
pxp_set_s0_input_size(0, 0, s0width, s0height);
|
|
|
pxp_set_s0_background_color(0);
|
|
pxp_set_s0_background_color(0);
|
|
|
pxp_set_color_space_conversion_coefficient(PXP_CSCCOEFF_YCBCR2RGB);
|
|
pxp_set_color_space_conversion_coefficient(PXP_CSCCOEFF_YCBCR2RGB);
|
|
|
|
|
+ if (outformat == PXP_OUT_FORMAT_ARGB888) {
|
|
|
|
|
+ if(s0format == PXP_S0_FORMAT_ARGB888) {
|
|
|
|
|
+ pxp_overlay_set_addr(PXP_OL0, s0buf);
|
|
|
|
|
+ pxp_overlay_set_size(PXP_OL0, 0, 0, s0width, s0height);
|
|
|
|
|
+ pxp_overlay_set_alpha_value(PXP_OL0, 0xff);
|
|
|
|
|
+ pxp_overlay_set_format(PXP_OL0, PXP_OL_FORMAT_ARGB8888);
|
|
|
|
|
+ pxp_overlay_set_alpha_cntl_type(PXP_OL0, PXP_OL_ALPHA_CNTL_TYPE_ROPS);
|
|
|
|
|
+ pxp_overlay_set_rop(PXP_OL0, 3);
|
|
|
|
|
+ pxp_overlay_enable(PXP_OL0, 1);
|
|
|
|
|
+ pxp_set_s0_cropping_size(0, 0, 0, 0);
|
|
|
|
|
+ crop_enable = 1;
|
|
|
|
|
+ s0format = PXP_S0_FORMAT_RGB888;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ alpha_out_enable = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
pxp_param param;
|
|
pxp_param param;
|
|
|
memset(¶m, 0, sizeof(pxp_param));
|
|
memset(¶m, 0, sizeof(pxp_param));
|
|
@@ -563,10 +581,9 @@ int pxp_rotate(uint32_t s0buf, uint32_t s0ubuf, uint32_t s0vbuf,
|
|
|
#ifdef PXP_OUTPUT_MIRROR
|
|
#ifdef PXP_OUTPUT_MIRROR
|
|
|
param.hflip_enable = 1;
|
|
param.hflip_enable = 1;
|
|
|
#endif
|
|
#endif
|
|
|
- param.crop_enable = 1;
|
|
|
|
|
- param.scale_enable = 1;
|
|
|
|
|
- if(outformat == PXP_OUT_FORMAT_ARGB888)
|
|
|
|
|
- param.alpha_out_enable = 1;
|
|
|
|
|
|
|
+ param.crop_enable = crop_enable;
|
|
|
|
|
+ param.scale_enable = 0;
|
|
|
|
|
+ param.alpha_out_enable = alpha_out_enable;
|
|
|
pxp_set_control_param(¶m);
|
|
pxp_set_control_param(¶m);
|
|
|
|
|
|
|
|
xQueueReset(pxp_done);
|
|
xQueueReset(pxp_done);
|