Skip to content

Commit 6e2202c

Browse files
Stanimir Varbanovmchehab
authored andcommitted
media: venus: hfi_cmds: Fix conceal color property
The conceal color property used for Venus v4 and v6 has the same payload structure. But currently v4 follow down to payload structure for v1. Correct this by moving set_property to v4. Fixes: 4ef6039 ("media: venus: vdec: Add support for conceal control") Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8f6a0ea commit 6e2202c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/media/platform/qcom/venus/hfi_cmds.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,17 @@ pkt_session_set_property_4xx(struct hfi_session_set_property_pkt *pkt,
12261226
pkt->shdr.hdr.size += sizeof(u32) + sizeof(*hdr10);
12271227
break;
12281228
}
1229+
case HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR: {
1230+
struct hfi_conceal_color_v4 *color = prop_data;
1231+
u32 *in = pdata;
1232+
1233+
color->conceal_color_8bit = *in & 0xff;
1234+
color->conceal_color_8bit |= ((*in >> 10) & 0xff) << 8;
1235+
color->conceal_color_8bit |= ((*in >> 20) & 0xff) << 16;
1236+
color->conceal_color_10bit = *in;
1237+
pkt->shdr.hdr.size += sizeof(u32) + sizeof(*color);
1238+
break;
1239+
}
12291240

12301241
case HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE:
12311242
case HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER:
@@ -1279,17 +1290,6 @@ pkt_session_set_property_6xx(struct hfi_session_set_property_pkt *pkt,
12791290
pkt->shdr.hdr.size += sizeof(u32) + sizeof(*cq);
12801291
break;
12811292
}
1282-
case HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR: {
1283-
struct hfi_conceal_color_v4 *color = prop_data;
1284-
u32 *in = pdata;
1285-
1286-
color->conceal_color_8bit = *in & 0xff;
1287-
color->conceal_color_8bit |= ((*in >> 10) & 0xff) << 8;
1288-
color->conceal_color_8bit |= ((*in >> 20) & 0xff) << 16;
1289-
color->conceal_color_10bit = *in;
1290-
pkt->shdr.hdr.size += sizeof(u32) + sizeof(*color);
1291-
break;
1292-
}
12931293
default:
12941294
return pkt_session_set_property_4xx(pkt, cookie, ptype, pdata);
12951295
}

0 commit comments

Comments
 (0)