break;
case 1:
mixer_reg_writemask(res, MXR_CFG, val, MXR_CFG_GRP1_ENABLE);
+ /* FIXME: workaround to change default layer priority */
+ if (ctx->mxr_ver == MXR_VER_128_0_0_184) {
+ if (enable) {
+ /* control blending of graphic layer 0 */
+ mixer_reg_writemask(res, MXR_GRAPHIC_CFG(0),
+ val,
+ MXR_GRP_CFG_BLEND_PRE_MUL |
+ MXR_GRP_CFG_PIXEL_BLEND_EN);
+ } else {
+ mixer_reg_writemask(res, MXR_GRAPHIC_CFG(0), 0,
+ MXR_GRP_CFG_BLEND_PRE_MUL |
+ MXR_GRP_CFG_PIXEL_BLEND_EN);
+ }
+ }
+
break;
case 2:
if (ctx->vp_enabled) {
* layer0 - framebuffer
* video - video overlay
*/
- val = MXR_LAYER_CFG_GRP1_VAL(3);
- val |= MXR_LAYER_CFG_GRP0_VAL(2);
+
+ /* FIXME: workaround to change default layer priority */
+ if (ctx->mxr_ver == MXR_VER_128_0_0_184) {
+ val = MXR_LAYER_CFG_GRP1_VAL(2);
+ val |= MXR_LAYER_CFG_GRP0_VAL(3);
+ } else {
+ val = MXR_LAYER_CFG_GRP1_VAL(3);
+ val |= MXR_LAYER_CFG_GRP0_VAL(2);
+ }
+
if (ctx->vp_enabled)
val |= MXR_LAYER_CFG_VP_VAL(1);
mixer_reg_write(res, MXR_LAYER_CFG, val);
mixer_reg_write(res, MXR_GRAPHIC_CFG(0), val);
/* Blend layer 1 into layer 0 */
- val |= MXR_GRP_CFG_BLEND_PRE_MUL;
- val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
+ /* FIXME: workaround to change default layer as unused video overlay */
+ if (ctx->mxr_ver != MXR_VER_128_0_0_184) {
+ val |= MXR_GRP_CFG_BLEND_PRE_MUL;
+ val |= MXR_GRP_CFG_PIXEL_BLEND_EN;
+ }
mixer_reg_write(res, MXR_GRAPHIC_CFG(1), val);
/* setting video layers */