Merge "Video: Driver: Add support for Cliffs"
这个提交包含在:
10
BUILD.bazel
10
BUILD.bazel
@@ -21,6 +21,14 @@ ddk_headers(
|
||||
includes = ["driver/platform/pineapple/inc"]
|
||||
)
|
||||
|
||||
ddk_headers(
|
||||
name = "cliffs_headers",
|
||||
hdrs = glob([
|
||||
"driver/platform/cliffs/inc/*.h",
|
||||
]),
|
||||
includes = ["driver/platform/cliffs/inc"]
|
||||
)
|
||||
|
||||
ddk_headers(
|
||||
name = "iris33_headers",
|
||||
hdrs = glob([
|
||||
@@ -42,7 +50,7 @@ ddk_headers(
|
||||
ddk_headers(
|
||||
name = "video_driver_headers",
|
||||
# hdrs = [":pineapple_configs", "uapi_headers", "pineapple_headers", "iris33_headers", "vidc_headers"]
|
||||
hdrs = [":uapi_headers", "pineapple_headers", "iris33_headers", "vidc_headers"]
|
||||
hdrs = [":uapi_headers", "pineapple_headers", "cliffs_headers", "iris33_headers", "vidc_headers"]
|
||||
)
|
||||
|
||||
load(":target.bzl", "define_pineapple")
|
||||
|
@@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020-2022, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _MSM_VIDC_CLIFFS_H_
|
||||
#define _MSM_VIDC_CLIFFS_H_
|
||||
|
||||
#include "msm_vidc_core.h"
|
||||
|
||||
#if defined(CONFIG_MSM_VIDC_PINEAPPLE)
|
||||
int msm_vidc_init_platform_cliffs(struct msm_vidc_core *core);
|
||||
int msm_vidc_deinit_platform_cliffs(struct msm_vidc_core *core);
|
||||
#else
|
||||
int msm_vidc_init_platform_cliffs(struct msm_vidc_core *core)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int msm_vidc_deinit_platform_cliffs(struct msm_vidc_core *core)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _MSM_VIDC_CLIFFS_H_
|
1766
driver/platform/cliffs/src/cliffs.c
普通文件
1766
driver/platform/cliffs/src/cliffs.c
普通文件
文件差异内容过多而无法显示
加载差异
文件差异内容过多而无法显示
加载差异
@@ -277,6 +277,7 @@ static inline bool is_mmrm_supported(struct msm_vidc_core *core)
|
||||
}
|
||||
|
||||
int msm_vidc_init_platform(struct msm_vidc_core *core);
|
||||
int msm_vidc_read_efuse(struct msm_vidc_core *core);
|
||||
|
||||
/* control framework support functions */
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#if defined(CONFIG_MSM_VIDC_PINEAPPLE)
|
||||
#include "msm_vidc_pineapple.h"
|
||||
#include "msm_vidc_cliffs.h"
|
||||
#include "msm_vidc_iris33.h"
|
||||
#endif
|
||||
#if defined(CONFIG_MSM_VIDC_KALAMA)
|
||||
@@ -217,6 +218,11 @@ static const struct msm_vidc_compat_handle compat_handle[] = {
|
||||
.init_platform = msm_vidc_init_platform_pineapple,
|
||||
.init_iris = msm_vidc_init_iris33,
|
||||
},
|
||||
{
|
||||
.compat = "qcom,cliffs-vidc",
|
||||
.init_platform = msm_vidc_init_platform_cliffs,
|
||||
.init_iris = msm_vidc_init_iris33,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_MSM_VIDC_KALAMA)
|
||||
{
|
||||
@@ -361,6 +367,49 @@ int msm_vidc_init_platform(struct msm_vidc_core *core)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int msm_vidc_read_efuse(struct msm_vidc_core *core)
|
||||
{
|
||||
int rc = 0;
|
||||
void __iomem *base;
|
||||
u32 i = 0, efuse = 0, efuse_data_count = 0;
|
||||
struct msm_vidc_efuse_data *efuse_data = NULL;
|
||||
struct msm_vidc_platform_data *platform_data;
|
||||
|
||||
platform_data = &core->platform->data;
|
||||
efuse_data = platform_data->efuse_data;
|
||||
efuse_data_count = platform_data->efuse_data_size;
|
||||
|
||||
if (!efuse_data)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < efuse_data_count; i++) {
|
||||
switch (efuse_data[i].purpose) {
|
||||
case SKU_VERSION:
|
||||
base = devm_ioremap(&core->pdev->dev, efuse_data[i].start_address,
|
||||
efuse_data[i].size);
|
||||
if (!base) {
|
||||
d_vpr_e("failed efuse: start %#x, size %d\n",
|
||||
efuse_data[i].start_address,
|
||||
efuse_data[i].size);
|
||||
return -EINVAL;
|
||||
}
|
||||
efuse = readl_relaxed(base);
|
||||
platform_data->sku_version =
|
||||
(efuse & efuse_data[i].mask) >>
|
||||
efuse_data[i].shift;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (platform_data->sku_version) {
|
||||
d_vpr_h("efuse 0x%x, platform version 0x%x\n",
|
||||
efuse, platform_data->sku_version);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/****************** control framework utility functions **********************/
|
||||
|
||||
enum msm_vidc_inst_capability_type msm_vidc_get_cap_id(struct msm_vidc_inst *inst, u32 id)
|
||||
|
@@ -43,8 +43,9 @@ static inline bool is_video_device(struct device *dev)
|
||||
return !!(of_device_is_compatible(dev->of_node, "qcom,sm8450-vidc") ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8550-vidc") ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8550-vidc-v2") ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8650-vidc")) ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8650-vidc-v2");
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8650-vidc") ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,sm8650-vidc-v2") ||
|
||||
of_device_is_compatible(dev->of_node, "qcom,cliffs-vidc"));
|
||||
}
|
||||
|
||||
static inline bool is_video_context_bank_device_node(struct device_node *of_node)
|
||||
@@ -121,6 +122,7 @@ static const struct of_device_id msm_vidc_dt_match[] = {
|
||||
{.compatible = "qcom,sm8550-vidc-v2"},
|
||||
{.compatible = "qcom,sm8650-vidc"},
|
||||
{.compatible = "qcom,sm8650-vidc-v2"},
|
||||
{.compatible = "qcom,cliffs-vidc"},
|
||||
{.compatible = "qcom,vidc,cb-ns-pxl"},
|
||||
{.compatible = "qcom,vidc,cb-ns"},
|
||||
{.compatible = "qcom,vidc,cb-sec-non-pxl"},
|
||||
|
@@ -16,6 +16,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_MSM_VIDC_PINEAPPLE), y)
|
||||
LINUXINCLUDE += -I$(VIDEO_DRIVER_ABS_PATH)/platform/pineapple/inc \
|
||||
-I$(VIDEO_DRIVER_ABS_PATH)/platform/cliffs/inc \
|
||||
-I$(VIDEO_DRIVER_ABS_PATH)/variant/iris33/inc
|
||||
endif
|
||||
ifeq ($(CONFIG_MSM_VIDC_KALAMA), y)
|
||||
@@ -37,6 +38,7 @@ obj-m += msm_video.o
|
||||
|
||||
ifeq ($(CONFIG_MSM_VIDC_PINEAPPLE), y)
|
||||
msm_video-objs += $(VIDEO_DRIVER_REL_PATH)/platform/pineapple/src/msm_vidc_pineapple.o \
|
||||
$(VIDEO_DRIVER_REL_PATH)/platform/cliffs/src/msm_vidc_cliffs.o \
|
||||
$(VIDEO_DRIVER_REL_PATH)/variant/iris33/src/msm_vidc_buffer_iris33.o \
|
||||
$(VIDEO_DRIVER_REL_PATH)/variant/iris33/src/msm_vidc_power_iris33.o \
|
||||
$(VIDEO_DRIVER_REL_PATH)/variant/iris33/src/msm_vidc_bus_iris33.o \
|
||||
|
@@ -42,6 +42,7 @@ module_entry(
|
||||
"driver/variant/iris33/src/msm_vidc_power_iris33.c",
|
||||
"driver/variant/iris33/src/msm_vidc_iris33.c",
|
||||
"driver/platform/pineapple/src/msm_vidc_pineapple.c",
|
||||
"driver/platform/cliffs/src/msm_vidc_cliffs.c",
|
||||
],
|
||||
},
|
||||
deps = [
|
||||
@@ -79,6 +80,7 @@ module_entry(
|
||||
config_srcs = {
|
||||
"CONFIG_MSM_VIDC_PINEAPPLE" : [
|
||||
"driver/platform/pineapple/src/pineapple.c",
|
||||
"driver/platform/cliffs/src/cliffs.c",
|
||||
"driver/variant/iris33/src/msm_vidc_buffer_iris33.c",
|
||||
"driver/variant/iris33/src/msm_vidc_power_iris33.c",
|
||||
"driver/variant/iris33/src/msm_vidc_bus_iris33.c",
|
||||
|
在新工单中引用
屏蔽一个用户