Skip to content

Commit

Permalink
ARM: dts: 15811: Target different GPU firmware image name
Browse files Browse the repository at this point in the history
The OnePlus 3T uses GPU firmware images that have the same names as the ones
for the OnePlus 3, but the OnePlus 3's TrustZone firmware refuses to load
GPU firmware from the 3T. This allows a single ROM to carry the needed
firmware to support both OnePlus 3T and OnePlus 3 simultaneously.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
  • Loading branch information
kerneltoast committed Dec 11, 2016
1 parent cc74dff commit 1982414
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/qcom/msm8996pro-pmi8996-mtp_15811.dts
Expand Up @@ -30,3 +30,7 @@
op,low-bat-capacity = <20>;
};
};

&pil_gpu {
qcom,firmware-name = "a530_zap-pro";
};
11 changes: 11 additions & 0 deletions drivers/gpu/msm/adreno_a5xx.c
Expand Up @@ -15,6 +15,10 @@
#include <soc/qcom/scm.h>
#include <linux/pm_opp.h>

#ifdef CONFIG_MACH_MSM8996_15801
#include <soc/qcom/socinfo.h>
#endif

#include "adreno.h"
#include "a5xx_reg.h"
#include "adreno_a5xx.h"
Expand Down Expand Up @@ -2572,7 +2576,14 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev,

/* Load the zap shader firmware through PIL if its available */
if (adreno_dev->gpucore->zap_name && !zap_ucode_loaded) {
#ifdef CONFIG_MACH_MSM8996_15801
if (socinfo_get_id() == 305) /* MSM8996pro */
ptr = subsystem_get("a530_zap-pro");
else
ptr = subsystem_get(adreno_dev->gpucore->zap_name);
#else
ptr = subsystem_get(adreno_dev->gpucore->zap_name);
#endif

/* Return error if the zap shader cannot be loaded */
if (IS_ERR_OR_NULL(ptr))
Expand Down

0 comments on commit 1982414

Please sign in to comment.