-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vidc_3x: Add snapshot of video driver
This is snapshot of the video driver as of msm-4.14(vidc_3x) commit 9dc1a255ba77c95 (" Fix qbuf error in gralloc buffers encoding"). Change-Id: I146b66cb0e0ce44d8414efaa8748c2de87b9fc74 Signed-off-by: Vasantha Balla <[email protected]>
- Loading branch information
Vasantha Balla
authored and
Gerrit - the friendly Code Review server
committed
Jul 12, 2020
1 parent
74de771
commit 6e7d1f9
Showing
53 changed files
with
37,856 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# VIDEO CORE | ||
# | ||
source "drivers/media/platform/msm/vidc_3x/governors/Kconfig" | ||
|
||
menuconfig MSM_VIDC_3X_V4L2 | ||
tristate "Qualcomm Technologies, Inc. MSM V4L2 3X based video driver" | ||
depends on ARCH_QCOM && VIDEO_V4L2 | ||
select VIDEOBUF2_CORE | ||
help | ||
Enable support of MSM V4L2 3X based video driver for | ||
Qualcomm Technologies, Inc. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
obj-$(CONFIG_MSM_VIDC_3X_V4L2) := msm_v4l2_vidc.o \ | ||
msm_vidc_common.o \ | ||
msm_vidc.o \ | ||
msm_vdec.o \ | ||
msm_venc.o \ | ||
msm_smem.o \ | ||
msm_vidc_debug.o \ | ||
msm_vidc_res_parse.o \ | ||
venus_hfi.o \ | ||
hfi_response_handler.o \ | ||
hfi_packetization.o \ | ||
vidc_hfi.o \ | ||
venus_boot.o \ | ||
msm_vidc_dcvs.o | ||
|
||
obj-$(CONFIG_MSM_VIDC_3X_V4L2) += governors/ | ||
|
||
obj-$(CONFIG_MSM_VIDC_VMEM) += vmem/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
menuconfig MSM_VIDC_3X_GOVERNORS | ||
tristate "Clock and bandwidth governors for QTI MSM V4L2 based video driver" | ||
depends on MSM_VIDC_3X_V4L2 && PM_DEVFREQ | ||
help | ||
Chooses a set of devfreq governors aimed at providing accurate bandwidth | ||
or clock frequency values for MSM V4L2 video driver. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
ccflags-y := -I$(srctree)/drivers/devfreq/ \ | ||
-I$(srctree)/drivers/media/platform/msm/vidc_3x/ | ||
|
||
obj-$(CONFIG_MSM_VIDC_3X_GOVERNORS) := msm_vidc_dyn_gov.o \ | ||
msm_vidc_table_gov.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Copyright (c) 2015, 2019-2020, 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 | ||
* only version 2 as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifdef _FIXP_ARITH_H | ||
#error "This implementation is meant to override fixp-arith.h, don't use both" | ||
#endif | ||
|
||
#ifndef __FP_H__ | ||
#define __FP_H__ | ||
|
||
/* | ||
* Normally would typedef'ed, but checkpatch doesn't like typedef. | ||
* Also should be normally typedef'ed to intmax_t but that doesn't seem to be | ||
* available in the kernel | ||
*/ | ||
#define fp_t size_t | ||
|
||
/* (Arbitrarily) make the first 25% of the bits to be the fractional bits */ | ||
#define FP_FRACTIONAL_BITS ((sizeof(fp_t) * 8) / 4) | ||
|
||
#define FP(__i, __f_n, __f_d) \ | ||
((((fp_t)(__i)) << FP_FRACTIONAL_BITS) + \ | ||
(((__f_n) << FP_FRACTIONAL_BITS) / (__f_d))) | ||
|
||
#define FP_INT(__i) FP(__i, 0, 1) | ||
#define FP_ONE FP_INT(1) | ||
#define FP_ZERO FP_INT(0) | ||
|
||
static inline size_t fp_frac_base(void) | ||
{ | ||
return GENMASK(FP_FRACTIONAL_BITS - 1, 0); | ||
} | ||
|
||
static inline size_t fp_frac(fp_t a) | ||
{ | ||
return a & GENMASK(FP_FRACTIONAL_BITS - 1, 0); | ||
} | ||
|
||
static inline size_t fp_int(fp_t a) | ||
{ | ||
return a >> FP_FRACTIONAL_BITS; | ||
} | ||
|
||
static inline size_t fp_round(fp_t a) | ||
{ | ||
/* is the fractional part >= frac_max / 2? */ | ||
bool round_up = fp_frac(a) >= fp_frac_base() / 2; | ||
|
||
return fp_int(a) + round_up; | ||
} | ||
|
||
static inline fp_t fp_mult(fp_t a, fp_t b) | ||
{ | ||
return (a * b) >> FP_FRACTIONAL_BITS; | ||
} | ||
|
||
|
||
static inline fp_t fp_div(fp_t a, fp_t b) | ||
{ | ||
return (a << FP_FRACTIONAL_BITS) / b; | ||
} | ||
|
||
#endif |
Oops, something went wrong.