Loading arch/arm64/boot/dts/qcom/sdm450.dtsi +6 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -146,3 +146,8 @@ /delete-node/ case-therm-adc; /delete-node/ case-therm-step; }; &soc { qcom,vidc@1d00000 { qcom,max-hw-load = <734400>; /* 1080p@60 dec + 1080p@30 enc */ }; }; drivers/media/platform/msm/vidc_3x/msm_v4l2_vidc.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -627,6 +627,8 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev) vidc_driver->capability_version = msm_vidc_read_efuse_version( pdev, core->resources.pf_cap_tbl, "efuse2"); if (vidc_driver->capability_version) core->resources.target_version = 1; rc = call_hfi_op(core->device, core_early_init, core->device->hfi_device_data); Loading drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +16 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -672,7 +672,7 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) struct msm_vidc_cb_cmd_done *response = data; struct msm_vidc_core *core; struct vidc_hal_sys_init_done *sys_init_msg; u32 index; u32 index, i; if (!IS_HAL_SYS_CMD(cmd)) { dprintk(VIDC_ERR, "%s - invalid cmd\n", __func__); Loading Loading @@ -718,6 +718,20 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) memcpy(core->capabilities, sys_init_msg->capabilities, sys_init_msg->codec_count * sizeof(struct msm_vidc_capability)); /* override capabilities for sdm450 */ if (core->resources.target_version == 1) { for (i = 0; i < VIDC_MAX_SESSIONS; i++) { if (core->capabilities[i].width.max > HD_WIDTH) core->capabilities[i].width.max = HD_WIDTH; if (core->capabilities[i].height.max > HD_WIDTH) core->capabilities[i].height.max = HD_WIDTH; core->capabilities[i].mbs_per_frame.max = NUM_MBS_PER_FRAME(HD_WIDTH, HD_HEIGHT); core->resources.max_inst_count = MAX_SUPPORTED_INSTANCES; } } dprintk(VIDC_DBG, "%s: supported_codecs[%d]: enc = %#x, dec = %#x\n", __func__, core->codec_count, core->enc_codec_supported, Loading drivers/media/platform/msm/vidc_3x/msm_vidc_internal.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2020,2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -45,6 +45,8 @@ #define MIN_SUPPORTED_WIDTH 32 #define MIN_SUPPORTED_HEIGHT 32 #define DEFAULT_FPS 15 #define HD_WIDTH 1920 #define HD_HEIGHT 1088 /* Maintains the number of FTB's between each FBD over a window */ #define DCVS_FTB_WINDOW 32 Loading drivers/media/platform/msm/vidc_3x/msm_vidc_resources.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -174,6 +174,7 @@ struct msm_vidc_platform_resources { uint32_t imem_size; enum imem_type imem_type; uint32_t max_load; uint32_t target_version; struct platform_device *pdev; struct regulator_set regulator_set; struct clock_set clock_set; Loading Loading
arch/arm64/boot/dts/qcom/sdm450.dtsi +6 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -146,3 +146,8 @@ /delete-node/ case-therm-adc; /delete-node/ case-therm-step; }; &soc { qcom,vidc@1d00000 { qcom,max-hw-load = <734400>; /* 1080p@60 dec + 1080p@30 enc */ }; };
drivers/media/platform/msm/vidc_3x/msm_v4l2_vidc.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -627,6 +627,8 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev) vidc_driver->capability_version = msm_vidc_read_efuse_version( pdev, core->resources.pf_cap_tbl, "efuse2"); if (vidc_driver->capability_version) core->resources.target_version = 1; rc = call_hfi_op(core->device, core_early_init, core->device->hfi_device_data); Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +16 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -672,7 +672,7 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) struct msm_vidc_cb_cmd_done *response = data; struct msm_vidc_core *core; struct vidc_hal_sys_init_done *sys_init_msg; u32 index; u32 index, i; if (!IS_HAL_SYS_CMD(cmd)) { dprintk(VIDC_ERR, "%s - invalid cmd\n", __func__); Loading Loading @@ -718,6 +718,20 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) memcpy(core->capabilities, sys_init_msg->capabilities, sys_init_msg->codec_count * sizeof(struct msm_vidc_capability)); /* override capabilities for sdm450 */ if (core->resources.target_version == 1) { for (i = 0; i < VIDC_MAX_SESSIONS; i++) { if (core->capabilities[i].width.max > HD_WIDTH) core->capabilities[i].width.max = HD_WIDTH; if (core->capabilities[i].height.max > HD_WIDTH) core->capabilities[i].height.max = HD_WIDTH; core->capabilities[i].mbs_per_frame.max = NUM_MBS_PER_FRAME(HD_WIDTH, HD_HEIGHT); core->resources.max_inst_count = MAX_SUPPORTED_INSTANCES; } } dprintk(VIDC_DBG, "%s: supported_codecs[%d]: enc = %#x, dec = %#x\n", __func__, core->codec_count, core->enc_codec_supported, Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_internal.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2020,2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -45,6 +45,8 @@ #define MIN_SUPPORTED_WIDTH 32 #define MIN_SUPPORTED_HEIGHT 32 #define DEFAULT_FPS 15 #define HD_WIDTH 1920 #define HD_HEIGHT 1088 /* Maintains the number of FTB's between each FBD over a window */ #define DCVS_FTB_WINDOW 32 Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_resources.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, 2021 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -174,6 +174,7 @@ struct msm_vidc_platform_resources { uint32_t imem_size; enum imem_type imem_type; uint32_t max_load; uint32_t target_version; struct platform_device *pdev; struct regulator_set regulator_set; struct clock_set clock_set; Loading