Skip to contentSkip to conversation

drm/panfrost: Skip speed binning on EOPNOTSUPP

PATCH In review David Michael 2 participants 3 messages Aug 16, 2023 – Aug 21, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panfrost: Skip speed binning on EOPNOTSUPP

Encountered on an ARM Mali-T760 MP4, attempting to read the nvmem variable can also return EOPNOTSUPP instead of ENOENT when speed binning is unsupported.

Fixes 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")

---

Hi,

I upgraded an old Chromebook (veyron-minnie) to 6.4, and it fell back to software rendering with "Cannot read speed-bin (-95)." in dmesg. Does this error code also make sense to skip? Hardware acceleration seems to work as it did previously with this change.

Thanks.

David

 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_devfreq.c +1 -1
index 58dfb15a8757..e78de99e9933 100644
@@ -96,7 +96,7 @@ static int panfrost_read_speedbin(struct device *dev)
 		 * keep going without it; any other error means that we are
 		 * supposed to read the bin value, but we failed doing so.
 		 */
-		if (ret != -ENOENT) {
+		if (ret != -ENOENT && ret != -EOPNOTSUPP) {
 			DRM_DEV_ERROR(dev, "Cannot read speed-bin (%d).", ret);
 			return ret;
 		}
Signature · 1 line
2.41.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Michael

Encountered on an ARM Mali-T760 MP4, attempting to read the nvmem variable can also return EOPNOTSUPP instead of ENOENT when speed binning is unsupported.

Fixes 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")
Quoted 8 lines

---

Hi,

I upgraded an old Chromebook (veyron-minnie) to 6.4, and it fell back to software rendering with "Cannot read speed-bin (-95)." in dmesg. Does this error code also make sense to skip? Hardware acceleration seems to work as it did previously with this change.

I believe this is because the kernel is compiled without CONFIG_NVMEM so the stub function is returning EOPNOTSUPP.

Since most platforms don't support speed binning just continuing is the correct approach on those. For platforms with speed binning this means the binning won't be applied if !CONFIG_NVMEM - but I don't think there's much we can do about that.

Steve

Quoted 21 lines

Thanks.

David

 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_devfreq.c +1 -1
index 58dfb15a8757..e78de99e9933 100644
@@ -96,7 +96,7 @@ static int panfrost_read_speedbin(struct device *dev)
 		 * keep going without it; any other error means that we are
 		 * supposed to read the bin value, but we failed doing so.
 		 */
-		if (ret != -ENOENT) {
+		if (ret != -ENOENT && ret != -EOPNOTSUPP) {
 			DRM_DEV_ERROR(dev, "Cannot read speed-bin (%d).", ret);
 			return ret;
 		}
maintainer
#2 lore raw
Quoted 10 lines · Steven Price
Quoted 7 lines · David Michael

Encountered on an ARM Mali-T760 MP4, attempting to read the nvmem variable can also return EOPNOTSUPP instead of ENOENT when speed binning is unsupported.

Fixes 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")

And pushed to drm-misc-fixes.

Thanks,

Steve

Quoted 41 lines
Quoted 8 lines

---

Hi,

I upgraded an old Chromebook (veyron-minnie) to 6.4, and it fell back to software rendering with "Cannot read speed-bin (-95)." in dmesg. Does this error code also make sense to skip? Hardware acceleration seems to work as it did previously with this change.

I believe this is because the kernel is compiled without CONFIG_NVMEM so the stub function is returning EOPNOTSUPP.

Since most platforms don't support speed binning just continuing is the correct approach on those. For platforms with speed binning this means the binning won't be applied if !CONFIG_NVMEM - but I don't think there's much we can do about that.

Steve

Quoted 21 lines

Thanks.

David

 drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_devfreq.c +1 -1
index 58dfb15a8757..e78de99e9933 100644
@@ -96,7 +96,7 @@ static int panfrost_read_speedbin(struct device *dev)
 		 * keep going without it; any other error means that we are
 		 * supposed to read the bin value, but we failed doing so.
 		 */
-		if (ret != -ENOENT) {
+		if (ret != -ENOENT && ret != -EOPNOTSUPP) {
 			DRM_DEV_ERROR(dev, "Cannot read speed-bin (%d).", ret);
 			return ret;
 		}