diff mbox series

drm/komeda: Initialize and enable output polling on Komeda

Message ID 1564128018-22921-1-git-send-email-lowry.li@arm.com (mailing list archive)
State New, archived
Headers show
Series drm/komeda: Initialize and enable output polling on Komeda | expand

Commit Message

Lowry Li (Arm Technology China) July 26, 2019, 8 a.m. UTC
Initialize and enable output polling on Komeda.

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Liviu Dudau July 26, 2019, 1:15 p.m. UTC | #1
On Fri, Jul 26, 2019 at 08:00:29AM +0000, Lowry Li (Arm Technology China) wrote:
> Initialize and enable output polling on Komeda.
> 
> Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> index 1462bac..26f2919 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> @@ -15,6 +15,7 @@
>  #include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_irq.h>
>  #include <drm/drm_vblank.h>
> +#include <drm/drm_probe_helper.h>
>  
>  #include "komeda_dev.h"
>  #include "komeda_framebuffer.h"
> @@ -331,6 +332,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
>  	if (err)
>  		goto uninstall_irq;
>  
> +	drm_kms_helper_poll_init(drm);

Most of the drivers call this before registering the driver. But this is all
moot because I can't apply the patch on top of drm-misc-next, so not having
full context of what komeda_kms_attach looks like in your tree.

Best regards,
Liviu

> +
>  	return kms;
>  
>  uninstall_irq:
> @@ -348,6 +351,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)
>  	struct drm_device *drm = &kms->base;
>  	struct komeda_dev *mdev = drm->dev_private;
>  
> +	drm_kms_helper_poll_fini(drm);
>  	mdev->funcs->disable_irq(mdev);
>  	drm_dev_unregister(drm);
>  	drm_irq_uninstall(drm);
> -- 
> 1.9.1
>
Lowry Li (Arm Technology China) Aug. 1, 2019, 11:41 a.m. UTC | #2
Hi Liviu,

On Fri, Jul 26, 2019 at 01:15:33PM +0000, Liviu Dudau wrote:
> On Fri, Jul 26, 2019 at 08:00:29AM +0000, Lowry Li (Arm Technology China) wrote:
> > Initialize and enable output polling on Komeda.
> > 
> > Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> > ---
> >  drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > index 1462bac..26f2919 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> > @@ -15,6 +15,7 @@
> >  #include <drm/drm_gem_framebuffer_helper.h>
> >  #include <drm/drm_irq.h>
> >  #include <drm/drm_vblank.h>
> > +#include <drm/drm_probe_helper.h>
> >  
> >  #include "komeda_dev.h"
> >  #include "komeda_framebuffer.h"
> > @@ -331,6 +332,8 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
> >  	if (err)
> >  		goto uninstall_irq;
> >  
> > +	drm_kms_helper_poll_init(drm);
> 
> Most of the drivers call this before registering the driver. But this is all
> moot because I can't apply the patch on top of drm-misc-next, so not having
> full context of what komeda_kms_attach looks like in your tree.
> 
> Best regards,
> Liviu
> 
Yes, will refine this and rebase the code. Thanks a lot.

Best regards,
Lowry
> > +
> >  	return kms;
> >  
> >  uninstall_irq:
> > @@ -348,6 +351,7 @@ void komeda_kms_detach(struct komeda_kms_dev *kms)
> >  	struct drm_device *drm = &kms->base;
> >  	struct komeda_dev *mdev = drm->dev_private;
> >  
> > +	drm_kms_helper_poll_fini(drm);
> >  	mdev->funcs->disable_irq(mdev);
> >  	drm_dev_unregister(drm);
> >  	drm_irq_uninstall(drm);
> > -- 
> > 1.9.1
> > 
> 
> -- 
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
index 1462bac..26f2919 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
@@ -15,6 +15,7 @@ 
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_irq.h>
 #include <drm/drm_vblank.h>
+#include <drm/drm_probe_helper.h>
 
 #include "komeda_dev.h"
 #include "komeda_framebuffer.h"
@@ -331,6 +332,8 @@  struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
 	if (err)
 		goto uninstall_irq;
 
+	drm_kms_helper_poll_init(drm);
+
 	return kms;
 
 uninstall_irq:
@@ -348,6 +351,7 @@  void komeda_kms_detach(struct komeda_kms_dev *kms)
 	struct drm_device *drm = &kms->base;
 	struct komeda_dev *mdev = drm->dev_private;
 
+	drm_kms_helper_poll_fini(drm);
 	mdev->funcs->disable_irq(mdev);
 	drm_dev_unregister(drm);
 	drm_irq_uninstall(drm);