From: Jonathan Marek <jonathan@marek.ca>
To: freedreno@lists.freedesktop.org
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Jordan Crouse <jcrouse@codeaurora.org>,
Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
Eric Anholt <eric@anholt.net>,
Akhil P Oommen <akhilpo@codeaurora.org>,
Sharat Masetty <smasetty@codeaurora.org>,
linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM
ADRENO GPU),
dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM
ADRENO GPU), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] drm/msm/a6xx: fix for kernels without CONFIG_NVMEM
Date: Tue, 16 Feb 2021 15:09:07 -0500 [thread overview]
Message-ID: <20210216200909.19039-1-jonathan@marek.ca> (raw)
Ignore nvmem_cell_get() EOPNOTSUPP error in the same way as a ENOENT error,
to fix the case where the kernel was compiled without CONFIG_NVMEM.
Fixes: fe7952c629da ("drm/msm: Add speed-bin support to a618 gpu")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index ba8e9d3cf0fe..7fe5d97606aa 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1356,10 +1356,10 @@ static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu,
cell = nvmem_cell_get(dev, "speed_bin");
/*
- * -ENOENT means that the platform doesn't support speedbin which is
- * fine
+ * -ENOENT means no speed bin in device tree,
+ * -EOPNOTSUPP means kernel was built without CONFIG_NVMEM
*/
- if (PTR_ERR(cell) == -ENOENT)
+ if (PTR_ERR(cell) == -ENOENT || PTR_ERR(cell) == -EOPNOTSUPP)
return 0;
else if (IS_ERR(cell)) {
DRM_DEV_ERROR(dev,
--
2.26.1
next reply other threads:[~2021-02-16 20:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 20:09 Jonathan Marek [this message]
2021-02-17 3:06 ` [PATCH] drm/msm/a6xx: fix for kernels without CONFIG_NVMEM Rob Clark
2021-02-17 13:44 ` Akhil P Oommen
2021-02-17 19:08 ` Jordan Crouse
2021-02-17 20:18 ` Rob Clark
2021-02-17 20:35 ` Jonathan Marek
2021-02-18 12:28 ` Akhil P Oommen
2021-02-18 16:11 ` Rob Clark
2021-02-19 10:44 ` Akhil P Oommen
2021-02-19 16:00 ` Rob Clark
2021-02-22 15:45 ` Akhil P Oommen
2021-02-22 16:06 ` Rob Clark
2021-04-01 20:12 ` Rob Clark
2021-04-01 21:03 ` Dmitry Baryshkov
2021-04-01 21:49 ` Rob Clark
2021-04-03 4:39 ` Akhil P Oommen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210216200909.19039-1-jonathan@marek.ca \
--to=jonathan@marek.ca \
--cc=airlied@linux.ie \
--cc=akhilpo@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=freedreno@lists.freedesktop.org \
--cc=jcrouse@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).