linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: venus: hfi_parser: Ignore HEVC encoding for V1
@ 2019-12-09 19:16 Stephan Gerhold
  2019-12-10  8:41 ` Stanimir Varbanov
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Gerhold @ 2019-12-09 19:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Stanimir Varbanov, Andy Gross, Bjorn Andersson, linux-media,
	linux-arm-msm, 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.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
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(+)

diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
index 2293d936e49c..7f515a4b9bd1 100644
--- a/drivers/media/platform/qcom/venus/hfi_parser.c
+++ b/drivers/media/platform/qcom/venus/hfi_parser.c
@@ -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;
 	}
 }
 
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: venus: hfi_parser: Ignore HEVC encoding for V1
  2019-12-09 19:16 [PATCH] media: venus: hfi_parser: Ignore HEVC encoding for V1 Stephan Gerhold
@ 2019-12-10  8:41 ` Stanimir Varbanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2019-12-10  8:41 UTC (permalink / raw)
  To: Stephan Gerhold, Mauro Carvalho Chehab
  Cc: Stanimir Varbanov, Andy Gross, Bjorn Andersson, linux-media,
	linux-arm-msm

Hi Stephan,

Thanks for the patch!

On 12/9/19 9:16 PM, Stephan Gerhold wrote:
> 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.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
> 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(+)

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> 
> diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
> index 2293d936e49c..7f515a4b9bd1 100644
> --- a/drivers/media/platform/qcom/venus/hfi_parser.c
> +++ b/drivers/media/platform/qcom/venus/hfi_parser.c
> @@ -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;
>  	}
>  }
>  
> 

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-10  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 19:16 [PATCH] media: venus: hfi_parser: Ignore HEVC encoding for V1 Stephan Gerhold
2019-12-10  8:41 ` Stanimir Varbanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).