* [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP
@ 2023-08-16 1:42 David Michael
2023-08-16 9:45 ` Steven Price
0 siblings, 1 reply; 3+ messages in thread
From: David Michael @ 2023-08-16 1:42 UTC (permalink / raw)
To: robh, tomeu.vizoso
Cc: angelogioacchino.delregno, boris.brezillon, alyssa.rosenzweig,
dri-devel, steven.price
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.
Cc: <stable@vger.kernel.org>
Fixes: 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")
Signed-off-by: David Michael <fedora.dm0@gmail.com>
---
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(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 58dfb15a8757..e78de99e9933 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -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;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP
2023-08-16 1:42 [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP David Michael
@ 2023-08-16 9:45 ` Steven Price
2023-08-21 14:45 ` Steven Price
0 siblings, 1 reply; 3+ messages in thread
From: Steven Price @ 2023-08-16 9:45 UTC (permalink / raw)
To: David Michael, robh, tomeu.vizoso
Cc: boris.brezillon, alyssa.rosenzweig, dri-devel,
angelogioacchino.delregno
On 16/08/2023 02:42, David Michael wrote:
> 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.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")
> Signed-off-by: David Michael <fedora.dm0@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
>
> 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
>
> Thanks.
>
> David
>
> drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index 58dfb15a8757..e78de99e9933 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -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;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP
2023-08-16 9:45 ` Steven Price
@ 2023-08-21 14:45 ` Steven Price
0 siblings, 0 replies; 3+ messages in thread
From: Steven Price @ 2023-08-21 14:45 UTC (permalink / raw)
To: David Michael, robh; +Cc: boris.brezillon, dri-devel, angelogioacchino.delregno
On 16/08/2023 10:45, Steven Price wrote:
> On 16/08/2023 02:42, David Michael wrote:
>> 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.
>>
>> Cc: <stable@vger.kernel.org>
>> Fixes: 7d690f936e9b ("drm/panfrost: Add basic support for speed binning")
>> Signed-off-by: David Michael <fedora.dm0@gmail.com>
>
> Reviewed-by: Steven Price <steven.price@arm.com>
And pushed to drm-misc-fixes.
Thanks,
Steve
>> ---
>>
>> 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
>
>>
>> Thanks.
>>
>> David
>>
>> drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
>> index 58dfb15a8757..e78de99e9933 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
>> @@ -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;
>> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-21 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 1:42 [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP David Michael
2023-08-16 9:45 ` Steven Price
2023-08-21 14:45 ` Steven Price
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.