drm/komeda: Enable/Disable vblank interrupts
Subsystems (4)
PATCH 1/1 drm/komeda: Enable/Disable vblank interrupts
One needs to set "(struct drm_device *)->irq_enabled = true" to signal drm core to enable vblank interrupts after the hardware has been initialized. Correspondingly, one needs to disable vblank interrupts by setting "(struct drm_device *)->irq_enabled = false" at the beginning of the de-initializing routine.
--- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/arm/display/komeda/komeda_kms.c +4 -0
@@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)if (err) goto uninstall_irq; + drm->irq_enabled = true; + err =drm_dev_register (drm,0 );if (err) goto uninstall_irq;
@@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)return kms; uninstall_irq: + drm->irq_enabled = false;drm_irq_uninstall (drm); cleanup_mode_config:drm_mode_config_cleanup (drm);
@@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)struct drm_device *drm = &kms->base;struct komeda_dev *mdev = drm->dev_private; + drm->irq_enabled = false; mdev->funcs->disable_irq (mdev);drm_dev_unregister (drm);drm_irq_uninstall (drm);
Signature · 6 lines
2.21.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Ayan Halder
One needs to set "(struct
drm_device*)->irq_enabled = true" to signal drm core to enable vblank interrupts after the hardware has been initialized. Correspondingly, one needs to disable vblank interrupts by setting "(structdrm_device*)->irq_enabled = false" at the beginning of the de-initializing routine.
Only if you don't use the drm_irq_install helper. Quoting the kerneldoc in full:
/** * @irq_enabled: * * Indicates that interrupt handling is enabled, specifically vblank * handling. Drivers which don't use drm_irq_install() need to set this * to true manually. */ bool irq_enabled;
Not entirely sure where you've found your quote, but it's not complete.
Cheers, Daniel
Quoted 38 lines
Signed-off-by Ayan Kumar halder <[email protected]>--- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/arm/display/komeda/komeda_kms.c +4
-0@@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)if (err) goto uninstall_irq; + drm->irq_enabled = true; + err =drm_dev_register (drm,0 );if (err) goto uninstall_irq;@@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)return kms; uninstall_irq: + drm->irq_enabled = false;drm_irq_uninstall (drm); cleanup_mode_config:drm_mode_config_cleanup (drm);@@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)struct drm_device *drm = &kms->base;struct komeda_dev *mdev = drm->dev_private; + drm->irq_enabled = false; mdev->funcs->disable_irq (mdev);drm_dev_unregister (drm);drm_irq_uninstall (drm);Signature · 1 line
2.21.0
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Fri, Jun 07, 2019 at 08:18:56PM +0200, Daniel Vetter wrote:
Hi Daniel,
Quoted 19 lines · Ayan Halder
Quoted 5 lines
One needs to set "(struct
drm_device*)->irq_enabled = true" to signal drm core to enable vblank interrupts after the hardware has been initialized. Correspondingly, one needs to disable vblank interrupts by setting "(structdrm_device*)->irq_enabled = false" at the beginning of the de-initializing routine.Only if you don't use the
drm_irq_installhelper. Quoting the kerneldoc in full:/**
* @irq_enabled:
*
* Indicates that interrupt handling is enabled, specifically vblank
* handling. Drivers which don't usedrm_irq_install()need to set this
* to true manually.
*/
boolirq_enabled;
Quoted 3 lines
Not entirely sure where you've found your quote, but it's not complete.
Cheers, Daniel
Thanks for your review.
That was my quote which reflects my half-baked understanding of the issue :(. I had missed reading the header files.
That said, I will squash my previous patch "drm/komeda: Avoid using DRIVER_IRQ_SHARED" into this one as the current patch is a consequence of the changes made in the previous patch.
Regards,
Ayan Kumar Halder
Quoted 32 lines
Quoted 32 lines
Signed-off-by Ayan Kumar halder <[email protected]>--- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/arm/display/komeda/komeda_kms.c +3
-0@@ -204,6 +204,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)if (err) goto uninstall_irq; +drm->irq_enabled = true; + err =drm_dev_register (drm,0 );if (err) goto uninstall_irq;@@ -211,6 +213,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)return kms; uninstall_irq: +drm->irq_enabled = false;drm_irq_uninstall (drm); cleanup_mode_config:drm_mode_config_cleanup (drm);@@ -225,6 +228,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)struct drm_device *drm = &kms->base;struct komeda_dev *mdev = drm->dev_private;
Quoted 12 lines
Quoted 7 lines
drivers/gpu/drm/arm/display/komeda/komeda_kms.c +1
-1+drm->irq_enabled = false; mdev->funcs->disable_irq (mdev);drm_dev_unregister (drm);drm_irq_uninstall (drm); --2.21.0
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel