Commit f4f1c707 authored by Rob Clark's avatar Rob Clark

drm/msm/adreno: Remove redundant revn param

This just duplicates what is in adreno_info, and can cause confusion if
used before it is set.
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/549761/
parent 6391030d
...@@ -2484,8 +2484,6 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev) ...@@ -2484,8 +2484,6 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
/* Assign these early so that we can use the is_aXYZ helpers */ /* Assign these early so that we can use the is_aXYZ helpers */
/* Numeric revision IDs (e.g. 630) */
adreno_gpu->revn = info->revn;
/* New-style ADRENO_REV()-only */ /* New-style ADRENO_REV()-only */
adreno_gpu->rev = info->rev; adreno_gpu->rev = info->rev;
/* Quirk data */ /* Quirk data */
......
...@@ -1099,7 +1099,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev, ...@@ -1099,7 +1099,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
adreno_gpu->funcs = funcs; adreno_gpu->funcs = funcs;
adreno_gpu->info = adreno_info(config->rev); adreno_gpu->info = adreno_info(config->rev);
adreno_gpu->revn = adreno_gpu->info->revn;
adreno_gpu->rev = *rev; adreno_gpu->rev = *rev;
if (adreno_read_speedbin(dev, &speedbin) || !speedbin) if (adreno_read_speedbin(dev, &speedbin) || !speedbin)
......
...@@ -77,7 +77,6 @@ struct adreno_gpu { ...@@ -77,7 +77,6 @@ struct adreno_gpu {
struct msm_gpu base; struct msm_gpu base;
struct adreno_rev rev; struct adreno_rev rev;
const struct adreno_info *info; const struct adreno_info *info;
uint32_t revn; /* numeric revision name */
uint16_t speedbin; uint16_t speedbin;
const struct adreno_gpu_funcs *funcs; const struct adreno_gpu_funcs *funcs;
...@@ -147,10 +146,9 @@ bool adreno_cmp_rev(struct adreno_rev rev1, struct adreno_rev rev2); ...@@ -147,10 +146,9 @@ bool adreno_cmp_rev(struct adreno_rev rev1, struct adreno_rev rev2);
static inline bool adreno_is_revn(const struct adreno_gpu *gpu, uint32_t revn) static inline bool adreno_is_revn(const struct adreno_gpu *gpu, uint32_t revn)
{ {
/* revn can be zero, but if not is set at same time as info */ if (WARN_ON_ONCE(!gpu->info))
WARN_ON_ONCE(!gpu->info); return false;
return gpu->info->revn == revn;
return gpu->revn == revn;
} }
static inline bool adreno_has_gmu_wrapper(const struct adreno_gpu *gpu) static inline bool adreno_has_gmu_wrapper(const struct adreno_gpu *gpu)
...@@ -160,18 +158,16 @@ static inline bool adreno_has_gmu_wrapper(const struct adreno_gpu *gpu) ...@@ -160,18 +158,16 @@ static inline bool adreno_has_gmu_wrapper(const struct adreno_gpu *gpu)
static inline bool adreno_is_a2xx(const struct adreno_gpu *gpu) static inline bool adreno_is_a2xx(const struct adreno_gpu *gpu)
{ {
/* revn can be zero, but if not is set at same time as info */ if (WARN_ON_ONCE(!gpu->info))
WARN_ON_ONCE(!gpu->info); return false;
return (gpu->info->revn < 300);
return (gpu->revn < 300);
} }
static inline bool adreno_is_a20x(const struct adreno_gpu *gpu) static inline bool adreno_is_a20x(const struct adreno_gpu *gpu)
{ {
/* revn can be zero, but if not is set at same time as info */ if (WARN_ON_ONCE(!gpu->info))
WARN_ON_ONCE(!gpu->info); return false;
return (gpu->info->revn < 210);
return (gpu->revn < 210);
} }
static inline bool adreno_is_a225(const struct adreno_gpu *gpu) static inline bool adreno_is_a225(const struct adreno_gpu *gpu)
......
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