Commit 4e09b95d authored by Rob Clark's avatar Rob Clark

drm/msm: drop quirks binding

This was never documented or used in upstream dtb.  It is used by
downstream bindings from android device kernels.  But the quirks are
a property of the gpu revision, and as such are redundant to be listed
separately in dt.  Instead, move the quirks to the device table.
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
parent 1db7afa4
...@@ -327,7 +327,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu) ...@@ -327,7 +327,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
/* Enable RBBM error reporting bits */ /* Enable RBBM error reporting bits */
gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL0, 0x00000001); gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL0, 0x00000001);
if (adreno_gpu->quirks & ADRENO_QUIRK_FAULT_DETECT_MASK) { if (adreno_gpu->info->quirks & ADRENO_QUIRK_FAULT_DETECT_MASK) {
/* /*
* Mask out the activity signals from RB1-3 to avoid false * Mask out the activity signals from RB1-3 to avoid false
* positives * positives
...@@ -381,7 +381,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu) ...@@ -381,7 +381,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
gpu_write(gpu, REG_A5XX_PC_DBG_ECO_CNTL, (0x400 << 11 | 0x300 << 22)); gpu_write(gpu, REG_A5XX_PC_DBG_ECO_CNTL, (0x400 << 11 | 0x300 << 22));
if (adreno_gpu->quirks & ADRENO_QUIRK_TWO_PASS_USE_WFI) if (adreno_gpu->info->quirks & ADRENO_QUIRK_TWO_PASS_USE_WFI)
gpu_rmw(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0, (1 << 8)); gpu_rmw(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0, (1 << 8));
gpu_write(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0xc0200100); gpu_write(gpu, REG_A5XX_PC_DBG_ECO_CNTL, 0xc0200100);
......
...@@ -75,12 +75,14 @@ static const struct adreno_info gpulist[] = { ...@@ -75,12 +75,14 @@ static const struct adreno_info gpulist[] = {
.gmem = (SZ_1M + SZ_512K), .gmem = (SZ_1M + SZ_512K),
.init = a4xx_gpu_init, .init = a4xx_gpu_init,
}, { }, {
.rev = ADRENO_REV(5, 3, 0, ANY_ID), .rev = ADRENO_REV(5, 3, 0, 2),
.revn = 530, .revn = 530,
.name = "A530", .name = "A530",
.pm4fw = "a530_pm4.fw", .pm4fw = "a530_pm4.fw",
.pfpfw = "a530_pfp.fw", .pfpfw = "a530_pfp.fw",
.gmem = SZ_1M, .gmem = SZ_1M,
.quirks = ADRENO_QUIRK_TWO_PASS_USE_WFI |
ADRENO_QUIRK_FAULT_DETECT_MASK,
.init = a5xx_gpu_init, .init = a5xx_gpu_init,
.gpmufw = "a530v3_gpmu.fw2", .gpmufw = "a530v3_gpmu.fw2",
}, },
...@@ -181,14 +183,6 @@ static void set_gpu_pdev(struct drm_device *dev, ...@@ -181,14 +183,6 @@ static void set_gpu_pdev(struct drm_device *dev,
priv->gpu_pdev = pdev; priv->gpu_pdev = pdev;
} }
static const struct {
const char *str;
uint32_t flag;
} quirks[] = {
{ "qcom,gpu-quirk-two-pass-use-wfi", ADRENO_QUIRK_TWO_PASS_USE_WFI },
{ "qcom,gpu-quirk-fault-detect-mask", ADRENO_QUIRK_FAULT_DETECT_MASK },
};
static int find_chipid(struct device *dev, u32 *chipid) static int find_chipid(struct device *dev, u32 *chipid)
{ {
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
...@@ -231,7 +225,7 @@ static int adreno_bind(struct device *dev, struct device *master, void *data) ...@@ -231,7 +225,7 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
static struct adreno_platform_config config = {}; static struct adreno_platform_config config = {};
struct device_node *child, *node = dev->of_node; struct device_node *child, *node = dev->of_node;
u32 val; u32 val;
int ret, i; int ret;
ret = find_chipid(dev, &val); ret = find_chipid(dev, &val);
if (ret) { if (ret) {
...@@ -267,10 +261,6 @@ static int adreno_bind(struct device *dev, struct device *master, void *data) ...@@ -267,10 +261,6 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
config.slow_rate = 27000000; config.slow_rate = 27000000;
} }
for (i = 0; i < ARRAY_SIZE(quirks); i++)
if (of_property_read_bool(node, quirks[i].str))
config.quirks |= quirks[i].flag;
dev->platform_data = &config; dev->platform_data = &config;
set_gpu_pdev(dev_get_drvdata(master), to_platform_device(dev)); set_gpu_pdev(dev_get_drvdata(master), to_platform_device(dev));
return 0; return 0;
......
...@@ -352,7 +352,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev, ...@@ -352,7 +352,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
adreno_gpu->gmem = adreno_gpu->info->gmem; adreno_gpu->gmem = adreno_gpu->info->gmem;
adreno_gpu->revn = adreno_gpu->info->revn; adreno_gpu->revn = adreno_gpu->info->revn;
adreno_gpu->rev = config->rev; adreno_gpu->rev = config->rev;
adreno_gpu->quirks = config->quirks;
gpu->fast_rate = config->fast_rate; gpu->fast_rate = config->fast_rate;
gpu->slow_rate = config->slow_rate; gpu->slow_rate = config->slow_rate;
......
...@@ -75,6 +75,7 @@ struct adreno_info { ...@@ -75,6 +75,7 @@ struct adreno_info {
const char *pm4fw, *pfpfw; const char *pm4fw, *pfpfw;
const char *gpmufw; const char *gpmufw;
uint32_t gmem; uint32_t gmem;
enum adreno_quirks quirks;
struct msm_gpu *(*init)(struct drm_device *dev); struct msm_gpu *(*init)(struct drm_device *dev);
}; };
...@@ -116,8 +117,6 @@ struct adreno_gpu { ...@@ -116,8 +117,6 @@ struct adreno_gpu {
* code (a3xx_gpu.c) and stored in this common location. * code (a3xx_gpu.c) and stored in this common location.
*/ */
const unsigned int *reg_offsets; const unsigned int *reg_offsets;
uint32_t quirks;
}; };
#define to_adreno_gpu(x) container_of(x, struct adreno_gpu, base) #define to_adreno_gpu(x) container_of(x, struct adreno_gpu, base)
...@@ -128,7 +127,6 @@ struct adreno_platform_config { ...@@ -128,7 +127,6 @@ struct adreno_platform_config {
#ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING #ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
struct msm_bus_scale_pdata *bus_scale_table; struct msm_bus_scale_pdata *bus_scale_table;
#endif #endif
uint32_t quirks;
}; };
#define ADRENO_IDLE_TIMEOUT msecs_to_jiffies(1000) #define ADRENO_IDLE_TIMEOUT msecs_to_jiffies(1000)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment