Skip to contentSkip to conversation

media: venus: hfi_parser: Ignore HEVC encoding for V1

PATCH In review Stephan Gerhold 2 participants 2 messages Dec 9, 2019 – Dec 10, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: venus: hfi_parser: Ignore HEVC encoding for V1

Some older MSM8916 Venus firmware versions also seem to indicate support for encoding HEVC, even though they really can't. This will lead to errors later because hfi_session_init() fails in this case.

HEVC is already ignored for "dec_codecs", so add the same for "enc_codecs" to make these old firmware versions work correctly.

---
This makes Venus work on the Samsung Galaxy S4 Mini VE (MSM8916), which is stuck on a rather old Venus firmware version (1.6-00040). The firmware is signed, so unfortunately I'm not aware of a way to upgrade it...

---
 drivers/media/platform/qcom/venus/hfi_parser.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/qcom/venus/hfi_parser.c +1 -0
index 2293d936e49c..7f515a4b9bd1 100644
@@ -181,6 +181,7 @@ static void parse_codecs(struct venus_core *core, void *data)
 	if (IS_V1(core)) {
 		core->dec_codecs &= ~HFI_VIDEO_CODEC_HEVC;
 		core->dec_codecs &= ~HFI_VIDEO_CODEC_SPARK;
+		core->enc_codecs &= ~HFI_VIDEO_CODEC_HEVC;
 	}
 }
 
Signature · 1 line
2.24.0
Acked-by on v1 1/1
#1 lore raw

Hi Stephan,

Thanks for the patch!

Quoted 8 lines · Stephan Gerhold

Some older MSM8916 Venus firmware versions also seem to indicate support for encoding HEVC, even though they really can't. This will lead to errors later because hfi_session_init() fails in this case.

HEVC is already ignored for "dec_codecs", so add the same for "enc_codecs" to make these old firmware versions work correctly.

Quoted 8 lines

---
This makes Venus work on the Samsung Galaxy S4 Mini VE (MSM8916), which is stuck on a rather old Venus firmware version (1.6-00040). The firmware is signed, so unfortunately I'm not aware of a way to upgrade it...

---
 drivers/media/platform/qcom/venus/hfi_parser.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines
drivers/media/platform/qcom/venus/hfi_parser.c +1 -0
index 2293d936e49c..7f515a4b9bd1 100644
@@ -181,6 +181,7 @@ static void parse_codecs(struct venus_core *core, void *data)
 	if (IS_V1(core)) {
 		core->dec_codecs &= ~HFI_VIDEO_CODEC_HEVC;
 		core->dec_codecs &= ~HFI_VIDEO_CODEC_SPARK;
+		core->enc_codecs &= ~HFI_VIDEO_CODEC_HEVC;
 	}
 }
 
Signature · 2 lines
regards,
Stan