drm/panfrost: Prefix interrupt handlers' names
Subsystems (3)
PATCH 1/1 drm/panfrost: Prefix interrupt handlers' names
Currently, the interrupt lines requested by Panfrost use ambiguous names, which adds some obscurity to interrupt introspection (i.e. any tool based on procfs' interrupts file).
In order to improve this, prefix each requested interrupt with either the module name or the device name, where possible.
--- drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/panfrost/panfrost_gpu.c +1 -1
@@ -348,7 +348,7 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)return -ENODEV ; err =devm_request_irq (pfdev->dev, irq, panfrost_gpu_irq_handler, -IRQF_SHARED ,"gpu" , pfdev); +IRQF_SHARED ,dev_name (pfdev->dev), pfdev);if (err) {dev_err (pfdev->dev,"failed to request gpu irq" );return err;
drivers/gpu/drm/panfrost/panfrost_job.c +1 -1
@@ -480,7 +480,7 @@ int panfrost_job_init(struct panfrost_device *pfdev)return -ENODEV ; ret =devm_request_irq (pfdev->dev, irq, panfrost_job_irq_handler, -IRQF_SHARED ,"job" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-job" , pfdev);if (ret) {dev_err (pfdev->dev,"failed to request job irq" );return ret;
drivers/gpu/drm/panfrost/panfrost_mmu.c +4 -2
@@ -612,9 +612,11 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)if (irq <=0 )return -ENODEV ; - err =devm_request_threaded_irq (pfdev->dev, irq, panfrost_mmu_irq_handler, + err =devm_request_threaded_irq (pfdev->dev, irq, + panfrost_mmu_irq_handler, panfrost_mmu_irq_handler_thread, -IRQF_SHARED ,"mmu" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-mmu" , + pfdev);if (err) {dev_err (pfdev->dev,"failed to request mmu irq" );
Signature · 6 lines
2.22.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 51 lines · Ezequiel Garcia
Currently, the interrupt lines requested by Panfrost use ambiguous names, which adds some obscurity to interrupt introspection (i.e. any tool based on procfs' interrupts file).
In order to improve this, prefix each requested interrupt with either the module name or the device name, where possible.
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/panfrost/panfrost_gpu.c +1
-1@@ -348,7 +348,7 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)return -ENODEV ; err =devm_request_irq (pfdev->dev, irq, panfrost_gpu_irq_handler, -IRQF_SHARED ,"gpu" , pfdev); +IRQF_SHARED ,dev_name (pfdev->dev), pfdev);if (err) {dev_err (pfdev->dev,"failed to request gpu irq" );return err;drivers/gpu/drm/panfrost/panfrost_job.c +1
-1@@ -480,7 +480,7 @@ int panfrost_job_init(struct panfrost_device *pfdev)return -ENODEV ; ret =devm_request_irq (pfdev->dev, irq, panfrost_job_irq_handler, -IRQF_SHARED ,"job" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-job" , pfdev);if (ret) {dev_err (pfdev->dev,"failed to request job irq" );return ret;drivers/gpu/drm/panfrost/panfrost_mmu.c +0
-0@@ -612,9 +612,11 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)if (irq <=0 )return -ENODEV ;
drivers/gpu/drm/panfrost/panfrost_mmu.c int panfrost_mmu_init(struct panfrost_device *pfdev) · line 622
Quoted 10 lines
drivers/gpu/drm/panfrost/panfrost_mmu.c +4
-2- err =devm_request_threaded_irq (pfdev->dev, irq, panfrost_mmu_irq_handler, + err =devm_request_threaded_irq (pfdev->dev, irq, + panfrost_mmu_irq_handler, panfrost_mmu_irq_handler_thread, -IRQF_SHARED ,"mmu" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-mmu" , + pfdev);if (err) {dev_err (pfdev->dev,"failed to request mmu irq" );
Why don't you use dev_name(pfdev->dev) everywhere ?
Neil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 61 lines · Neil Armstrong
Hi,
Quoted 58 lines · Ezequiel Garcia
Currently, the interrupt lines requested by Panfrost use ambiguous names, which adds some obscurity to interrupt introspection (i.e. any tool based on procfs' interrupts file).
In order to improve this, prefix each requested interrupt with either the module name or the device name, where possible.
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/panfrost/panfrost_gpu.c +1
-1@@ -348,7 +348,7 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)return -ENODEV ; err =devm_request_irq (pfdev->dev, irq, panfrost_gpu_irq_handler, -IRQF_SHARED ,"gpu" , pfdev); +IRQF_SHARED ,dev_name (pfdev->dev), pfdev);if (err) {dev_err (pfdev->dev,"failed to request gpu irq" );return err;drivers/gpu/drm/panfrost/panfrost_job.c +1
-1@@ -480,7 +480,7 @@ int panfrost_job_init(struct panfrost_device *pfdev)return -ENODEV ; ret =devm_request_irq (pfdev->dev, irq, panfrost_job_irq_handler, -IRQF_SHARED ,"job" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-job" , pfdev);if (ret) {dev_err (pfdev->dev,"failed to request job irq" );return ret;drivers/gpu/drm/panfrost/panfrost_mmu.c +4
-2@@ -612,9 +612,11 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)if (irq <=0 )return -ENODEV ; - err =devm_request_threaded_irq (pfdev->dev, irq, panfrost_mmu_irq_handler, + err =devm_request_threaded_irq (pfdev->dev, irq, + panfrost_mmu_irq_handler, panfrost_mmu_irq_handler_thread, -IRQF_SHARED ,"mmu" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-mmu" , + pfdev);
Quoted 5 lines
drivers/gpu/drm/panfrost/panfrost_mmu.c int panfrost_mmu_init(struct panfrost_device *pfdev) · line 622
Quoted 3 lines
drivers/gpu/drm/panfrost/panfrost_mmu.c +0
-0if (err) {dev_err (pfdev->dev,"failed to request mmu irq" );Why don't you use
dev_name(pfdev->dev)everywhere ?
Agreed, while the current implementation may be confusing it is at least self-consistent. TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
And FWIW note that "GPU" really is the specific hardware name of that IRQ output; it's not just a generic fill-in for "the one that isn't the Job or MMU IRQ".
Thanks,
Robin.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines
TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
Agreed.
----Wait, you said *upstream*? Are there .... oh no
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Alyssa Rosenzweig
Quoted 4 lines
TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
Agreed.
----Wait, you said *upstream*? Are there .... oh no
Heh, fear not - I'm only thinking of the "Juno board with FPGA prototyping stack" setup, and the people using those in anger are all working on some other driver anyway ;)
Robin.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Robin Murphy
Quoted 5 lines · Alyssa Rosenzweig
Quoted 4 lines
TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
Quoted 7 lines
Quoted 3 lines
Agreed.
----Wait, you said *upstream*? Are there .... oh no
Heh, fear not - I'm only thinking of the "Juno board with FPGA prototyping stack" setup, and the people using those in anger are all working on some other driver anyway ;)
Gotcha :)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hey everyone,
Thanks for the quick comments.
(Feedback for kernel patches on the same day, am I dreaming??)
Quoted 74 lines · Robin Murphy
Quoted 61 lines · Neil Armstrong
Hi,
Quoted 58 lines · Ezequiel Garcia
Currently, the interrupt lines requested by Panfrost use ambiguous names, which adds some obscurity to interrupt introspection (i.e. any tool based on procfs' interrupts file).
In order to improve this, prefix each requested interrupt with either the module name or the device name, where possible.
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/panfrost/panfrost_gpu.c +1
-1@@ -348,7 +348,7 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)return -ENODEV ; err =devm_request_irq (pfdev->dev, irq, panfrost_gpu_irq_handler, -IRQF_SHARED ,"gpu" , pfdev); +IRQF_SHARED ,dev_name (pfdev->dev), pfdev);if (err) {dev_err (pfdev->dev,"failed to request gpu irq" );return err;drivers/gpu/drm/panfrost/panfrost_job.c +1
-1@@ -480,7 +480,7 @@ int panfrost_job_init(struct panfrost_device *pfdev)return -ENODEV ; ret =devm_request_irq (pfdev->dev, irq, panfrost_job_irq_handler, -IRQF_SHARED ,"job" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-job" , pfdev);if (ret) {dev_err (pfdev->dev,"failed to request job irq" );return ret;drivers/gpu/drm/panfrost/panfrost_mmu.c +4
-2@@ -612,9 +612,11 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)if (irq <=0 )return -ENODEV ; - err =devm_request_threaded_irq (pfdev->dev, irq, panfrost_mmu_irq_handler, + err =devm_request_threaded_irq (pfdev->dev, irq, + panfrost_mmu_irq_handler, panfrost_mmu_irq_handler_thread, -IRQF_SHARED ,"mmu" , pfdev); +IRQF_SHARED ,KBUILD_MODNAME "-mmu" , + pfdev);Quoted 5 lines
drivers/gpu/drm/panfrost/panfrost_mmu.c int panfrost_mmu_init(struct panfrost_device *pfdev) · line 622
Quoted 3 lines
drivers/gpu/drm/panfrost/panfrost_mmu.c +0
-0if (err) {dev_err (pfdev->dev,"failed to request mmu irq" );Why don't you use
dev_name(pfdev->dev)everywhere ?Agreed, while the current implementation may be confusing it is at least self-consistent. TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
Quoted 4 lines
And FWIW note that "GPU" really is the specific hardware name of that IRQ output; it's not just a generic fill-in for "the one that isn't the Job or MMU IRQ".
Yeah, that makese sense. So how about we go for "panfrost-{job,mmu}" and leave the "gpu" one?
Or "panfrost-{gpu,job,mmu}" for consistency?
Thanks,
Eze
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 1 line
(Feedback for kernel patches on the same day, am I dreaming??)
That's panfrost!
Quoted 11 lines
Quoted 10 lines
Agreed, while the current implementation may be confusing it is at least self-consistent. TBH it would probably be sufficient to save the bother of allocating strings and just settle on "panfrost-{gpu,job,mmu}", since upstream users are unlikely to ever come across a system with more than one Mali in it ;)
And FWIW note that "GPU" really is the specific hardware name of that IRQ output; it's not just a generic fill-in for "the one that isn't the Job or MMU IRQ".
Quoted 4 lines
Yeah, that makese sense. So how about we go for "panfrost-{job,mmu}" and leave the "gpu" one?
Or "panfrost-{gpu,job,mmu}" for consistency?
I would prefer "panfrost-{gpu,job,mmu}" for consistency, I think.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel