Skip to contentSkip to conversation

drm/panthor: Add FOP_UNSIGNED_OFFSET to fop_flags

PATCH Applied Liviu Dudau 5 participants 6 messages Sep 20, 2024 – Oct 1, 2024

Subsystems (4)
lore
Share & tools
lore

Liviu Dudau

author maintainer
#0 lore raw

PATCH 1/1 drm/panthor: Add FOP_UNSIGNED_OFFSET to fop_flags

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>
---
 drivers/gpu/drm/panthor/panthor_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_drv.c +1 -0
index 34182f67136c1..c520f156e2d73 100644
@@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = {
 	.read = drm_read,
 	.llseek = noop_llseek,
 	.mmap = panthor_mmap,
+	.fop_flags = FOP_UNSIGNED_OFFSET,
 };
 
 #ifdef CONFIG_DEBUG_FS
Signature · 1 line
2.46.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Fri, 20 Sep 2024 11:28:02 +0100 Liviu Dudau <[email protected]> wrote:

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>
Quoted 16 lines
---
 drivers/gpu/drm/panthor/panthor_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_drv.c +1 -0
index 34182f67136c1..c520f156e2d73 100644
@@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = {
 	.read = drm_read,
 	.llseek = noop_llseek,
 	.mmap = panthor_mmap,
+	.fop_flags = FOP_UNSIGNED_OFFSET,
 };
 
 #ifdef CONFIG_DEBUG_FS
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Liviu Dudau
Quoted 9 lines · Liviu Dudau

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>
Quoted 16 lines
---
 drivers/gpu/drm/panthor/panthor_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_drv.c +1 -0
index 34182f67136c1..c520f156e2d73 100644
@@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = {
 	.read = drm_read,
 	.llseek = noop_llseek,
 	.mmap = panthor_mmap,
+	.fop_flags = FOP_UNSIGNED_OFFSET,
 };
 
 #ifdef CONFIG_DEBUG_FS
maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Liviu Dudau
Quoted 10 lines · Liviu Dudau

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>

---

Tested-by on v1 1/1
#4 lore raw
In reply to Liviu Dudau

Am Freitag, 20. September 2024, 12:28:02 CEST schrieb Liviu Dudau:

Quoted 9 lines

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>

On a rk3588-tiger-haikou

with 6.11 panthor was working nicely
with 6.12-rc1 panthor was not recognized by mesa anymore

with this patch applied on top, things are back to a working state.

Quoted 17 lines
---
 drivers/gpu/drm/panthor/panthor_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_drv.c +1 -0
index 34182f67136c1..c520f156e2d73 100644
@@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = {
 	.read = drm_read,
 	.llseek = noop_llseek,
 	.mmap = panthor_mmap,
+	.fop_flags = FOP_UNSIGNED_OFFSET,
 };
 
 #ifdef CONFIG_DEBUG_FS
maintainer Applied
#5 lore raw
In reply to Liviu Dudau
Quoted 9 lines · On Fri, 20 Sep 2024 11:28:02 +0100 Liviu Dudau <[email protected]> wrote:

Since 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") the FMODE_UNSIGNED_OFFSET flag has been moved to fop_flags and renamed, but the patch failed to make the changes for the panthor driver. When user space opens the render node the WARN() added by the patch gets triggered.

Fixes 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags")
Cc Christian Brauner <[email protected]>

Queued to drm-misc-fixes.

Quoted 16 lines
---
 drivers/gpu/drm/panthor/panthor_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_drv.c +1 -0
index 34182f67136c1..c520f156e2d73 100644
@@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = {
 	.read = drm_read,
 	.llseek = noop_llseek,
 	.mmap = panthor_mmap,
+	.fop_flags = FOP_UNSIGNED_OFFSET,
 };
 
 #ifdef CONFIG_DEBUG_FS