@@ -378,6 +378,9 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int pipe_index,
rpf->format.plane_fmt[0].bytesperline = cfg->pitch;
rpf->format.plane_fmt[1].bytesperline = cfg->pitch;
rpf->alpha = cfg->alpha;
+ rpf->colorkey.enabled = cfg->colorkey.enabled;
+ rpf->colorkey.key = cfg->colorkey.key;
+ rpf->colorkey.alpha = cfg->colorkey.alpha;
rpf->mem.addr[0] = cfg->mem[0];
rpf->mem.addr[1] = cfg->mem[1];
@@ -243,8 +243,14 @@ static void rpf_configure(struct vsp1_entity *entity,
}
vsp1_rpf_write(rpf, dl, VI6_RPF_MSK_CTRL, 0);
- vsp1_rpf_write(rpf, dl, VI6_RPF_CKEY_CTRL, 0);
-
+ if (rpf->colorkey.enabled) {
+ vsp1_rpf_write(rpf, dl, VI6_RPF_CKEY_SET0,
+ (rpf->colorkey.alpha << 24) | rpf->colorkey.key);
+ vsp1_rpf_write(rpf, dl, VI6_RPF_CKEY_CTRL,
+ VI6_RPF_CKEY_CTRL_SAPE0);
+ } else {
+ vsp1_rpf_write(rpf, dl, VI6_RPF_CKEY_CTRL, 0);
+ }
}
static void rpf_partition(struct vsp1_entity *entity,
@@ -50,6 +50,11 @@ struct vsp1_rwpf {
unsigned int bru_input;
unsigned int alpha;
+ struct {
+ bool enabled;
+ u32 key;
+ u32 alpha;
+ } colorkey;
u32 mult_alpha;
u32 outfmt;
@@ -49,6 +49,11 @@ struct vsp1_du_atomic_config {
struct v4l2_rect dst;
unsigned int alpha;
unsigned int zpos;
+ struct {
+ bool enabled;
+ u32 key;
+ u32 alpha;
+ } colorkey;
};
void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index);